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

# Bias recognition with keyterms

> Configure and manage a custom vocabulary that biases speech recognition toward your domain terms

<iframe className="w-full aspect-video rounded-xl" src="https://www.youtube.com/embed/d6WKOaS9_Ts?start=290&end=345" title="Bias Recognition with Keyterms — walkthrough" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowFullScreen />

<Info>
  **Follow along with the runnable example.** This guide walks through the [Dictionary terms example](https://github.com/corticph/corti-examples/tree/main/sdk/typescript/applets/src/applets/dictionary-terms) in `corti-examples` — bootstrap your build from it or use it as reference.
</Info>

Keyterms bias speech recognition toward a **custom vocabulary** — drug names, proper nouns, acronyms, and other domain terms the model may not otherwise get right. Unlike [replacements](/stt/guides/dictation-replacements), which rewrite the *final* text, keyterms act *before* transcription to make the model more likely to produce the term in the first place.

This guide shows how to configure keyterms through the [Dictation Web Component](/sdk/dictation/overview) and manage a reusable term set.

<Note>
  For how keyterms behave — case-sensitivity, the per-connection and per-term limits, and roadmap — see the [Custom Dictionary Keyterms](/stt/keyterms) reference. This page focuses on wiring them into your app.
</Note>

***

## Configure keyterms

Add a `keyterms` object to your `dictationConfig`. Its `terms` array holds one `{ term }` entry per word or phrase.

<Warning>
  `dictationConfig` is an object, so it must be set as a **JavaScript property** — not an HTML attribute. Rebuild and reassign the config when your term set changes; it re-applies on the next connection.
</Warning>

Keyterms are **case-sensitive**, so define each term with the casing you want preserved (e.g. `"Corti"`, not `"corti"`). Each term is limited to 50 characters, with up to 1,000 terms per connection — see the [reference](/stt/keyterms) for details.

***

## Manage a term set

As with replacements, terms usually come from a catalog plus user-defined entries. Model each with a stable `id` so it can be edited, removed, or protected, then derive the config from the active set.

```ts title="JavaScript" theme={null}
interface Term {
  id: string;
  term: string;
  builtin?: boolean; // protect catalog entries from deletion
}

// A small medical starter catalog.
const CATALOG: Term[] = [
  { id: "t-corti",        term: "Corti",        builtin: true },
  { id: "t-lisinopril",   term: "lisinopril",   builtin: true },
  { id: "t-metformin",    term: "metformin",    builtin: true },
  { id: "t-atorvastatin", term: "atorvastatin", builtin: true },
];

// Derive the config from the active terms.
function buildKeytermsConfig(primaryLanguage: string, items: Term[]) {
  return {
    primaryLanguage,
    keyterms: { terms: items.map(({ term }) => ({ term })) },
  };
}
```

<Tip>
  Persist a user's term set per **API client** (e.g. keyed by `clientId:tenant`) so their vocabulary follows them across sessions without leaking between tenants.
</Tip>

***

## Export and share a term set

To move a term set between environments or check it into source control, serialize it in the config shape so it round-trips cleanly:

```json title="corti-terms.json" theme={null}
{
  "type": "config",
  "configuration": {
    "keyterms": {
      "terms": [
        { "term": "Corti" },
        { "term": "lisinopril" }
      ]
    }
  }
}
```

***

## Next steps

<CardGroup cols={2}>
  <Card title="Custom Dictionary Keyterms" icon="spell-check" href="/stt/keyterms">
    Case-sensitivity, limits, and roadmap for the keyterms feature.
  </Card>

  <Card title="Commands" icon="wand-magic-sparkles" href="/stt/guides/dictation-commands">
    Turn spoken command phrases into real editor actions.
  </Card>

  <Card title="Example code" icon="github" href="https://github.com/corticph/corti-examples/tree/main/sdk/typescript/applets/src/applets/dictionary-terms">
    The complete, runnable Dictionary terms example in `corti-examples`.
  </Card>
</CardGroup>

<Note>Please [contact us](mailto:help@corti.ai) for help or questions.</Note>
