Skip to content

armgit / dspy

Public Imported from GitHub
0

DSPy: The framework for programming—not prompting—language models

Python

patch build

Arnav Singhvi5dcd7aff7ad7
diff --git a/docs/building-blocks/solving_your_task.md b/docs/building-blocks/solving_your_task.md
index 389e2602f..d91941ec5 100644
--- a/docs/building-blocks/solving_your_task.md
+++ b/docs/building-blocks/solving_your_task.md
@@ -97,7 +97,7 @@ Here's the general guidance on getting started:
At this point, you are either very happy with everything (we've seen quite a few people get it right on first try with DSPy) or, more likely, you've made a lot of progress but you don't like something about the final program or the metric.
-At this point, go back to step 1 and revisit the major questions. Did you define your task well? Do you need to collect (or find online) more data for your problem? Do you want to update your metric? And do you want to use a more sophisticated optimizer? Do you need to consider advanced features like [DSPy Assertions](/docs/building-blocks/7-assertions.md)? Or, perhaps most importantly, do you want to add some more complexity or steps in your DSPy program itself? Do you want to use multiple optimizers in a sequence?
+At this point, go back to step 1 and revisit the major questions. Did you define your task well? Do you need to collect (or find online) more data for your problem? Do you want to update your metric? And do you want to use a more sophisticated optimizer? Do you need to consider advanced features like [DSPy Assertions](/docs/building-blocks/7-assertions)? Or, perhaps most importantly, do you want to add some more complexity or steps in your DSPy program itself? Do you want to use multiple optimizers in a sequence?
Iterative development is key. DSPy gives you the pieces to do that incrementally: iterating on your data, your program structure, your assertions, your metric, and your optimization steps.
diff --git a/docs/tutorials/rag.md b/docs/tutorials/rag.md
index 400c61f9a..79224debd 100644
--- a/docs/tutorials/rag.md
+++ b/docs/tutorials/rag.md
@@ -47,7 +47,7 @@ len(trainset), len(devset)
## Building Signatures
-Now that we have the data loaded, let's start defining the [signatures](/docs/building-blocks/2-signatures.md) for the sub-tasks of our pipeline.
+Now that we have the data loaded, let's start defining the [signatures](/docs/building-blocks/2-signatures) for the sub-tasks of our pipeline.
We can identify our simple input `question` and output `answer`, but since we are building out a RAG pipeline, we wish to utilize some contextual information from our ColBERT corpus. So let's define our signature: `context, question --> answer`.
@@ -64,7 +64,7 @@ We include small descriptions for the `context` and `answer` fields to define mo
## Building the Pipeline
-We will build our RAG pipeline as a [DSPy module](/docs/building-blocks/3-modules.md) which will require two methods:
+We will build our RAG pipeline as a [DSPy module](/docs/building-blocks/3-modules) which will require two methods:
* The `__init__` method will simply declare the sub-modules it needs: `dspy.Retrieve` and `dspy.ChainOfThought`. The latter is defined to implement our `GenerateAnswer` signature.
* The `forward` method will describe the control flow of answering the question using the modules we have: Given a question, we'll search for the top-3 relevant passages and then feed them as context for answer generation.
@@ -88,7 +88,7 @@ class RAG(dspy.Module):
##### Compiling the RAG program
-Having defined this program, let's now **compile** it. [Compiling a program](/docs/building-blocks/6-optimizers.md) will update the parameters stored in each module. In our setting, this is primarily in the form of collecting and selecting good demonstrations for inclusion within the prompt(s).
+Having defined this program, let's now **compile** it. [Compiling a program](/docs/building-blocks/6-optimizers) will update the parameters stored in each module. In our setting, this is primarily in the form of collecting and selecting good demonstrations for inclusion within the prompt(s).
Compiling depends on three things: