DSPy: The framework for programming—not prompting—language models
Python
fix building blocks links
Herumb Shandilya186a6a200dbf
diff --git a/docs/docs/building-blocks/2-signatures.md b/docs/docs/building-blocks/2-signatures.mdindex 666139349..c9721d0ae 100644--- a/docs/docs/building-blocks/2-signatures.md+++ b/docs/docs/building-blocks/2-signatures.md@@ -157,4 +157,4 @@ Prediction(While signatures are convenient for prototyping with structured inputs/outputs, that's not the main reason to use them!-You should compose multiple signatures into bigger [DSPy modules](/building-blocks/modules) and [compile these modules into optimized prompts](/building-blocks/optimizers#what-does-a-dspy-optimizer-tune-how-does-it-tune-them) and finetunes.+You should compose multiple signatures into bigger [DSPy modules](/building-blocks/3-modules) and [compile these modules into optimized prompts](/building-blocks/6-optimizers#what-does-a-dspy-optimizer-tune-how-does-it-tune-them) and finetunes.diff --git a/docs/docs/faqs.md b/docs/docs/faqs.mdindex 0872c70a8..5f38a74c9 100644--- a/docs/docs/faqs.md+++ b/docs/docs/faqs.md@@ -49,7 +49,7 @@ class UnstrippedSignature(dspy.Signature):- **How do I define my own metrics? Can metrics return a float?**-You can define metrics as simply Python functions that process model generations and evaluate them based on user-defined requirements. Metrics can compare existent data (e.g. gold labels) to model predictions or they can be used to assess various components of an output using validation feedback from LMs (e.g. LLMs-as-Judges). Metrics can return `bool`, `int`, and `float` types scores. Check out the official [Metrics docs](/building-blocks/metrics) to learn more about defining custom metrics and advanced evaluations using AI feedback and/or DSPy programs.+You can define metrics as simply Python functions that process model generations and evaluate them based on user-defined requirements. Metrics can compare existent data (e.g. gold labels) to model predictions or they can be used to assess various components of an output using validation feedback from LMs (e.g. LLMs-as-Judges). Metrics can return `bool`, `int`, and `float` types scores. Check out the official [Metrics docs](/building-blocks/5-metrics) to learn more about defining custom metrics and advanced evaluations using AI feedback and/or DSPy programs.- **How expensive or slow is compiling??**@@ -115,7 +115,7 @@ Modules can be frozen by setting their `._compiled` attribute to be True, indicaYou can specify JSON-type descriptions in the `desc` field of the long-form signature `dspy.OutputField` (e.g. `output = dspy.OutputField(desc='key-value pairs')`).-If you notice outputs are still not conforming to JSON formatting, try Asserting this constraint! Check out [Assertions](/building-blocks/assertions) (or the next question!)+If you notice outputs are still not conforming to JSON formatting, try Asserting this constraint! Check out [Assertions](/building-blocks/7-assertions) (or the next question!)- **How do I use DSPy assertions?**diff --git a/docs/docs/quick-start/getting-started-02.md b/docs/docs/quick-start/getting-started-02.mdindex 638fdb4b1..4c1acb672 100644--- a/docs/docs/quick-start/getting-started-02.md+++ b/docs/docs/quick-start/getting-started-02.md@@ -259,7 +259,7 @@ But DSPy gives you paths to continue iterating on the quality of your system andIn general, you have the following tools:1. Explore better system architectures for your program, e.g. what if we ask the LM to generate search queries for the retriever? See this [notebook](https://colab.research.google.com/github/stanfordnlp/dspy/blob/main/intro.ipynb) or the [STORM pipeline](https://arxiv.org/abs/2402.14207) built in DSPy.-2. Explore different [prompt optimizers](https://arxiv.org/abs/2406.11695) or [weight optimizers](https://arxiv.org/abs/2407.10930). See the **[Optimizers Docs](/building-blocks/optimizers)**.+2. Explore different [prompt optimizers](https://arxiv.org/abs/2406.11695) or [weight optimizers](https://arxiv.org/abs/2407.10930). See the **[Optimizers Docs](/building-blocks/6-optimizers)**.3. Scale inference time compute using DSPy Optimizers, e.g. this [notebook](https://github.com/stanfordnlp/dspy/blob/main/examples/agents/multi_agent.ipynb).4. Cut cost by distilling to a smaller LM, via prompt or weight optimization, e.g. [this notebook](https://github.com/stanfordnlp/dspy/blob/main/examples/nli/scone/scone.ipynb) or [this notebook](https://colab.research.google.com/github/stanfordnlp/dspy/blob/main/examples/qa/hotpot/multihop_finetune.ipynb).