> For the complete documentation index, see [llms.txt](https://docs.myalice.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.myalice.ai/api-integration/raven/best-practices.md).

# 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.

<br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.myalice.ai/api-integration/raven/best-practices.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
