> ## 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.

# Replacement Rules

> Learn how to define final transcript text replacements

Replacements provide the ability to define words or phrases that should be returned in place of the standard output by the speech-to-text model. Most common use case for this feature is abbreviation handling; however, it can also support formatting styles for keyterms and otherwise provide organizations or users control over how certain words and phrases should be returned.

<Card title="Feature availability:">
  <Columns cols={3}>
    <Card icon="circle-check" horizontal href="/stt/transcribe">
      /transcribe
    </Card>

    <Card icon="circle-check" horizontal href="/stt/streams">
      /streams
    </Card>

    <Card icon="circle-check" horizontal href="/stt/transcripts">
      /transcripts
    </Card>
  </Columns>

  <br />

  <Tip>
    Don’t like how Corti STT outputs certain words, phrases, or acronyms? Define `replacements` to have terms (single words or multi-word phrases) replaced in final text output with your preferred style.
  </Tip>
</Card>

***

## How It Works

Replacements are executed as a final step before returning transcript messages. This means are *not* present in interimResult transcripts and occur *after* command detection.

Replacement configuration is **case insensitive**, meaning defined casing is ignored and system will preserved casing of word being replaced. This is different than `keyterms`, which are case sensitive.

Word to be replaced must be a (case insensitive) exact match in order to match replacement rule. This means that "BID" and "B.I.D." would be two separate entries for replacement with "twice daily"; however, "bid" and B.I.d. would be considered equivalent to "BID" and "B.I.D.", respectively.

<Info>Replacement configuration is limited to 1,000 items per connection.</Info>

Replacements are made within the "text" entity of the "transcript" response; therefore, no special client-side handling should be required for receiving or handling of replacement text.

***

## Example Use Cases

| Find                       | Replace                  | Dictation                                                         | STT Output                                      |
| -------------------------- | ------------------------ | ----------------------------------------------------------------- | ----------------------------------------------- |
| `CKD`                      | `chronic kidney disease` | "The patient has CKD"                                             | "The patient has chronic kidney disease"        |
| `congestive heart failure` | `CHF`                    | "The patient has congestive heart failure"                        | "The patient has CHF"                           |
| `triple A`                 | `AAA`                    | "Triple A measuring two point five centimeters"                   | "AAA measuring 2.5 cm"                          |
| `QD`                       | `once daily`             | "Lisinopril twenty milligrams QD"                                 | "Lisinopril 20 mg once daily"                   |
| `Q.D.`                     | `once daily`             | "Lisinopril twenty milligrams QD"                                 | "Lisinopril 20 mg once daily"                   |
| `Roman one`                | `i`                      | "Roman one period type two diabetes mellitus"                     | "i. Type 2 diabetes mellitus"                   |
| `Roman two`                | `ii`                     | "Roman two period hypertension"                                   | "ii. Hypertension"                              |
| `Roman three`              | `iii`                    | "Roman three period hyperlipidemia"                               | "iii. Hyperlipidemia"                           |
| `Firstly`                  | `1. `                    | "Firstly type two diabetes mellitus comma well controlled period" | "1. Type 2 diabetes mellitus, well controlled." |

<Note>
  Use of replacements is **optional** for dictation configuration. Please [contact us](https://help.corti.app) to report errors, or for more information on this feature.
</Note>
