The five steps of an answer
Every time a customer says something, a Duvi agent runs the same five steps in order.
| Step | What happens | You control |
|---|---|---|
| Heard | Text arrives from the widget, from WhatsApp, or from a call as it is spoken. | The channel |
| Looked up | Duvi matches the question against your indexed knowledge and pulls only the passages that match. | Knowledge |
| Assembled | Duvi combines the system prompt, the recent turns and those passages into one request to the model. | Prompt and model |
| Acted on | If an action answers better than words, the agent calls it and waits for your endpoint. | Tools |
| Answered | The reply streams back as text, or is spoken in the agent voice. | Voice |
The middle three steps do the work, and that work is what you pay for. This is why the rest of these docs keep returning to the same shape: keep behaviour in the prompt, keep facts in knowledge, and let retrieval decide what the model sees.
Why facts belong in knowledge
When you save knowledge, Duvi reads every source from the start, splits it into passages, and stores each passage next to a numeric fingerprint of its meaning. Duvi gives a question the same treatment and pulls the passages whose fingerprints sit closest to it.
A price list of four hundred rows therefore costs nothing extra to keep in knowledge, because only the rows that match the question ever reach the model. The same four hundred rows pasted into the system prompt are sent on every exchange, to every customer, whether they asked about prices or opening hours.
| Belongs in knowledge | Belongs in the prompt |
|---|---|
| Prices, plans and what is included | Who the agent is talking to |
| Policies, warranties, returns | What it must never say |
| Opening hours and locations | When to take details instead of guessing |
| Manuals and specification sheets | Tone, length and language |
| Anything that changes without you | Which source wins when two disagree |
What happens during a reindex
Saving a knowledge change does not take the agent offline. The existing index keeps answering until the new one is complete, then Duvi swaps them at once. If a source fails to read, Duvi replaces nothing and the agent carries on with the index it had. There is no partial state: an agent never answers from half your content.
When an agent calls a tool instead
An order status, a slot availability or an account balance cannot live in an index, because they change while the conversation is happening. Actions cover those.
The agent decides to call an action by reading its description, so write the description for the agent rather than for yourself. You fix everything else in advance: the endpoint, the headers, and where each value comes from. The agent chooses when to call, never what to send.
See HTTP actions for every field, and Value sources for the setting that stops one customer reading another customer record.