- Contextual prompting (
prompt) — a natural-language description of what the audio is about: the domain, the scenario, or the full details of the conversation. - Keyterms prompting (
keyterms_prompt) — an explicit list of terms you want the model to recognize accurately.
How prompting works
Universal-3.5 Pro is trained to use context about the audio — its domain, topic, or scenario — to better recognize the vocabulary that context makes likely. A call described as a cardiology consultation primes the model for medical terminology; a call described as an order-status check primes it for order IDs and product names. The transcription instruction itself is built in and managed by AssemblyAI. You don’t need to tell the model how to transcribe — verbatim behavior, punctuation, and formatting are already optimized for streaming and turn detection. Theprompt parameter carries context about your audio, not instructions: formatting or behavioral commands in the prompt (such as punctuation rules) are not supported.
The model is trained to stay grounded in the audio: context that turns out to be irrelevant or only partially applicable does not cause the model to insert words that weren’t spoken. This means you can safely send the same context with every session of a longer interaction — for example, the same call description for every segment of a conversation — even though only some of it applies at any given moment.
Contextual prompting
Contextual prompts work at three levels of specificity. Use the least specific level that covers your use case, and add detail when your audio contains uncommon names or terms the model can’t otherwise know.
Domain context tells the model what field the audio belongs to — medical, legal, technical support, food ordering. This is the safest starting point and is often enough to fix vocabulary errors.
Scenario context describes the specific situation. This is the right level for most applications that know what kind of call is taking place — appointment booking, billing inquiry, delivery complaint.
Detailed context describes everything your application already knows about the conversation: participant names, account or order identifiers, products, locations. This level is the most powerful when the audio contains proper nouns and identifiers — for example, a voice agent platform that already knows who is calling and why can pass that information so the model spells names and IDs correctly.
Guidelines for writing contextual prompts:
- Write plain, complete sentences that describe the audio — you are describing a recording, not commanding the model.
- Keep it to one short block of text. Don’t pack lists of keywords into the contextual prompt — that’s what
keyterms_promptis for. - Specificity follows knowledge: only include details you actually know about the call. Wrong details won’t corrupt the transcript, but they don’t help either.
Accuracy impact
We benchmarked contextual prompting on 20,000 real voice-agent calls at each of the three levels. Accuracy improves monotonically with context specificity, and the gains are largest for the entities each level describes. Word error rate (WER) and entity error rate (EER) below are relative reductions versus no prompt.
Two takeaways for choosing a level:
- Scenario context is the practical default. It needs only the kind of information any application already has — the type of call — and already cuts overall WER ~10% and entity errors on names and places by 16–21%.
- Detailed context is the upper bound. When your application can supply specifics it already knows (caller name, account or order IDs, products), entity accuracy improves dramatically — names nearly halve. This is the most powerful option for voice agents with access to customer context.
Specifying the language
State the language of the audio as part of your context. For example, knowing the language disambiguates the audio: the same sound could be transcribed “si” in a Spanish call but “C” in an English one.Keyterms prompting
Use thekeyterms_prompt parameter to boost recognition of specific names, brands, or domain terms. Pass an array of terms you want the model to prioritize:
- You can include a maximum of 100 keyterms per session.
- Each individual keyterm string must be 50 characters or less.
- Keyterms longer than 50 characters are ignored; requests with more than 100 keyterms return an error.
- 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.
- 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.
Quickstart
Setprompt and keyterms_prompt as connection parameters when you open the WebSocket. The example below uses both together, with prompt describing the conversation and keyterms_prompt enumerating specific terms.
- Python
- Python SDK
- Javascript
- JavaScript SDK
Updating mid-stream
Bothprompt and keyterms_prompt can be updated during an active streaming session without reconnecting. This is useful when your application learns more about the conversation as it progresses, or when a voice agent moves between conversation stages.
Send an UpdateConfiguration message with the new values:
- Python
- Python SDK
- Javascript
- JavaScript SDK
[] removes all keyterms and resets context biasing to the default state. New values take effect immediately for subsequent audio processing.
See Updating configuration mid-stream for the full list of parameters you can update mid-stream.
What prompting is not
- Prompting does not control output formatting. Instructions in the prompt (punctuation rules, verbatim directives, formatting commands) are not supported — transcription behavior is managed internally and already optimized for streaming and turn detection.