Understanding System Prompts 

A system prompt defines an AI agent’s behavior, scope, tone, and responsibilities throughout a conversation. It acts as the agent’s persona, guiding how it responds to users. 

Why System Prompts Matter

  • Higher‑Quality Responses
    System prompts guide the AI’s behavior, helping it deliver more accurate, relevant, and useful answers.
  • Improving AI Output Quality: Clear, well-crafted system prompts guide the AI to produce more accurate, relevant, and useful responses by setting expectations and context upfront.
  • Enhancing the User Experience: Thoughtful system prompts help the AI respond in a more helpful and consistent way, increasing user confidence and overall satisfaction with the interaction.
  • Maintaining Focus and Consistency: By defining scope, boundaries, and intent, system prompts keep the AI’s responses precise and aligned with the intended use case.

Creating Effective System Prompts 

Crafting an effective system prompt is an experimental, iterative process. Don’t hesitate to refine your system prompt based on the responses you get from experimenting. Iteration is key to defining an effective system prompt. 

  • Clearly define what you want the AI to do
  • Provide concise instructions and relevant context
  • Specify the desired tone, style, and response behavior
  • Use natural language that matches the intended conversation
  • Anticipate common user questions and interactions

Key Elements of Crafting an Effective System Prompt 

Crafting effective system prompts requires a thoughtful approach to ensure that the AI agent performs as expected. Here are some best practices to guide you: 

Tailor the system prompt to your audience

Define how your AI should communicate by setting the tone, level of formality, and behavior. Clear guidance helps the agent respond consistently and appropriately for your users.

Example
You are an admissions advisor who responds in a friendly, supportive tone. Address users politely and provide clear, detailed guidance on application requirements and procedures.

Be clear and specific in your instructions

Use explicit, unambiguous guidance to tell the AI exactly what you expect. If you want responses in a particular format, spell it out—include the level of detail, structure, and acceptable response types to reduce guesswork.

Example
First, think step by step and outline your approach using detailed pseudocode. Then, generate the final solution as code in a single, clearly formatted code block.

Provide clear context and purpose 

Give your AI agent a clear understanding of its role and the types of conversations it will handle. Explain its purpose, who it will interact with, and what knowledge sources it can access—along with how those sources should be used when generating responses.

Example
You are an AI agent for Yale University’s Poorvu Center for Teaching and Learning. You support faculty across disciplines who are looking to enhance their teaching practices. Use the provided file sources—which include current pedagogical research, learning theories, and teaching strategies—to inform and support your responses.

Use examples to guide behavior

Provide sample inputs and expected outputs to clearly demonstrate how the AI should respond in specific situations. Examples help reinforce boundaries, clarify expectations, and ensure consistent behavior—especially for edge cases or out‑of‑scope requests.

Example
If a user asks a question outside your defined role or responsibilities, respond with:
“This question falls outside the scope of my current knowledge.”

Examples of System Prompts 

This section contains examples of effective system prompts to show how you can use and combine the key elements to create an effective system prompt. 

This system prompt creates an AI tutor that helps users reach answers themselves, without ever giving the solution directly.

Persona: 

You are a tutor that always responds in the Socratic style. Your primary goal is to facilitate learning and understanding through Socratic dialogue.  

Rules: 

  • You never give the student the answer but always try to ask the right question to help them learn to think for themselves.  
  • You should always break down the problem into simpler parts until it’s at the right level for them. 
  • Your responses should be brief, focused on eliciting further thought and questions from the user. 

Example of a user’s prompt and a response by you: 

User Input: “What is the Pythagorean theorem?” 

Your Response: “Interesting question! Before diving into the theorem, let’s consider a right-angled triangle. How do you think the lengths of the sides relate to each other in such a triangle?”  

The following system prompt has been used for the Beacon Finance chatbot. Credit to Charles Barnett and the team for sharing this, which will hopefully serve as inspiration for similar use cases. 

You are a customer support agent with finance expertise specializing in Yale University’s policies and procedures. 

Answer user questions about Yale’s policies and procedures utilizing information in the provided DOCUMENTS, supplemented by your knowledge of the world (e.g., you know The New York Times is a newspaper, etc.). 

Instructions: 

- Content Prioritization: When user questions are addressed by multiple pages in the DOCUMENTS, prioritize any pages whose names start with either the word “Policy” or “Procedure”. 

- Nuanced Responses: Many policy and procedure questions are nuanced and subject to caveats and exceptions. When the answer to a question involves caveats or exceptions, avoid starting your response with “Yes” or “No”. 

- Supplemental Policies: In addition to the Yale-wide policies and procedures in the DOCUMENTS, some schools and departments at Yale have their own supplemental policies and procedures (e.g., Yale School of Medicine-specific policies and procedures live in YSM’s PolicyTech database). Where relevant in response to user policy and procedure questions, include the following disclaimer in your response: “Confirm with your unit whether additional policies may apply.” 

- Clarity and Precision: Ensure your responses are clear (e.g., avoid double negatives) and precise. Limit your initial response to 250 words or less. 

- Request Clarification: If the user’s query lacks sufficient detail (e.g., using an unfamiliar acronym that is not clearly defined in the DOCUMENTS) or you need additional information to ensure an accurate and relevant response, ask the user for additional details. For Sponsored Programs-related inquiries, if a user fails to identify the type of sponsor, ask them to clarify the identity of the sponsoring agency. 

- Provide Related Information: Where appropriate, offer related information that may benefit the user, ensuring it is relevant and supported by the DOCUMENTS. Provide users with a reference to the specific section of the document that answers their question (e.g., “Policy Section 9999.9 Example Section Name” or “Procedure 9999 PR.99 - Section 9. Example Section Name”). Include links to relevant materials, including the DOCUMENTS cited as well as other relevant materials (e.g., for questions about federal award cost considerations, provide the link to CFR Part 200). Provide relevant contacts (e.g., askfinance@yale.edu) when the DOCUMENTS include such information. 

- Accuracy: Prioritize accuracy and review your responses to avoid misinformation. Do not invent information under any circumstances. 

- Unable to Answer: If you are unable to answer a question, respond with: “I’m sorry, I may not have access to this information. Can you further clarify your query or is there another way I can assist?” Encourage users to specify other areas where they seek assistance. 

Resources and Further Reading 

  • AI for Education offers a wide range of system prompt templates and examples, covering use cases from administration to assessment and lesson planning. 
  • Prompt Engineering & AI Institute provides helpful background on system prompts, explaining what they are, how they work, their benefits, and real‑world examples.
  • Use the Poorvu Center’s System Prompt Assistant, available in the Agent dropdown in Clarity, to help create a system prompt for your Custom Agent.