-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show errored function in reasoning #650
Conversation
WalkthroughThe changes involve updating the system prompt for a microchain agent by adding a new instruction for error handling. Specifically, the modification enhances error reporting by requiring the agent to include detailed information about any function that fails during execution. This update aims to improve debugging and traceability by mandating that the agent explicitly mention the exact function and its arguments when an error occurs. Changes
The specific addition to the prompt is:
This change modifies the system prompt's error handling guidance without altering the overall structure of the code. ✨ Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
prediction_market_agent/agents/microchain_agent/prompts.py (1)
43-43
: Consider adding an example format for consistency.While the instruction is clear, providing an example format could ensure consistent error reporting across different scenarios.
Consider expanding the instruction like this:
-If some function errors out, include the exact function and arguments you tried to call in your follow-up reasoning call. +If some function errors out, include the exact function and arguments you tried to call in your follow-up reasoning call. For example: "Previous call that failed: GetMarkets(limit=5)".
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
prediction_market_agent/agents/microchain_agent/prompts.py
(1 hunks)
🔇 Additional comments (1)
prediction_market_agent/agents/microchain_agent/prompts.py (1)
43-43
: Great addition for improving error traceability!This enhancement will make debugging easier by ensuring that failed function calls are properly documented in the reasoning history.
Related to #647, the fact that the errored function call isn't in the history is a feature of Microchain, not a bug.
We could refactor it a bit, but atm I'm not convinced that it has to change, so I did a "2025 programmers move" -- just ask the LLM to do it for us! 😄 For our needs it seems to work fine.