https://retellai.com/?utm_source=discord&utm_medium=seo logo
One state transition stopped working-
# ❓・bug-report
b
All of a sudden one of the state transitions in our agent stopped working and it's consistently reproducible. Each time it happens, the transition_to_X_state function is called but then the agent hangs. We observe "Error encountered in LLM call" in the detailed logs. We've tried switching LLMs as well as rebuildilng the state from scratch but the edge does not work. The schema matches that of another state transition that still works as expected.
How can we better debug an edge transition?
n
is it happening for a specific edge or you have been able to reproduce it with any other state transition like transition_to_Y_state as well? And did you change anything before it stopped working all of a sudden? Any call ID or logs would be helpful to look at
b
@NJ it started out of nowhere. Other state transitions with almost identical schemas (save for names) work fine. I tried rebuilding the state to no avail. Here's a callID
fcfbcc7352d2e23095d1c32a4f8ece75
thank you!
Any idea?
n
@Zexia - Retell AI can you have a look at the call ID?
r
@bailey9148 could you try making the names of the states longer? It takes a bit of prompt engineering to get to a good place.
b
@retellai thanks for taking a look - will give that a go
n
@bailey9148 Was this resolved?
b
@NJ no- made the state name considerably longer and it still experiences the same failure
2024-08-21 02:17:40.314 call_a195e9bf3cfb7af36269271c73d error: Error encountered in LLM call
friendly ping here @retellai
a
@bailey9148 we experienced this as well and we created some conditions in the prompt when the current state has completed you must transition to the next "insert_state" to guide the LLM with strict rules to follow to ensure this happens. Otherwise you get into a "hallucination" state. Take the prompt to claude 3.5 sonnent and copy and paste the transcript where the error is occuring and have it write some strict rules to follow and see if it works. If it doesn't have claude keep trying until its flawless. I did this for not getting past the consent to record state and you can try everything to get around it and you can't...Ping me if you need help.
b
amazing thank you @adamg2334
@adamg2334 sounds like you had better luck with 3.5 sonnet versus gpt4o, yeah?
a
I use mini and 4o for the actual voice lines but I do all my prompting and script analysis and refinements of my agents in sonnet 3.5. GPT is too dumb to have it prompt itself. Lol