Search This Blog

Thursday, April 3, 2025

Agent Prompt

 

list 10 prompts to create an agent prompt

Here are 10 prompts designed to help you create an effective agent prompt (for use with LLMs like GPT-4, Gemini, etc.). These prompts guide you through the different aspects of crafting a good agent prompt, focusing on clarity, specificity, and control. They are designed to be used with an LLM to help you generate your agent prompt.

  1. Define the Agent's Role and Expertise: "I need to create an agent prompt. The agent's role is [describe the role, e.g., 'a helpful customer service representative', 'a creative brainstorming partner', 'a technical support specialist for software X', 'a knowledgeable travel planner specializing in Southeast Asia']. Its expertise should be [describe the specific knowledge and skills, e.g., 'troubleshooting common software issues', 'generating novel ideas for marketing campaigns', 'providing detailed itinerary suggestions based on user preferences']. Generate a starting sentence or two for the agent prompt that clearly establishes this role and expertise."

  2. Specify the Desired Tone and Style: "I want my agent to have a [describe the tone: e.g., 'friendly and approachable', 'formal and professional', 'enthusiastic and encouraging', 'calm and reassuring', 'concise and direct'] tone. Its communication style should be [describe the style: e.g., 'using simple language', 'using technical jargon appropriately', 'providing detailed explanations', 'offering concise summaries', 'asking clarifying questions']. Generate a few phrases or sentences that I can include in the agent prompt to enforce this tone and style."

  3. Outline Core Tasks and Capabilities: "My agent needs to be able to perform the following tasks: [list the core tasks, e.g., 'answer customer questions about product features', 'generate different creative text formats (poems, code, scripts, musical pieces, email, letters, etc.)', 'summarize factual topics or create stories', 'translate languages', 'write different kinds of creative content']. The agent should also have these capabilities: [list capabilities, e.g., 'access and process information from the real world through Google Search', 'use internal knowledge base documents', 'remember previous parts of the conversation']. Generate a section for the agent prompt that clearly outlines these tasks and capabilities."

  4. Define Constraints and Limitations: "My agent should not [list constraints, e.g., 'provide medical or financial advice', 'express personal opinions as facts', 'generate responses that are sexually suggestive, or exploit, abuse or endanger children', 'engage in political endorsements', 'share confidential information']. It is also limited by [list limitations, e.g., 'not having access to real-time stock prices', 'not being able to make phone calls', 'not knowing information after its last knowledge update']. Generate instructions for the agent prompt that clearly define these constraints and limitations."

  5. Specify Input Format and Expected Output: "The agent will receive input in the form of [describe the input format, e.g., 'natural language questions', 'structured data in JSON format', 'a combination of text and images', 'a specific command followed by parameters']. The desired output format is [describe the output format, e.g., 'a concise answer in plain text', 'a well-formatted report with headings and bullet points', 'a JSON object containing specific data fields', 'a table', 'a step-by-step guide']. Generate instructions for the agent prompt that specify the expected input and output formats."

  6. Handle Edge Cases and Errors: "If the agent encounters [describe an edge case or error condition, e.g., 'an ambiguous question', 'a request that violates its constraints', 'missing information', 'an unexpected input format'], it should [describe the desired behavior, e.g., 'ask clarifying questions', 'politely decline the request and explain why', 'provide a default response', 'attempt to recover gracefully and continue the conversation']. Generate instructions for the agent prompt that handle these specific edge cases and error conditions."

  7. Incorporate Persona and Personality (if applicable): "I want my agent to have a persona. Describe the persona in detail: [e.g., 'a wise old librarian', 'a quirky but helpful robot', 'a sophisticated travel concierge', 'a cheerful and energetic personal assistant']. Give specific personality traits: [e.g., 'patient and understanding', 'witty and humorous', 'knowledgeable and authoritative', 'empathetic and supportive']. Generate a few sentences that embody this persona and personality, and can be included in the opening of the agent prompt."

  8. Provide Examples of Good and Bad Interactions: "Give three examples of ideal interactions between a user and the agent, showing the agent successfully completing its tasks and adhering to its instructions. Then, give three examples of poor interactions, showing the agent failing to follow instructions, misunderstanding the user, or behaving inappropriately. These examples should cover a range of scenarios relevant to the agent's role. Use a conversational format (User: ... Agent: ...)."

  9. Iterative Refinement and Testing: "I have a draft agent prompt: [paste your current draft prompt here]. Analyze this prompt based on the principles of clarity, specificity, constraints, and desired behavior. Identify at least three areas where the prompt could be improved, and suggest specific revisions to address those weaknesses. Provide alternative phrasing options."

  10. Meta-Prompt for Prompt Generation: "I am creating an agent prompt. My goal is to build an agent that [briefly state the overall objective, e.g., 'automates customer support for an e-commerce website', 'helps users write compelling marketing copy', 'assists scientists with data analysis']. Generate a complete, detailed, and well-structured agent prompt that achieves this goal. The prompt should include sections for: Role, Expertise, Tone, Tasks, Constraints, Input/Output Format, Error Handling, and (if applicable) Persona. Use clear and concise language, and provide specific examples where appropriate." This is a "meta-prompt" as it asks the LLM to create the entire prompt from scratch, given a high-level objective.

No comments:

Post a Comment

Pocahontas County Court Records 1822-25

    Transcribe this pdf file.  There are 2 pages per image.  Output each page into a bullet list.  Leave a space between each bullet with ...