|
1 年之前 | |
---|---|---|
.. | ||
README.md | 1 年之前 | |
langgraph-custom-agent.ipynb | 1 年之前 | |
langgraph-rag-agent-local.ipynb | 1 年之前 | |
langgraph-rag-agent.ipynb | 1 年之前 | |
langgraph-tool-calling-agent.ipynb | 1 年之前 | |
tool-calling-agent.ipynb | 1 年之前 |
LLM agents use planning, memory, and tools to accomplish tasks.
Agents can empower llama3 we important new capabilities.
Here, we will show how to give llama3 the ability to perform web search, as well as multi-modality: image generation (text-to-image), image analysis (image-to-text), and voice (text-to-speech) tools!
LangChain offers several different ways to implement agents with Llama 3.
We will show 3 different approaches:
(1) Tool calling agent
- Uses AgentExecutor with tool-calling versions of Llama 3.
(2) LangGraph tool calling agent
- Uses LangGraph with tool-calling versions of Llama 3.
(3) LangGraph custom agent
- Uses LangGraph with any version of Llama 3 (so long as it supports supports structured output).
As we move from option (1) to (3) the degree of customization and flexibility increaces:
Tool calling agent
with AgentExecutorAgentExecutor is the runtime for an agent. AgentExecutor calls the agent, executes the actions it chooses, passes the action outputs back to the agent, and repeats.
Our first notebook, tool-calling-agent
, shows how to build a tool calling agent with AgentExecutor and Llama 3.
LangGraph tool calling agent
LangGraph is a library from LangChain that can be used to build reliable agents.
Our second notebook, langgraph-tool-calling-agent
, shows an alternative to AgentExecutor for building a Llama 3 powered agent.
LangGraph custom agent
Our third notebook, langgraph-custom-agent
, shows how to build a Llama 3 powered agent without reliance on tool-calling.
Our fourth notebook, langgraph-rag-agent
, shows how to apply LangGraph to build a custom Llama 3 powered RAG agent that use ideas from 3 papers:
We implement each approach as a control flow in LangGraph:
We will build from CRAG (blue, below) to Self-RAG (green) and finally to Adaptive RAG (red):
Our fifth notebook, langgraph-rag-agent-local
, shows how to apply LangGraph to build advanced RAG agents using Llama 3 that run locally and reliably.
See this video overview for more detail on the design of this agent.