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

# Narrowing

> How a vague reference narrows, turn by turn, to the one place the user means.

A user rarely names a place exactly. "A cafe near here" is the start of a
short conversation: several cafes match, the user picks one, and the next
turn can build on that pick. Kviria is built around that conversation.

```text theme={null}
"is there a cafe near here"          search, kind cafe      -> many  (Stable Cafe 8 m, Rite Spot Cafe 59 m, Robin's Cafe 102 m)
"the second one"                     pick 2                 -> one   (Rite Spot Cafe)
"what's across the street from it"   across, place its ref  -> the places across from Rite Spot Cafe
```

## Each turn

On each turn your agent sends the request it parsed from the user's words,
with the `state` from the last response. The state holds what was listed,
what is waiting for a yes or no, the places settled earlier and the street
being discussed. The request says what the user is asking for:

* a kind of place ("a cafe", "somewhere to eat");
* a place by name;
* an address ("2128 Folsom Street");
* a pick from the list it just gave ("the second one", "the Rite Spot
  one");
* a yes or no to the place it asked about;
* a place relative to another one: near it, across the street from it, or
  next door to it;
* the places at a street corner, or the corner itself;
* what is on a street, or at the end of it;

Kviria then finds the answer in its map data and returns one decision.
Your agent asks the user the question the decision calls for, and sends
the user's answer as the next call. The move for each decision is in
[Add Kviria to your agent](https://docs.kviria.com/guides/add-to-your-agent.md).

The conversation is over when the place is settled. A `one` carries the
place's `location`, and so does each candidate on `many`. Only a place
waiting for a yes, `one_unconfirmed`, comes without one.

## What Kviria does not do

* It does not choose between equals. When two places match the words
  equally, both come back and the user picks.
* It has no view on quality. Places are ordered by distance or by their
  position along the street, and Kviria keeps no ratings. "Which one is
  better?" is your agent's to answer from the facts it holds, or to
  decline.
* It does not count buildings. "The third building on this street" has no
  fixed starting point, and no request type for it. Ask the user for a
  name or a number instead.
* It does not write replies. The answers are decisions and facts. The
  wording is your agent's, in your voice and your user's language.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.