# Debiasing, escape and abstain

> How Curva keeps LLM answers stable and safe to automate: option-order debiasing, an escape option, abstain thresholds and prompt-injection hardening.

Source: https://docs.tarkova.com/curva/concepts/trust/

Three mechanisms keep answers stable and let you decide what to automate.

## Order debiasing

Language models tend to favour options by position, for example the first one listed. Curva
asks every question twice, concurrently, with the options in their original and in reversed order,
and averages the two. Position bias cancels out.

- On by default (`debias: true`).
- Costs two model calls per decision instead of one. `debias: false` halves the calls, at the
  price of keeping any position bias.
- Few-shot [examples](/curva/guides/explain/#few-shot-examples) are remapped when the options are
  reversed, so they stay correct.

In a live probe (4 tickets × 2 option orders), no answer changed when the options were reordered.

## Escape option

A Choice question gets an extra option, `none_of_these`, by default. Without it, a model shown a
ticket that fits no team has to pick one anyway, often with high confidence. With it, the honest
answer is available, and you can route it to a human.

- On by default for Choice (`escape: true`). Set `"escape": false` to disable it.
- The key `none_of_these` is reserved.

## Abstain

Set `min_confidence` on a Choice or Score question, and answers below it come back with
`abstain: true`:

```python
from curva import Choice
Choice("Which team?", ["billing", "technical"], min_confidence=0.8)
```

```python
answer = d["team"]
if answer.abstain:
    send_to_human(ticket)
else:
    route(ticket, answer.choice)
```

`abstain` is only present when the question set `min_confidence`. Combined with
[calibration](/curva/concepts/calibration/), the threshold has a real meaning: automate the answers that are
right at least as often as you need, and hand the rest to people.

## Injection hardening

The state is wrapped in a fenced block and the model is told it is data, not instructions. Any
closing fence inside the data is escaped, and the fence is matched case-insensitively. Curva's
eval suite includes an adversarial set of injected inputs to track this.
