Deepgram Keywords and Keyterm Prompting
Vapi allows you to improve the accuracy of your transcriptions by leveraging Deepgram’s keyword boosting feature. This is particularly useful when dealing with specialized terminology or uncommon proper nouns. By providing specific keywords to the Deepgram model, you can enhance transcription quality directly through Vapi.
Why Use Keyword Boosting?
Keyword boosting is beneficial for:
- Enhancing the recognition of specialized terms and proper nouns.
- Improving transcription accuracy without the need for a custom-trained model.
- Quickly updating the model’s vocabulary with new or uncommon words.
Important Notes
- Keywords should be uncommon words or proper nouns not frequently recognized by the model.
- Use single words for
keywords
(no spaces or punctuation). For multi-word phrases, usekeyterm
instead. - Custom model training is the most effective way to ensure accurate keyword recognition when you need extensive vocabulary coverage.
Model support
- Keywords is available on Deepgram Nova-2, Nova-1, Enhanced, and Base speech-to-text models.
- For Nova-3 models, use Keyterm Prompting instead of Keywords.
Enabling Keyword Boosting in Vapi
API Call Integration
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.
Example of POST Request
To create an assistant with keyword boosting enabled, you can make the following POST request to Vapi:
In this configuration:
- name: The name of the assistant.
- model: Specifies the model and provider for the assistant’s conversational capabilities.
- voice: Specifies the voice and provider for the assistant’s speech.
- transcriber: Specifies Deepgram as the transcription provider, along with the model, language, smart formatting, and both
keywords
(single words) andkeyterm
(phrases) for boosting. - firstMessage: The initial message the assistant will speak.
- firstMessageMode: Specifies that the assistant speaks first.
Format and intensifiers
The keywords
array accepts single-word tokens consisting of letters and digits, with an optional integer intensifier after a colon:
- Accepted forms:
apple
,apple:3
,apple:-2
- Not accepted:
order number
(usekeyterm
),hello-world
,foo_bar
,rate:1.5
(decimals are not supported by this schema)
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.
- Boosting Example:
keywords=snuffleupagus:5
- Suppressing Example:
keywords=kansas:-10
Keyterm prompting (phrases)
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.
Example: "keyterm": ["account number", "confirmation code", "HIPAA compliance"]
Best Practices for Keyword and Keyterm Boosting
- Start small: Begin without any boosting; add keywords/keyterms only where needed.
- Send uncommon words: Focus on proper nouns or domain terms the model often misses.
- Use
keywords
for single words;keyterm
for phrases: Avoid spaces inkeywords
. - Avoid duplicates: Send each keyword once; duplicates don’t improve results.
- Moderate intensifiers: Use minimal integer boosts to reduce false positives; increase cautiously.
- Correct spelling/casing: Provide the spelling and capitalization you want in transcripts.
- Consider custom models: For extensive vocabularies, consider custom model training with Deepgram.
Additional Resources
For more details, see:
- Deepgram Keywords: developers.deepgram.com/docs/keywords
- Deepgram Keyterm Prompting: developers.deepgram.com/docs/keyterm
- API reference: Deepgram transcriber
keywords
andkeyterm
in the API reference
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.