DSPy: The framework for programming—not prompting—language models
Python
Update RAG tutorial.
Omar Khattabebbe33b62473
diff --git a/docs/docs/tutorials/rag/index.ipynb b/docs/docs/tutorials/rag/index.ipynbindex 717cc35e0..59f3b07d3 100644--- a/docs/docs/tutorials/rag/index.ipynb+++ b/docs/docs/tutorials/rag/index.ipynb@@ -8,9 +8,15 @@"\n","Let's walk through a quick example of **basic question answering** with and without **retrieval-augmented generation** (RAG) in DSPy. Specifically, let's build **a system for answering Tech questions**, e.g. about Linux or iPhone apps.\n","\n",- "Install the latest DSPy via `pip install -U dspy` and follow along. If you're looking instead for a conceptual overview of DSPy, this [recent lecture](https://www.youtube.com/live/JEMYuzrKLUw) is a good place to start.\n",+ "Install the latest DSPy via `pip install -U dspy` and follow along. If you're looking instead for a conceptual overview of DSPy, this [recent lecture](https://www.youtube.com/live/JEMYuzrKLUw) is a good place to start."+ ]+ },+ {+ "cell_type": "markdown",+ "metadata": {},+ "source": ["\n",- "## Configuring the DSPy environment\n",+ "## Configuring the DSPy environment.\n","\n","Let's tell DSPy that we will use OpenAI's `gpt-4o-mini` in our modules. To authenticate, DSPy will look into your `OPENAI_API_KEY`. You can easily swap this out for [other providers or local models](https://github.com/stanfordnlp/dspy/blob/main/examples/migration.ipynb).\n"]@@ -632,7 +638,7 @@"cell_type": "markdown","metadata": {},"source": [- "## Basic RAG\n",+ "## Basic Retrieval-Augmented Generation (RAG).\n","\n","First, let's download the corpus data that we will use for RAG search. The next cell will seek to download 4 GBs, so it may take a few minutes. A future version of this notebook will come with a cache that allows you to skip downloads and the PyTorch installation."]