mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-13 22:59:05 +00:00
Closes #32320 This PR updates the `langgraph_agentic_rag.ipynb` notebook to clarify that LangGraph does not automatically prepend a `SystemMessage`. A markdown note and an inline Python comment have been added to guide users to explicitly include a `SystemMessage` when needed. This improves documentation for developers working with LangGraph-based agents and avoids confusion about system-level behavior not being applied. --------- Co-authored-by: Mason Daugherty <mason@langchain.dev>
This commit is contained in:
parent
5ccdcd7b7b
commit
11a54b1f1a
@ -79,6 +79,17 @@
|
|||||||
"tool_executor = ToolExecutor(tools)"
|
"tool_executor = ToolExecutor(tools)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"id": "168152fc",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"📘 **Note on `SystemMessage` usage with LangGraph-based agents**\n",
|
||||||
|
"\n",
|
||||||
|
"When constructing the `messages` list for an agent, you *must* manually include any `SystemMessage`s.\n",
|
||||||
|
"Unlike some agent executors in LangChain that set a default, LangGraph requires explicit inclusion."
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
"id": "fe6e8f78-1ef7-42ad-b2bf-835ed5850553",
|
"id": "fe6e8f78-1ef7-42ad-b2bf-835ed5850553",
|
||||||
|
Loading…
Reference in New Issue
Block a user