> For the complete documentation index, see [llms.txt](https://docs.raga.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.raga.ai/ragaai-catalyst/ragaai-metric-library/chat-metrics/agent-quality.md).

# Agent Quality Chat Metric

The Agent Quality metric evaluates the accuracy, relevance, and contextual alignment of responses generated by the conversational agent in a chat use case. This metric assesses whether the agent’s responses fulfill the user's intent, maintain engagement, and provide appropriate and coherent replies within the conversation flow. An LLM is used as an evaluator to determine if the agent’s responses meet quality and engagement standards for an effective chat interaction.

#### Required Column in Dataset:

* **Chat**: A single column containing both user prompts and the agent’s generated responses in a sequential format, capturing the full conversation context.

#### Interpretation:

A higher Agent Quality score suggests that the agent's responses are more contextually appropriate, aligned with the user’s intent, and contribute positively to the conversation's flow. This metric reflects the agent’s ability to maintain high-quality interactions in chat settings.

#### Metric Execution via UI:

To execute this metric, select **Agent Quality** from the list of metrics in the UI and configure evaluation settings to assess responses within the conversation sequence.

#### Example:

* **Chat**:
  * **User**: “Can you help me find a good Italian restaurant nearby?”
  * **Agent Response**: “Sure! There’s a highly-rated Italian restaurant nearby called ‘La Dolce Vita,’ known for its authentic pasta and friendly atmosphere.”
* **Metric Score**: 0.95\
  **Reasoning**: The agent’s response is accurate, aligns with the user’s intent, and provides a helpful recommendation. The response includes specific details about the restaurant, contributing positively to user engagement in the conversation.


---

# 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.raga.ai/ragaai-catalyst/ragaai-metric-library/chat-metrics/agent-quality.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.
