holmesgpt icon indicating copy to clipboard operation
holmesgpt copied to clipboard

View data from tools that is being sent to LLM

Open julia-yin opened this issue 6 months ago • 4 comments

What would you like to be added?

An easy way to view exactly what data is being sent to the LLM. For cases when the data is being truncated, we want to see what data is being sent and what data was cut out.

Why is this needed?

For better troubleshooting of Holmes ask for scenarios requiring a lot of data (e.g. pod logs, DNS traces), and to see how we can improve the truncation logic to be more intelligent.

julia-yin avatar May 22 '25 19:05 julia-yin

It might be overkill here, but eventually it would be nice to have a 2 pane view - with output on the left and tools on the right. We already have a dependency on Rich that can do it. Textual might be a good fit too.

aantn avatar May 25 '25 10:05 aantn

Another option could be logging each tool call it to file (when a cli flag is passed) and showing in cli output where to find that file.

aantn avatar May 26 '25 08:05 aantn

Does the truncation take place after all of the tools have been called? In that case, it would be valuable to compare the full results from each tool call vs. what data was ultimately passed to the LLM.

julia-yin avatar May 27 '25 17:05 julia-yin

Good idea.

Regarding truncation, it's both. A typical session can look like this:

user: question llm: please call tools a,b,c user: here are results a, b, c llm: please call tools x, y, z user: here are the results for x, y, z

So we make a truncation decision for a, b, and c all at once. Then for x, y, and z all at once. (This assumes the LLM support parallel tool calling where we get multiple tool calls at once - most now do.)

aantn avatar May 29 '25 08:05 aantn

Done! I'm tracking the further improvement in #669 re truncation

aantn avatar Jul 21 '25 14:07 aantn