Best practices for defining goals

This section outlines best practices for writing goal prompts for the AI Agent that uses Large Language Models (LLMs) and actions to fulfill user intents. The AI Agent supports two types of actions—Slot filling and Slot filling with fulfillment. Each slot represents a step in fulfilling the user's intent.

The goal prompt should provide a clear direction for the AI Agent's purpose without delving into specifics. The details of how to achieve the goal, including sources, destinations, dates, or other specific information, is handled by the individual actions and their slot-filling processes.

Practices to adopt

  • Keep the goal general and broad.
  • Focus on the overall function or purpose of the Agent.
  • Use action verbs to describe the agent's primary function.
  • Consider the result or benefit for the user.
  • Use clear and concise language.
  • Ensure that the goal aligns with the actions and capabilities of the agent.

Good Examples

  • Helping users book flights
  • Assisting with restaurant reservations
  • Providing weather forecasts
  • Managing personal task lists

Practices to avoid

  • Don't include specific details like locations, dates, or user information.
  • Avoid mentioning particular actions or implementation methods.
  • Don't use technical jargon or complex terminology.
  • Avoid overly long or complicated goal statements.
  • Don't include multiple unrelated goals in a single prompt.
  • Avoid using ambiguous or vague language.

Bad Examples

  • Helping users book a flight from Los Angeles to San Francisco on July 15 (too specific)
  • Using a flight booking API to reserve seats on an airplane (mentions implementation details)
  • Booking flights, making hotel reservations, and renting cars (multiple unrelated goals)
  • Using natural language processing to understand user queries about flight bookings (too technical)
  • Doing stuff related to travel (too vague)

Best practices for defining instructions

You should provide LLM-powered agents with clear and actionable instructions to ensure they perform their tasks accurately and efficiently. This section outlines best practices in a Do's and Don'ts format to guide you in writing instructions for LLM-powered agents. These agents use integrated tools for tasks such as appointment booking, customer support, and other chat/voice-based interactions.

Practices to adopt

  • Be specific and clear

    • Clearly define the task that the agent needs to perform.
    • Use straightforward and easily understandable language.

  • Provide step-by-step instructions

    • Break down tasks into smaller, manageable steps.
    • Ensure that steps follow a logical order.

  • Include contextual awareness

    • Provide context to help the agent understand the task.
    • Tailor instructions to enhance the user experience.
  • Specify tool utilization

    • Clearly indicate which tools to use.
    • Provide detailed instructions on tool usage.

  • Plan for error handling

    • Include instructions for handling common errors.
    • Provide fallback options.

  • Engage users

    • Include instructions on user interaction.
    • Ensure the agent confirms actions and seeks feedback.

  • Ensure adaptability

    • Allow for adjustments based on user input.
    • Encourage continuous improvement.

  • Adhere to Ethical Considerations

    • Ensure compliance with ethical guidelines and regulations.
    • Include measures to mitigate potential biases.

Good Examples

  • Appointment booking—Ask the user for their preferred appointment date and time. Use the calendar tool to check availability. If available, book the appointment and confirm the details with the user. If not available, suggest the next available time slot.

  • Customer support—Greet the user and ask for their query. If the query is about a password reset, guide them through the reset process using the authentication tool. Confirm the reset and ask if they need any further assistance.

  • Feedback collection— After completing the interaction, ask the user to rate their experience on a scale of 1–5. Log the feedback and thank the user for their input.

Practices to avoid

  • Avoid vague instructions—Use ambiguous language.

  • Skip steps—Assume the agent infers steps.

  • Ignore context—Provide instructions without context.

  • Neglect tool details—Fail to specify which tools to use.

  • Overlook error handling—Ignore potential errors.

  • Disregard user interaction—Skip user engagement steps.

  • Be inflexible—Provide rigid instructions that don't allow for changes.

  • Ignore ethical guidelines—Overlook compliance and bias mitigation.

  • Avoid using contradictory instructions—We shouldn’t use contradictory instructions (that confuse the agent).

Bad examples

  • Appointment booking

    • Handle customer requests (too vague).
    • Just book the appointment (without specifying how).

  • Customer support

    • Help the user (too vague).
    • Reset the password (without confirming user identity).

  • Feedback collection

    • Get feedback (too vague).
    • Ask if they liked it (without a structured rating system).