You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: fern/customization/custom-keywords.mdx
+48-27Lines changed: 48 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,78 +18,99 @@ Keyword boosting is beneficial for:
18
18
### Important Notes
19
19
20
20
- Keywords should be uncommon words or proper nouns not frequently recognized by the model.
21
-
-Custom model training is the most effective way to ensure accurate keyword recognition.
22
-
-For more than 50 keywords, consider custom model training by contacting Deepgram.
21
+
-Use single words for `keywords` (no spaces or punctuation). For multi-word phrases, use `keyterm` instead.
22
+
-Custom model training is the most effective way to ensure accurate keyword recognition when you need extensive vocabulary coverage.
23
23
24
24
## Enabling Keyword Boosting in Vapi
25
25
26
26
### API Call Integration
27
27
28
-
To enable keyword boosting, you need to add a`keywords` parameter to your Vapi assistant's transcriber section. This parameter should include the keywords and their respective intensifiers.
28
+
To enable keyword boosting, add the`keywords` parameter to your assistant's `transcriber` configuration when using the Deepgram provider. You can also supply `keyterm` to boost recall for phrases.
29
29
30
30
### Example of POST Request
31
31
32
32
To create an assistant with keyword boosting enabled, you can make the following POST request to Vapi:
33
33
34
34
```bash
35
-
bashCopy code
36
35
curl \
37
36
--request POST \
38
37
--header 'Authorization: Bearer <token>' \
39
38
--header 'Content-Type: application/json' \
40
39
--data '{
41
40
"name": "Emma",
42
41
"model": {
43
-
"model": "gpt-4o",
44
-
"provider": "openai"
42
+
"model": "gpt-4o",
43
+
"provider": "openai"
45
44
},
46
45
"voice": {
47
-
"voiceId": "emma",
48
-
"provider": "azure"
46
+
"voiceId": "emma",
47
+
"provider": "azure"
49
48
},
50
49
"transcriber": {
51
-
"provider": "deepgram",
52
-
"model": "nova-2",
53
-
"language": "bg",
54
-
"smartFormat": true,
55
-
"keywords": [
56
-
"snuffleupagus:1"
57
-
]
50
+
"provider": "deepgram",
51
+
"model": "nova-2",
52
+
"language": "en",
53
+
"smartFormat": true,
54
+
"keywords": [
55
+
"snuffleupagus:5",
56
+
"systrom",
57
+
"krieger"
58
+
],
59
+
"keyterm": [
60
+
"order number",
61
+
"account ID",
62
+
"PCI compliance"
63
+
]
58
64
},
59
65
"firstMessage": "Hi, I am Emma, what is your name?",
60
66
"firstMessageMode": "assistant-speaks-first"
61
67
}' \
62
68
https://api.vapi.ai/assistant
63
-
64
69
```
65
70
66
71
In this configuration:
67
72
68
73
-**name**: The name of the assistant.
69
74
-**model**: Specifies the model and provider for the assistant's conversational capabilities.
70
75
-**voice**: Specifies the voice and provider for the assistant's speech.
71
-
-**transcriber**: Specifies Deepgram as the transcription provider, along with the model, language, smart formatting, and keywords for boosting.
76
+
-**transcriber**: Specifies Deepgram as the transcription provider, along with the model, language, smart formatting, and both `keywords` (single words) and `keyterm` (phrases) for boosting.
72
77
-**firstMessage**: The initial message the assistant will speak.
73
78
-**firstMessageMode**: Specifies that the assistant speaks first.
74
79
75
-
### Intensifiers
80
+
### Format and intensifiers
81
+
82
+
The `keywords` array accepts single-word tokens consisting of letters and digits, with an optional integer intensifier after a colon:
76
83
77
-
Intensifiers are exponential factors that boost or suppress the likelihood of the specified keyword being recognized. The default intensifier is `1`. Higher values increase the likelihood, while `0` is equivalent to not specifying a keyword.
84
+
- Accepted forms: `apple`, `apple:3`, `apple:-2`
85
+
- Not accepted: `order number` (use `keyterm`), `hello-world`, `foo_bar`, `rate:1.5` (decimals are not supported by this schema)
86
+
87
+
Intensifiers are exponential factors that boost or suppress the likelihood of the specified keyword being recognized. The default intensifier is `1`. Higher values increase the likelihood, while `0` is equivalent to not specifying a keyword. Negative values suppress recognition.
78
88
79
89
-**Boosting Example:**`keywords=snuffleupagus:5`
80
90
-**Suppressing Example:**`keywords=kansas:-10`
81
91
82
-
### Best Practices for Keyword Boosting
92
+
### Keyterm prompting (phrases)
93
+
94
+
Deepgram's Keyterm Prompting improves Keyword Recall Rate (KRR) for important keyterms or phrases. Use `keyterm` for multi‑word phrases you want the model to detect more reliably. Unlike `keywords`, keyterms are specified as plain strings without intensifiers.
83
95
84
-
1.**Send Uncommon Keywords:** Focus on keywords not successfully transcribed by the model.
- API reference: Deepgram transcriber `keywords` and `keyterm` in the [API reference](https://api.vapi.ai/api#:~:text=DeepgramTranscriber)
94
115
95
116
By following these guidelines, you can effectively utilize Deepgram's keyword boosting feature within your Vapi assistant, ensuring enhanced transcription accuracy for specialized terminology and uncommon proper nouns.
0 commit comments