Skip to content
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

Customize final_answer output #752

Open
tanliboy opened this issue Feb 22, 2025 · 0 comments
Open

Customize final_answer output #752

tanliboy opened this issue Feb 22, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@tanliboy
Copy link

Is your feature request related to a problem? Please describe.

When using smolagents for multi-step tasks, the final output lacks detail and does not follow a specific format. This happens because final_answer outputs a raw string without customization options.

Describe the solution you'd like

I propose making final_answer a customizable step that allows specifying a format or output instructions (possibly using a different model) while still leveraging the agent’s memory.

Is this not possible with the current options?

I attempted to include output formatting instructions in the system prompt, but it didn’t work well due to the presence of other instructions that the agent also needs to follow.

Describe alternatives you've considered

The other alternative is to make final_answer a dedicated tool for output. However, it would require the model to pass all context and reconstruct the task, which can be overcomplicated.

@tanliboy tanliboy added the enhancement New feature or request label Feb 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant