Hey <@U01KZ61GV5Z> starting a separate thread on h...
# agents
m
Hey @dry-elephant-14928 starting a separate thread on higher than expected latency end-to-end
We're using deepgram nova3, gpt-4.1 and Cartesia. The agent is running on an AWS cluster. We're measuring the actual audio gaps between end of user utterance and start of assistant utterance.
I guess my main question is - how does Retell get the system to be so extremely responsive given the same services are running there?
Is there a way to bump preemptive generation to execute earlier?
d
is the client a web client or phone client? could you turn on metrics logging to see where the latency is coming from? example
m
We've tried both web and phone, phone adds another 100ms maybe so not significant. We're running logging on metrics already, results indicate ASR and LLM taking most of the time, with LLM ttft being about 700ms (gpt-4.1). However the whole sum of latencies in the logs only sum to about 1200ms but we're seeing upwards of 2s of delay in response often
We also have VAD and EnglishModel enabled
I was thinking maybe switching to Deepgram Flux would speed things up but performance is basically the same
d
Flux wouldn't really help there IMO..
what does your agent do?
700ms ttft seems a bit high
m
This one just has a basic conversation, no function calls
Prompt is almost entirely cached
d
that definitely doesn't match what I'm seeing.. FWIW..
m
I thought something might be off about the way we call OAI models, so we tried Inference mode you guys just released (congrats on that btw! Good stuff) - exact same performance, maybe a tiny bit more stable in terms of distribution
d
for the audio files you are analyzing.. are you able to share them as well?
btw how are they captured? is that Egress recordings?
m
PHI unfortunately so not easily shareable - we record on the telephony side, rather than Egress
d
I see.
m
We are streaming LLM->TTS, and really those two are pretty set in terms of latency. I'm wondering if we can reduce the time between Deepgram suggestion and triggering of LLM generation - that's the only way I could think to improve the performance here
d
are you doing the same with the retell config?
m
Yes
d
I'm wondering if we can reduce the time between Deepgram suggestion and triggering of LLM generation
That's exactly what preemptive_generation does.. it starts generating very early on.
m
That's what I would think, but any chance you know of a way to bias the decision of when sentence is considered finalized to come earlier?
d
but I think the main issue is that if you are adding all of the pipeline to be 1.2.. and the actual result is 1.8.. there's still 600ms unaccounted for
m
We ran this on our client and then compared to base sandbox - basically the same result
Definitely losing time somewhere, and I'm pretty sure it's not in transit
b
@dry-elephant-14928 1/ are y'all using the LiveKit telemetry feature to measure the latency that you reported in that post? We're trying to get to the bottom of that 600ms difference
2/ for ASR: are you seeing better performance on Assemly AI rather than Deepgram?
Also given our volumes we're going to need higher concurrency limits - plz feel free to intro us to your sales/acct mgmt folk to help get that set up
b
Did you find the issue here? We are facing the exact same issue when calling from phone. My current guess is that somehow the VAD + Turn detection is not working on phone (as well as it works on the web).
b
haven't heard back yet, sry. will keep you posted
@best-bear-18668 are you connecting to the phone via LiveKit's SIP trunk? or can u share more about your setup?