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

# ASR biasing

> Configure flow steps to improve speech recognition accuracy for structured inputs like codes and names.

<Info>
  **This page covers flow-level ASR configuration.** For dynamic ASR biasing from Python functions, see [`conv.set_asr_biasing()`](/tools/classes/conv-object). Setting up ASR biasing in the flow editor does not require code.
</Info>

Automatic Speech Recognition (ASR) biasing helps the agent better understand the type of input it expects in each step. It nudges transcription toward expected patterns — like confirmation codes, personal names, or dates — instead of treating every utterance as free text.

Enable it on any **flow step** that collects structured input.

## When to use it

<CardGroup cols={3}>
  <Card title="Structured input" icon="hashtag">
    The user is likely to say a booking code, date, or other structured value.
  </Card>

  <Card title="Frequent misrecognitions" icon="triangle-exclamation">
    You see transcription errors on names, codes, or numbers.
  </Card>

  <Card title="Unclear audio" icon="volume-low">
    The agent is guessing incorrectly from noisy or accented audio.
  </Card>
</CardGroup>

## Bias options

Pick the bias that matches what the user is about to say — not the wording of the prompt.

| Option            | Use for                                    | Example utterance                  |
| ----------------- | ------------------------------------------ | ---------------------------------- |
| **Alphanumeric**  | Booking references, confirmation codes     | *"X9C7G2"*                         |
| **Name**          | Full personal names — first, last, or both | *"Aaron Forinton"*                 |
| **Name spelling** | Phonetically spelled names                 | *"A for apple, R for Robert…"*     |
| **Numeric**       | Ages, short numbers                        | *"forty-two"*                      |
| **Party size**    | Group bookings                             | *"a table for four"*               |
| **Precise date**  | Specific calendar dates                    | *"March 14th"*                     |
| **Relative date** | Flexible time references                   | *"next Tuesday"*, *"in two weeks"* |
| **Single number** | One-digit responses, menu selection        | *"press 1"* / *"one"*              |
| **Time**          | Spoken times                               | *"half past eight"*                |
| **Yes/No**        | Confirmation responses                     | *"yeah, that's right"*             |
| **Address**       | Location names, postcodes, street numbers  | *"221B Baker Street, NW1 6XE"*     |

Custom keyword fields can also be added to bias transcription toward domain-specific vocabulary — product names, menu items, medical terms, and so on.

<Tip>
  Steps with ASR biasing already applied are marked with the <Icon icon="ear" iconType="solid" /> ear icon in the Flow Editor.
</Tip>

## Configure it on a step

<Steps>
  <Step title="Open the step editor">
    In the Flow Editor, select the step where you want to bias transcription and open the step editor on the right.

    <img src="https://mintcdn.com/polyai/Qu880HppNqT19Eyr/images/flows/asr-opened.png?fit=max&auto=format&n=Qu880HppNqT19Eyr&q=85&s=1a6aedc1ecd0675e70c392e707df1042" alt="ASR biasing panel" width="1722" height="1620" data-path="images/flows/asr-opened.png" />
  </Step>

  <Step title="Pick the input type">
    In the **ASR biasing** panel, toggle on the option that matches what the user is expected to say (see the table above).
  </Step>

  <Step title="Add custom keywords (optional)">
    Add domain-specific vocabulary as custom keywords — product names, menu items, dish names, medical terms. Bias applies on top of the selected input type.
  </Step>

  <Step title="Test with real voice input">
    Place a test call and confirm the transcription matches what was said. Iterate on the bias type and keywords if not.
  </Step>
</Steps>

## Example: confirmation code capture

In the [reservation confirmation flow example](./example#e-asr-biasing), the agent collects a booking code. Users say mixed letters and numbers, so **Alphanumeric** biasing is toggled on — this raises the likelihood that utterances like *"X9C7G2"* are transcribed accurately instead of being interpreted as ordinary words.

<Tip>
  **Combine with [few-shot prompting](./few-shot-prompting)** when the input format is ambiguous — for example, when users might say a code as *"X nine C seven G two"* or *"X9C7G2"* interchangeably. Bias handles the acoustic model, few-shot prompting handles the LLM's interpretation of the result.
</Tip>

<Warning>
  Match the bias to the expected **input**, not the wording of the prompt. Biasing a "yes/no" prompt with **Alphanumeric** hurts recognition of *"yes"* and *"no"*.
</Warning>
