docs: ReAct reference (#22830)

The `ReAct` is used all across LangChain but it is not referenced
properly.
Added references to the original paper.
This commit is contained in:
Leonid Ganeline
2024-06-13 19:39:28 -07:00
committed by GitHub
parent 712aa0c529
commit 46c9784127
6 changed files with 70 additions and 12 deletions

View File

@@ -24,6 +24,9 @@ def create_react_agent(
) -> Runnable:
"""Create an agent that uses ReAct prompting.
Based on paper "ReAct: Synergizing Reasoning and Acting in Language Models"
(https://arxiv.org/abs/2210.03629)
Args:
llm: LLM to use as the agent.
tools: Tools this agent has access to.

View File

@@ -103,6 +103,8 @@ class TrajectoryEvalChain(AgentTrajectoryEvaluator, LLMEvalChain):
This chain is used to evaluate ReAct style agents by reasoning about
the sequence of actions taken and their outcomes.
Based on the paper "ReAct: Synergizing Reasoning and Acting in Language Models"
(https://arxiv.org/abs/2210.03629)
Example: