docs/how_to/tools_few_shot/ #27360
Replies: 3 comments
-
It would be great if this page included an example of using Few Shot prompting with structured output, both with and without messages |
Beta Was this translation helpful? Give feedback.
-
From the above tutorial what i understand is that "chain" in ref. "chain = {"query": RunnablePassthrough()} | few_shot_prompt | llm_with_tools" is like a custom prompted llm with tool calling capabilities. can anyone confirm if my understanding is correct or not ? if this is the case then i can plug this into langgraph as well. |
Beta Was this translation helpful? Give feedback.
-
Love it. Thanks, and keep it comin'. |
Beta Was this translation helpful? Give feedback.
-
docs/how_to/tools_few_shot/
For more complex tool use it's very useful to add few-shot examples to the prompt. We can do this by adding AIMessages with ToolCalls and corresponding ToolMessages to our prompt.
https://python.langchain.com/docs/how_to/tools_few_shot/
Beta Was this translation helpful? Give feedback.
All reactions