Find answers from the community

Updated 3 weeks ago

Sys prompt

Hi @Logan M! Is there an easy way to control the ReAct Agent's SYS prompt?
L
b
8 comments
It's pretty big because it has all the react loop instructions, but you can view it and override it (override with caution though, if you remove the instructions completely, it wont work very lol)

https://docs.llamaindex.ai/en/stable/examples/agent/react_agent/#view-prompts

What you probably really want is to just inject some extra context into the existing system prompt
ReActAgent.from_tools(...., context="some context")
Seems like it doesn't do very well on outlining the output format. I tried passing in a model schema but it seems to ignore it altogether. Wanted to see if there are any known unknowns or benchmarks on how to best make use of this context?
What are you trying to tell it to do?
(and which LLM class? You might not need react tbh)
I am trying to use ReActAgent. It has as of now proved the most reliable with calling the right tools.

What do you recommend?
I have a set of tools and based on when the context where the agent is being initialized I need to pass instructions, e.g. "Return the financial metric and its unit", "return a single line response"
Depending on the LLM class you are using, I would use FunctionCallingAgent. You can set an actual system prompt then too, since it doesn't rely on giant prompting instructions to generate an output
Thanks @Logan M you are the best!
Add a reply
Sign up and join the conversation on Discord