Find answers from the community

Updated 3 months ago

Langchain prompt

Any way to inject an additional prompt / description onto agent? I know i can add descriptions to tools. Perhaps any way I can modify the conversational chat agent a little bit.
L
3 comments
Definitely, you can customize the prefix to the agent.

It's a little complicated though lol

Depending on the agent you are using, there are different prefixes. Here is the one for conversational chat react

https://github.com/hwchase17/langchain/blob/master/langchain/agents/conversational_chat/prompt.py
It's a little different to set for each agent tbh, but it's passed in under agent_kwargs when calling initialize_agent
I have to read the source code every time to figure it out lol
Add a reply
Sign up and join the conversation on Discord