Best Practices

Define the Agent’s Role

  • Clearly state who or what the agent is and what domain it operates in.

  • Example: “You are an expert travel planner specializing in budget-friendly vacations.”

Provide Context

  • Summarize any background, policies, or constraints before asking the question.

  • Example: “We are developing marketing copy for eco-friendly products aimed at millennials. The tone should be positive and inspiring.”

Be Specific with the Request

  • Specify exactly what you want: the format, style, or depth of the answer.

  • Example: “Help the User with their grievances and Resolutions in a brief but informative manner.”

Use Step-by-Step Instructions

  • Guide the AI with a clear, ordered approach to how it should think or respond.

  • Example: “First, identify the main issue. Next, evaluate possible solutions. Finally, recommend one with clear justifications.”

Provide Examples or “Few-Shot” Demonstrations

  • When possible, give examples of good outputs (and optionally, subpar outputs). This shows the AI the style and quality you expect.

  • Example: “Here are two examples of well-structured product descriptions. Follow a similar tone and structure.”

Encourage Clarification When Needed

  • Tell the AI to ask for more information if certain details are missing.

  • Example: “If you are unsure about the product’s color variants, ask a clarifying question.”

Include Constraints and Policies

  • Clearly state if there are any constraints, such as length limits, style guidelines, or compliance rules (privacy, brand voice, etc.).

  • Example: “Your answer must be fewer than 500 words, follow the Oxford style guide, and avoid any confidential data.”

Use Tool/Function “Placeholders” Where Applicable

  • If the agent can call tools or functions, specify what they are for and how they should be used.

  • Example: “Use <OrderLookupTool> to get the order status and <StockChecker> to verify inventory.”

Iterate and Refine (Multi-Shot Prompting)

  • If the response is not as desired, provide additional instructions or clarifications in subsequent prompts, refining step by step.

Last updated

Was this helpful?