> For the complete documentation index, see [llms.txt](https://constructor-chat.gitbook.io/botmetrica-api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://constructor-chat.gitbook.io/botmetrica-api-docs/how-it-works.md).

# How it works

## LLM-as-a-judge

BotMetrica automatically analyzes AI agent’s conversations with users, detects issues, and classifies them using predefined tags.\
Our LLM judge attaches tags to specific messages and explains **why** each tag was applied.

<figure><img src="/files/uGLnsFRuzt8OjCIT9WWz" alt=""><figcaption><p>The judge sees the AI agent’s context (e.g. retrieved information from a database) as well as the whole conversation</p></figcaption></figure>

### Labeling Reliability

**Key advantage:** automated analysis identifies **more issues with higher accuracy** than manual review.\
At the same time, the **distribution of error types closely matches human labeling**, ensuring consistency and trustworthiness.

<figure><img src="/files/wwKwUGrni76APegBsLde" alt=""><figcaption><p>You can see the reasoning and specific quoted parts of the message on each automatically found issue</p></figcaption></figure>

## Labeling speed comparison

Example from one of our clients: **467 conversations — one month of traffic**

* **Manual human review:** \~11 hours
* **AI review:**\
  \~10 minutes — more than **65 times faster**
  * Finer-grained tagging
  * More detected events and issues
  * Structure comparable to manual labeling
  * Stable, repeatable results across different samples


---

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

```
GET https://constructor-chat.gitbook.io/botmetrica-api-docs/how-it-works.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
