ยินดีด้วย!

Text-to-Query Agents ด้วย MongoDB และ LangGraph

Apoorva Joshi

Senior AI/ML Developer Advocate, MongoDB

ผลลัพธ์สุดท้าย!

agentic10.jpg

Text-to-Query Agents ด้วย MongoDB และ LangGraph

กล่องเครื่องมือของ Agent

from langchain_mongodb.agent_toolkit.toolkit import MongoDBDatabaseToolkit

# Initialize the MongoDB database toolkit
toolkit = MongoDBDatabaseToolkit(db=db, llm=llm)

# Extract the tools from the toolkit
tools = toolkit.get_tools()
Text-to-Query Agents ด้วย MongoDB และ LangGraph

Prompt Engineering

from langchain_mongodb.agent_toolkit import MONGODB_AGENT_SYSTEM_PROMPT

# Create a templated prompt for the LLM
prompt = ChatPromptTemplate.from_messages(
    [
        ("system", MONGODB_AGENT_SYSTEM_PROMPT),
        ("system", "Do not re-run tools unless absolutely necessary. If you are not
                    able to get enough information using the tools, reply with
                    I DON'T KNOW. You have access to the following tools: {tool_names}."),
        MessagesPlaceholder(variable_name="messages"),
    ]
)
Text-to-Query Agents ด้วย MongoDB และ LangGraph

การประสาน Agent

langgraph.png

Text-to-Query Agents ด้วย MongoDB และ LangGraph

หน่วยความจำ

mongosaver.png

thread_checkpoint.png

Text-to-Query Agents ด้วย MongoDB และ LangGraph

ขั้นตอนถัดไป

 

เพิ่มเติมเกี่ยวกับ MongoDB และ Text-to-Query Agents

เพิ่มเติมเกี่ยวกับ LangChain และ LangGraph

Text-to-Query Agents ด้วย MongoDB และ LangGraph

ยินดีด้วย!

Text-to-Query Agents ด้วย MongoDB และ LangGraph

Preparing Video For Download...