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

# Questions and validation

> Question types, their validations, and how the agent re-asks on invalid answers

Questions capture the patient's answers. Each question has a type that determines how the answer is interpreted and validated.

<img src="https://mintcdn.com/omniloy/Q9jZm4-SeFtgd8-M/images/olivia/question-editor.png?fit=max&auto=format&n=Q9jZm4-SeFtgd8-M&q=85&s=fe0aa11e3000da1b12141dc3791cfc61" alt="Question editor" width="1687" height="1080" data-path="images/olivia/question-editor.png" />

## Question types

There are five base types:

| Type                | Use                                |
| ------------------- | ---------------------------------- |
| **Text**            | Free-form answer                   |
| **Numeric**         | A number (e.g. a 0–10 scale)       |
| **Boolean**         | Yes / No                           |
| **Multiple choice** | One or several options from a list |
| **Date**            | A date                             |

<Note>
  The builder also offers two convenience variants: **single select** (multiple choice limited to one option) and **rating** (numeric with a 3, 5, 7, or 10 scale). Internally they are stored as multiple choice and numeric.
</Note>

## Validation by type

| Type            | Available validations                                      |
| --------------- | ---------------------------------------------------------- |
| Numeric         | minimum and maximum, integer, unit (default range is 0–10) |
| Text            | min/max length (up to 2000), **email** or **phone** format |
| Date            | minimum and maximum date                                   |
| Multiple choice | minimum and maximum number of selected options             |
| All             | mark the question as **required**                          |

Each option of a multiple-choice question can carry a **weight**, which feeds [scoring](/olivia/en/riesgo) (an option with no weight contributes 0).

<Note>
  For text, the formats the agent recognizes and validates during the call are **email** and **phone**.
</Note>

## Re-asking on invalid answers

There is no separate "verification" toggle — re-asking is driven by validation. When the patient answers, the agent validates the value against the type's rules. If it is invalid —wrong type, out of range, format mismatch—, **the answer is not saved** and the agent asks again, clarifying what it needs, until it gets a valid answer.
