Debugging Agent Responses

Introduction

In BrainSoup, each message generated by an agent is accompanied by detailed technical information that can be crucial for debugging and understanding the agent's responses. This guide will walk you through accessing and interpreting these details to optimize your agents configuration and interactions.

Accessing Technical Details

For any message generated by an agent, you can access its technical details by clicking on the small circled 'i' button located at the top right of the message. Clicking this button opens a flyout containing a tree structure of detailed information, which you can expand or reduce. Right-clicking on any element within this tree presents a context menu allowing you to expand, collapse, or copy either the entire tree or selected sub-trees. When copying, the selected information is copied to your clipboard in JSON format.

Interpreting Technical Details

The technical details provide several key pieces of information:

  • Model: Identifies the Large Language Model (LLM) used for generating the response, e.g., "gpt-3.5-turbo".
  • Usage: Shows how many tokens were consumed in generating the prompt and completion, along with the total cost in credits and USD.
  • Prompt Settings: Details various settings used for generating the response (e.g., temperature, top-p, max tokens, etc.). These settings correspond to the low-level parameters sent to the model, and can differ based on the LLM used. They are derived from the settings configured in the agent editor.
  • Document Memories & Chat Memories: Lists queries made against document memories (long-term memory stored in the local vector database) and chat memories (past conversations in which the agent participated), along with their results. This is particularly useful for understanding what background information influenced the agent's response.
  • Context: Details the context provided to the agent during response generation, including the user-provided Custom Contexts or the built-in contexts provided by BrainSoup. These contexts can be composed of real-time dynamic data or important static information that the agent must keep in mind at all times.
  • Function Calls: Details any external tool functions called during response generation along with their arguments and results. For example, calling a "TextToImageDallE2.GenerateImage" function with specific arguments and obtaining an image file as a result.

Practical Applications

Understanding these technical details allows users to debug and refine agent configurations more effectively. By knowing which prompts led to undesired outcomes or high credit consumption, users can adjust their settings to achieve better results more cost-efficiently.

Additionally, seeing what external tools were invoked provides insights into how agents accomplish tasks beyond simple text generation—such as creating images or fetching data—enabling users to better leverage BrainSoup’s capabilities for their projects.

Conclusion

By mastering how to access and interpret technical details behind each agent's messages in BrainSoup, users gain deeper insights into their AI collaborators' workings. This knowledge not only aids in debugging but also empowers users to make more informed decisions about configuring their agents for optimal performance.