Let the LLM talk. Don't let it decide.
We were building a voice agent to screen market research respondents for a major FMCG client. Its job is to tell people who really use a product from people who are only there for the incentive.
A respondent opens a web link and answers a few questions by speaking, in whichever Indian language they are comfortable in. Many switch to English halfway through a sentence. Two decisions shaped the system more than anything else we did.
- Sector
- FMCG market research
- System
- Voice screening agent
- Status
- In production
- 0
- Wrong accepts
- 95%
- Decisions resolved first time
- ~170 ms
- Median decision latency
- ~240 ms
- 95th percentile latency
From our own evaluation set for the decision layer: 174 cases and 247 decisions across eight Indian languages plus Hinglish, including noisy transcripts and self-corrections.
The problem
A voice agent can be built in two ways. A speech-to-speech model takes audio in and gives audio out. A pipeline chains three stages: speech-to-text, an LLM for the conversation, and text-to-speech.
We did not know which would suit screening in several Indian languages, and we did not think we could find out without building both.
What we tried
We built the same conversation flow twice. One version ran on OpenAI's Realtime API, a single speech-to-speech model. The other ran on Sarvam's pipeline: streaming speech-to-text (Saaras), an LLM for the conversation, and streaming text-to-speech (Bulbul).
We ran structured evaluations on both. Then the client's team used the application on both stacks.
- Audio in
- One model
- Audio out
- Audio in
- Speech-to-text
- Code check
- LLM
- Code check
- Text-to-speech
- Audio out
What we found
Both versions worked well, and latency was comparable. The Realtime version was the stronger of the two in conversation, and it handled interruptions better. For the client's team, the overall experience was better on the Sarvam pipeline, whose speech models are built for Indian languages.
The pipeline also gave us something we had not planned for. Every hop between its stages is text, and ordinary code can read text. We put a deterministic check on both hops: between speech-to-text and the LLM, and between the LLM and text-to-speech. On the way out, before any line is spoken, code confirms that it does not reveal anything the respondent has not said themselves. A screening question that gives away the expected answer is of no use.
With a single speech-to-speech model we did not have an equivalent place to put that rule.
What each stack gave us
OpenAI Realtime API
- One speech-to-speech model
- Stronger in conversation, including interruptions
- Latency comparable to the pipeline
- Audio in, audio out
Sarvam pipeline
- Speech-to-text, LLM and text-to-speech, all streaming
- Better overall experience for this use case
- Latency comparable to the single model
- Text on every hop, so code can check it
What we'd tell another engineer
Neither stack is better in general. Build the same flow on both, let the people who will use it try both, and choose the one that fits the problem. If a rule must hold every time, prefer the architecture where code can see the text.
The problem
Inside every session the system keeps making small decisions that the result depends on. Which brand did they mean? Which variant? Do they use this product at all? Is the place they named the one we expected?
One wrong guess sends the rest of the conversation down the wrong path.
What we tried
Our first version used phrase tables, fuzzy matching, phonetic keys and an LLM call that returned JSON. One production session showed us the cost. A respondent named one brand, then used an everyday Hindi word that a phonetic matcher read as a different brand. The last matcher to fire won, and the conversation carried on with the wrong product.
The tempting fix was to hand every decision to the LLM. We did not. An LLM gives a fluent answer, and what we needed was to know how sure the answer was.
We moved these decisions to Prism, Sarvam's decision model. Prism takes the conversation state and a closed list of options, and returns a probability for every option. It never returns free text. Code then applies a fixed rule.
input conversation state + closed list of options
output one probability per option, never free text
accept the top option, only when it is confident
and clearly ahead of the runner-up
else ask the respondent once moreWhat we found
On our evaluation set there were no wrong accepts. When Prism was not sure, the system asked again instead of guessing. 95% of decisions were resolved the first time, with no follow-up question.
Median latency was about 170 ms and the 95th percentile about 240 ms, which is fast enough to finish while the voice is still speaking.
The LLM still does what it is good at, which is the conversation. It no longer decides anything the result depends on.
What we'd tell another engineer
Generating language and making decisions are different jobs. For a decision over a closed list, ask for a probability per option and let a fixed rule accept or ask again. A system that says "I'm not sure" and asks again beats one that guesses with confidence.
If you are building something similar
- 01Build the same flow on each candidate stack and have the client's team use both. A scorecard does not tell you which one feels right.
- 02When a rule must hold every time, choose the architecture with text between its stages. That is where code can enforce it.
- 03Keep generation and decisions apart. Decisions over a closed list need probabilities and a fixed accept rule.
- 04Design for "I'm not sure". Asking once more costs a few seconds. A confident wrong guess costs the session.
Process mapping that works with the ERP, not around it.
Aviation parts procurement, with compliance checked first.
Working on a problem like this one?
Tell us what the system needs to do. We'll tell you how we'd build it.