> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mithunai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How grounded answers and citations work

> Retrieval, grounding, citations and abstention: what happens between a question and an answer, and why the assistant says it does not know rather than guessing.

MITHUNAI answers a question in four steps. It **retrieves** the passages of your content most related to the question, **assesses** whether that evidence is strong enough, **generates** an answer from those passages, and returns it with a **citation** for each claim. When the evidence does not support an answer, the assistant abstains and says the content does not cover the question, rather than answering anyway.

Each step is described below, with the terms you will see in the console and the API.

```mermaid theme={"theme":{"light":"github-light","dark":"github-dark"}}
flowchart LR
    Q[Question] --> R[Retrieve passages<br/>from the assistant's knowledge]
    R --> A{Evidence strong<br/>enough?}
    A -- Yes --> G[Generate answer<br/>from the evidence]
    G --> C[Answer with citations]
    A -- No --> X[Abstain: say the content<br/>does not cover it]
```

## Retrieval

When a question arrives, MITHUNAI searches the knowledge attached to the assistant for the passages most related to it. The search is hybrid: a semantic search finds passages that mean the same thing even when they use different words, and a keyword search finds exact terms such as error codes, configuration names and file names. The two rankings are combined.

Retrieval only ever searches the assistant's own knowledge, inside your organisation. Nothing another organisation has ingested can be retrieved, whatever the question says.

## Grounding

The model is given the retrieved passages and asked to answer from them. MITHUNAI does not rely on that instruction alone. It assesses whether the evidence is strong enough to support an answer, and an answer the evidence does not support is not given.

This is why an assistant's instruction can change tone, format and audience, but cannot tell it to answer from general knowledge. Grounding is enforced by the platform, not by a setting.

## Citations

Every answer carries citations. Each one points at a passage that was actually retrieved, with:

| Field     | Meaning                                                                                                                                                 |
| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `title`   | The title of the source document                                                                                                                        |
| `url`     | Where the reader can open it                                                                                                                            |
| `anchor`  | The section within the document, when available                                                                                                         |
| `snippet` | The passage text that supports the answer                                                                                                               |
| `score`   | How relevant the passage was to the question. Higher is more relevant; use it for ranking, not as a probability                                         |
| `ordinal` | The citation number. The answer text marks each claim with `[n]`, numbered in order of first appearance, where `n` is the matching citation's `ordinal` |

Citations are built from the retrieved evidence, not written by the model, so they cannot point at a document that was never retrieved.

<Tip>
  Show citations to your users. Letting a reader verify an answer is most of what makes it
  trustworthy.
</Tip>

## Abstention

When your content does not support an answer, the assistant declines and says so. In the API this is a **successful** answer with `abstained: true` and no citations.

Treat an abstention as a correct result:

* Show it to the user as a normal reply, not as an error.
* Do not retry it automatically, and do not fall back to an ungrounded model call.
* Use it as a signal. The [unanswered questions report](/administration/analytics) lists what your users asked that your content does not cover.

An assistant that answers everything cannot be trusted on anything. Abstention is what makes the other answers worth reading.

## Conversations and turns

A **conversation** is an ongoing exchange with one assistant. Each question and its answer is a **turn**. Conversations are stored, so you can list, rename, archive and delete them.

A conversation handles one turn at a time. Asking a second question while the first is still being answered is refused with `409 conflict`; wait for the first turn to finish, or start another conversation.

Every turn ends in exactly one of three ways:

| Outcome     | Meaning                                                                             | Show the user                            |
| ----------- | ----------------------------------------------------------------------------------- | ---------------------------------------- |
| Completed   | An answer was produced, or the assistant abstained                                  | The answer or the abstention             |
| Interrupted | The answer stopped part-way, after some text was produced. The partial text is kept | The partial answer, marked as incomplete |
| Error       | Something failed before any answer text was produced                                | An error, and a way to retry             |

## Streaming

Answers can be delivered all at once or streamed as they are written, using server-sent events. Both deliver the same answer. See [Streaming](/api-reference/streaming).

## Where to go from here

Retrieval can only find what your content says clearly, so the largest lever on answer quality is the content itself: see [content best practices](/knowledge/content-best-practices). If you are weighing up whether the grounding really holds — whether it can fall back to the model's own knowledge, whether your content is used for training, whether another customer's data can reach your answers — those are answered in the [frequently asked questions](/resources/faq). If an assistant is abstaining on questions your content does cover, [troubleshooting](/resources/troubleshooting) works through the causes in order.
