|
1 | 1 | {
|
2 | 2 | "cells": [
|
| 3 | + { |
| 4 | + "cell_type": "markdown", |
| 5 | + "id": "d58d3552-9168-4f0f-8a79-4dbaa4a01bbf", |
| 6 | + "metadata": { |
| 7 | + "tags": [] |
| 8 | + }, |
| 9 | + "source": [ |
| 10 | + "> 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", |
| 11 | + "\n" |
| 12 | + ] |
| 13 | + }, |
3 | 14 | {
|
4 | 15 | "cell_type": "markdown",
|
5 | 16 | "id": "b3e94de1-ca3d-4956-b212-4a558b68062a",
|
|
26 | 37 | "OpenAI is used for embeddings during the indexing stage and to power the LangGraph agent."
|
27 | 38 | ]
|
28 | 39 | },
|
| 40 | + { |
| 41 | + "cell_type": "markdown", |
| 42 | + "id": "9e055de9-723f-44e3-ad39-70cc5f8932bf", |
| 43 | + "metadata": {}, |
| 44 | + "source": [ |
| 45 | + "Magic library is used for detecting file types in the `ParseUnstructured` module.\n", |
| 46 | + "\n", |
| 47 | + "If you are running this notebook on **MacOS**, you can install it with:\n", |
| 48 | + "> `brew install libmagic`\n", |
| 49 | + "\n", |
| 50 | + "If you are running the notebook on **colab** or any **linux** environment, you can install it with:\n", |
| 51 | + "> `apt-get install libmagic1`" |
| 52 | + ] |
| 53 | + }, |
29 | 54 | {
|
30 | 55 | "cell_type": "code",
|
31 | 56 | "execution_count": null,
|
|
351 | 376 | },
|
352 | 377 | "cell_type": "markdown",
|
353 | 378 | "id": "5894115c-0323-4098-83be-da49d949a53c",
|
354 |
| - "metadata": {}, |
| 379 | + "metadata": { |
| 380 | + "tags": [] |
| 381 | + }, |
355 | 382 | "source": [
|
356 | 383 | "### Self-RAG\n",
|
357 | 384 | "\n",
|
|
385 | 412 | "\n",
|
386 | 413 | "We will implement some of these ideas from scratch using [LangGraph](https://langchain-ai.github.io/langgraph/).\n",
|
387 | 414 | "\n",
|
388 |
| - "> Figure taken from the LangGraph cookbook" |
| 415 | + "> Figure and the explanation taken from the [LangGraph cookbook](https://github.com/langchain-ai/langgraph/blob/e3ca7bb3e9d34b09633852f4d08d55f6dcd4364b/examples/rag/langgraph_self_rag.ipynb)" |
389 | 416 | ]
|
390 | 417 | },
|
391 | 418 | {
|
|
1001 | 1028 | "\n",
|
1002 | 1029 | "Thus, whenever you POST a `\"user_query\"` to the `/agent` endpoint, the agent pipeline runs, and returns the final answer."
|
1003 | 1030 | ]
|
1004 |
| - }, |
1005 |
| - { |
1006 |
| - "cell_type": "markdown", |
1007 |
| - "id": "512f527d-400e-44af-add3-30a1b5a3c844", |
1008 |
| - "metadata": {}, |
1009 |
| - "source": [ |
1010 |
| - "> This notebook was inspired by this [LangGraph cookbook](https://github.com/langchain-ai/langgraph/blob/e3ca7bb3e9d34b09633852f4d08d55f6dcd4364b/examples/rag/langgraph_self_rag.ipynb)" |
1011 |
| - ] |
1012 | 1031 | }
|
1013 | 1032 | ],
|
1014 | 1033 | "metadata": {
|
|
0 commit comments