# Improve ASR accuracy with keywords (/en/ai/platform/build/shape-the-conversation/asr-keywords)

> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).

> Documentation: Conversational AI.
> Documentation version: Preview.
> This document describes only this version. [Version index](/llms/doc-versions-convoai-guides-v2.txt).


In a conversational AI scenario, users may say non-dictionary words such as brand names, product names, personal names, place names, or industry-specific terms. To improve recognition accuracy for these terms, configure ASR keywords in the agent's `asr` block.

> **Info**
>
> The ASR `keywords` described on this page apply only to [ARES](/en/ai/platform/models/asr/ares). Other ASR vendors have their own settings for this, for example `keyterm` for [Deepgram](/en/ai/platform/models/asr/deepgram).

## Prerequisites

Before you begin, make sure that you have created an agent and started a session as described in [Create an agent and start a session](/en/ai/platform/get-started/start-stop-agent).

## Configure ASR keywords

When you [create](/en/api-reference/api-ref/conversational-ai/platform/create-agent) or [update](/en/api-reference/api-ref/conversational-ai/platform/update-agent) an agent, pass the keywords in its ARES configuration. The following example adds three product terms as ARES keywords:

**Python SDK**

Pass the keywords to `AresSTT`:

```python
from agora_agent import Agent, AresSTT

# client is your configured Agora client
agent = (
    Agent(client=client)
    .with_stt(AresSTT(keywords=["Agora", "Conversational AI", "RTC"]))
    .with_llm(...)  # configure your LLM vendor
    .with_tts(...)  # configure your TTS vendor
)
```

**TypeScript SDK**

Pass the keywords to `AresSTT`:

```ts
import { Agent, AresSTT } from 'agora-agents';

// client is your configured Agora client
const agent = new Agent({ client })
  .withStt(new AresSTT({ keywords: ['Agora', 'Conversational AI', 'RTC'] }))
  .withLlm(/* configure your LLM vendor */)
  .withTts(/* configure your TTS vendor */);
```

**Go SDK**

Pass the keywords to `NewAresSTT`:

```go
// client is your configured Agora client
agent := agentkit.NewAgent(client).
	WithStt(vendors.NewAresSTT(vendors.AresSTTOptions{
		Keywords: []string{"Agora", "Conversational AI", "RTC"},
	})).
	WithLlm( /* configure your LLM vendor */ ).
	WithTts( /* configure your TTS vendor */ )
```

**REST API**

Pass the keywords in `params.keywords` of the agent's `asr` block:

```json
"pipeline": {
  "asr": {
    "credential": { "mode": "managed" },
    "vendor": "ares",
    "language": "en-US",
    "params": {
      "keywords": [
        "Agora",
        "Conversational AI",
        "RTC"
      ]
    }
  }
}
```

You can configure up to 128 keywords.

## ASR keywords versus keyword interruption

ASR keywords and keyword interruption are separate features, and each uses its own list of keywords:

| Feature              | Configuration field                             | Purpose                                                                                                                                                                                                   |
| :------------------- | :---------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ASR keywords         | `pipeline.asr.params.keywords`                  | Improves speech recognition accuracy for specific terms.                                                                                                                                                  |
| Keyword interruption | `pipeline.turn_detection.interruption.keywords` | Interrupts the agent only when the user says one of the keywords. For details, see [Interrupt only on keywords](/en/ai/platform/build/shape-the-conversation/interrupt-agent#interrupt-only-on-keywords). |

## Best practices

Keep the following tips in mind when choosing keywords:

- Prioritize brand names, product names, personal names, place names, model numbers, and abbreviations that are prone to misrecognition.
- Avoid configuring too many common words, short words, or generic terms, such as "okay" or "start".
- For mixed-language scenarios, you can configure terms in multiple languages together, such as a product's name in its local language, its English name, and its abbreviation.
- Before going live, validate recognition results with real production audio, and check both the target keywords and similar-sounding words.

## Reference

For more information, see the following pages:

- [ARES](/en/ai/platform/models/asr/ares)
- [Interrupt the agent mid-response](/en/ai/platform/build/shape-the-conversation/interrupt-agent)

### API reference

- [Create an agent](/en/api-reference/api-ref/conversational-ai/platform/create-agent)
- [Update an agent](/en/api-reference/api-ref/conversational-ai/platform/update-agent)
