refactor!: Remove user_prompt and system_prompt from Agent.run#11209
refactor!: Remove user_prompt and system_prompt from Agent.run#11209sjrl wants to merge 7 commits intosingle-tracing-span-per-loopfrom
user_prompt and system_prompt from Agent.run#11209Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||||||||
user_prompt and system_prompt from Agent.run
155b0d1 to
bde728d
Compare
…haystack into remove-user-system-prompt-runtime
…haystack into remove-user-system-prompt-runtime
|
Just dropping here a more radical (untested) idea
WDYT? |
Interesting idea. Only thing I can think of as a potential problem is that if user prompt can only be at runtime then we would lose the ability to connect user prompt variables when building the pipeline. Maybe rename user_prompt to user_prompt_template to help emphasize it's meant to be for templating and not be a normal user message? |
|
Or maybe more radical we throw away system and user prompt at init time and just a generic messages_template which would be a jinja2 template that would default to |
Not a bad idea. In general, I thought that keeping But feel free to explore your idea further... |
That's fair about system_prompt. I'll note this idea down in our notion page and aim to tackle it in a future PR. For now I think we can move forward with this simplification and revisit this idea. |
Related Issues
Proposed Changes:
Remove the
user_promptandsystem_promptfrom the Agent's run method to reduce the complexity of how the Agent can be called. With these changes it becomes more obvious that new runtime content should either be passed through intomessagesparam or any of thekwargsthat are exposed via prompt template variables from thesystem_promptanduser_promptpassed in at init time.The original motivation for exposing the user and system prompts as runtime variables was to enable the Prompt Explorer in our cloud platform which needed these runtime params to easily update/explore different prompts. However, they will no longer be needed to enable that feature in the near future.
How did you test it?
Notes for the reviewer
Checklist
fix:,feat:,build:,chore:,ci:,docs:,style:,refactor:,perf:,test:and added!in case the PR includes breaking changes.