Keyterms prompting for Universal-Streaming
The keyterms prompting feature helps improve recognition accuracy for specific words and phrases that are important to your use case.
Keyterms Prompting costs an additional $0.04/hour.
Quickstart
Python
Javascript
Firstly, install the required dependencies.
Python
Javascript
Configuration
To utilize keyterms prompting, you need to include your desired keyterms as query parameters in the WebSocket URL.
- You can include a maximum of 100 keyterms per session.
- Each individual keyterm string must be 50 characters or less in length.
How it works
Streaming Keyterms Prompting has two components to improve accuracy for your terms.
Word-level boosting
The streaming model itself is biased during inference to be more accurate at identifying words from your keyterms list. This happens in real-time as words are emitted during the streaming process, providing immediate improvements to recognition accuracy. This component is enabled by default.
Turn-level boosting
After each turn is completed, an additional boosting pass analyzes the full transcript using your keyterms list. This post-processing step, similar to formatting, provides a second layer of accuracy improvement by examining the complete context of the turn. To enable this component, set format_turns
to True
.
Both stages work together to maximize recognition accuracy for your keyterms throughout the streaming process.
Important notes
- Keyterms prompts longer than 50 characters are ignored.
- Requests containing more than 100 keyterms will result in an error.
Best practices
To maximize the effectiveness of keyterms prompting:
- Specify Unique Terminology: Include proper names, company names, technical terms, or vocabulary specific to your domain that might not be commonly recognized.
- Exact Spelling and Capitalization: Provide keyterms with the precise spelling and capitalization you expect to see in the output transcript. This helps the system accurately identify the terms.
- Avoid Common Words: Do not include single, common English words (e.g., “information”) as keyterms. The system is generally proficient with such words, and adding them as keyterms can be redundant.