📝 Originally published (in Japanese) at forge.workstyle.tech.
TL;DR A test bench ran 19 requests through the actual conversation flow, with 8 passing initially. Tool calls returned as text were not handled, and the scorer also had incorrect checks. Fixing both and tracking upstream model service errors separately brought the prepared set to 19/19.
TL;DR
In the first 19 conversation tests for the LLM agent, only 8 passed, and tool calls weren’t working for research requests or other tasks that relied on tools. The server and app couldn’t handle tool calls when the model returned them as plain text, and the evaluator also had a bug. After fixing tool-call handling and scoring, separately logging errors from the upstream model service, and reducing unnecessary model calls, all 19 tests passed.
What We Checked in 19 Conversations
The test bench includes six research requests, three tool requests, five casual conversations, two clarification requests, two actions, and one routing case. We run each request through the actual conversation handling flow.
We score behaviors that can be checked by machine: whether the web tool was called, whether the expected tool or action was selected, whether a tool was used during casual conversation, whether a clarification was requested when needed, whether the answer was non-empty, and how many seconds processing took.
This scoring cannot determine whether an answer is actually correct. We can check, for example, whether the system said it would look something up but failed to call the search tool. But answer quality still requires human evaluation. We don’t treat things that automated scoring can’t determine as if we know them.
In test mode, conversations aren’t recorded or saved to memory, actions that require confirmation are rejected, and no voice is played. Read-only tools, such as web search and calculations, run for real. If everything were fake, we could miss problems in the conversation flow or tool connections. We also reset the conversation state before each run, and record the pass or fail result, tools used, processing time, and reason for failure.
The first result was 8/19. I thought I could improve the score by adjusting how searches were selected and clarifying the tool descriptions. But research and tool requests were getting back the very text that was supposed to be passed to the tools.
What Caused the Score to Drop to 8/19: Tool Calls Weren’t Being Read
When we sent a request to look something up, the model returned tool calls as text. The server wasn’t configured to recognize that format as a tool call. The app appeared to receive the calls, but it wasn’t actually running the tools.
We fixed the server configuration and added logic on the app side to reconstruct calls embedded in text. In the grader (the process that marks test results as pass or fail), we fixed how it evaluated follow-up questions and counted save operations refused during testing.
The next test scored 16/19. Research tasks went from 0/6 to 4/6, tool tasks went from 0/3 to 2/3, and both follow-up question tests passed.
The remaining three failures weren’t all caused by the app. In all three cases, processing stopped after a search because an upstream model service outside the app returned an error. The logs showed that the app chose the expected tools in all 19 cases.
So we changed the grading system to record “upstream failure” separately. That keeps incorrect decisions by the app distinct from requests that failed outside it, instead of combining both into the same failure count. We needed to record not just the score, but why each test failed in a way that could guide the next fix.
Can You Reduce Model Calls While Maintaining Your Score?
Once I could see 19 cases in action, I started paying attention to the wait time for each one. Requests that used tools were calling the model six or seven times—for classification, deciding whether to save something, interacting with tools, formatting responses for speech, and more.
During tests, I counted which functions called the model by checking the send logs. I used call-stack traces to track where each call came from and added the count for each request to the results. That made it easier to distinguish necessary work from extra work.
First, I also checked whether the user intended to save something during request classification, then passed that result to the tool handler. This removed a separate model call just to make the save decision. Next, I stopped formatting short replies for speech. The logs showed that the model had made another call to format a 135-character response, then timed out.
I made changes while checking the score in the test bench, and eventually reached 19/19. There were zero upstream failures, and the median number of model calls was two.
A score of 19/19 doesn’t prove that every response is appropriate. The test bench checks whether the system behaved according to the criteria I defined for those 19 cases. Still, compared with when I only tested the same requests manually, I can now compare changes against a consistent standard.
Whenever I fix a symptom, I run all 19 cases again. If the score drops, I check whether the cause was the app’s decision or an upstream failure. I also look at how many times the model was called for a single request. Being able to check the parts I didn’t change against the same yardstick has given me a foundation for ongoing quality improvements.
Key takeaways
- Prepare requests for conversation, research, tools, clarification, and actions.
- Run them through the actual conversation flow and record tools, processing time, and failure reasons.
- Separate machine-checkable behavior from answer quality that needs human review.
- Investigate app decision failures separately from upstream model service errors.
- Rerun the same requests after changes and compare pass results and model call counts.


