Skip to content

Commit

Permalink
langgraph nb changes (#8070)
Browse files Browse the repository at this point in the history
GitOrigin-RevId: 1971dd957b60a6d6f6bcf70717a92e423ccb9e68
  • Loading branch information
berkecanrizai authored and Manul from Pathway committed Jan 23, 2025
1 parent 0d5e7b6 commit 502e21d
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 23 deletions.
39 changes: 29 additions & 10 deletions cookbooks/self-rag-agents/pathway_deploy_langgraph_agents.ipynb
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "d58d3552-9168-4f0f-8a79-4dbaa4a01bbf",
"metadata": {
"tags": []
},
"source": [
"> The following cookbook is an adaption of the original [LangGraph cookbook](https://github.com/langchain-ai/langgraph/blob/e3ca7bb3e9d34b09633852f4d08d55f6dcd4364b/examples/rag/langgraph_self_rag.ipynb)\n",
"\n"
]
},
{
"cell_type": "markdown",
"id": "b3e94de1-ca3d-4956-b212-4a558b68062a",
Expand All @@ -26,6 +37,20 @@
"OpenAI is used for embeddings during the indexing stage and to power the LangGraph agent."
]
},
{
"cell_type": "markdown",
"id": "9e055de9-723f-44e3-ad39-70cc5f8932bf",
"metadata": {},
"source": [
"Magic library is used for detecting file types in the `ParseUnstructured` module.\n",
"\n",
"If you are running this notebook on **MacOS**, you can install it with:\n",
"> `brew install libmagic`\n",
"\n",
"If you are running the notebook on **colab** or any **linux** environment, you can install it with:\n",
"> `apt-get install libmagic1`"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -351,7 +376,9 @@
},
"cell_type": "markdown",
"id": "5894115c-0323-4098-83be-da49d949a53c",
"metadata": {},
"metadata": {
"tags": []
},
"source": [
"### Self-RAG\n",
"\n",
Expand Down Expand Up @@ -385,7 +412,7 @@
"\n",
"We will implement some of these ideas from scratch using [LangGraph](https://langchain-ai.github.io/langgraph/).\n",
"![image.png](attachment:76895b7a-fcc5-4758-9fbb-510b17fdeda4.png)\n",
"> Figure taken from the LangGraph cookbook"
"> Figure and the explanation taken from the [LangGraph cookbook](https://github.com/langchain-ai/langgraph/blob/e3ca7bb3e9d34b09633852f4d08d55f6dcd4364b/examples/rag/langgraph_self_rag.ipynb)"
]
},
{
Expand Down Expand Up @@ -1001,14 +1028,6 @@
"\n",
"Thus, whenever you POST a `\"user_query\"` to the `/agent` endpoint, the agent pipeline runs, and returns the final answer."
]
},
{
"cell_type": "markdown",
"id": "512f527d-400e-44af-add3-30a1b5a3c844",
"metadata": {},
"source": [
"> This notebook was inspired by this [LangGraph cookbook](https://github.com/langchain-ai/langgraph/blob/e3ca7bb3e9d34b09633852f4d08d55f6dcd4364b/examples/rag/langgraph_self_rag.ipynb)"
]
}
],
"metadata": {
Expand Down
46 changes: 33 additions & 13 deletions cookbooks/self-rag-agents/pathway_langgraph_agentic_rag.ipynb

Large diffs are not rendered by default.

0 comments on commit 502e21d

Please sign in to comment.