Skip to content

armgit / dspy

Public Imported from GitHub
0

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

Python

update docs

Omar Khattab1f23080da63b
diff --git a/docs/docs/learn/index.md b/docs/docs/learn/index.md
index 5b37e12e6..a490619f2 100644
--- a/docs/docs/learn/index.md
+++ b/docs/docs/learn/index.md
@@ -4,11 +4,11 @@ sidebar_position: 1
# Learning DSPy: An Overview
-DSPy exposes a very small API that you can learn quickly, but building new AI systems is a more open-ended journey of composing the tools and design patterns in DSPy to optimize for _your_ objectives. The three stages of building AI systems in DSPy are:
+DSPy exposes a very small API that you can learn quickly. However, building a new AI system is a more open-ended journey of iterative development, in which you compose the tools and design patterns of DSPy to optimize for _your_ objectives. The three stages of building AI systems in DSPy are:
-1) **DSPy Programming.** This is all about defining your task, its constraints, exploring a few examples, and using that to inform your initial pipeline design.
+1) **DSPy Programming.** This is about defining your task, its constraints, exploring a few examples, and using that to inform your initial pipeline design.
-2) **DSPy Evaluation.** Once your system works reasonably well, this is the stage where you collect an initial development set, define your DSPy metric, and use these to iterate on your system more systematically.
+2) **DSPy Evaluation.** Once your system starts working, this is the stage where you collect an initial development set, define your DSPy metric, and use these to iterate on your system more systematically.
3) **DSPy Optimization.** Once you have a way to evaluate your system, you use DSPy optimizers to tune the prompts or weights in your program.
diff --git a/docs/docs/learn/programming/overview.md b/docs/docs/learn/programming/overview.md
index c804ee615..959e0d678 100644
--- a/docs/docs/learn/programming/overview.md
+++ b/docs/docs/learn/programming/overview.md
@@ -4,9 +4,9 @@ sidebar_position: 1
# Programming in DSPy
-DSPy is a bet on _writing code instead of strings_: building the right control flow is crucial. Start by **defining your task**. What are the inputs to your system? What should your system produce as output? Is it a chatbot over your data or perhaps a code assistant? Or maybe a system for translation, for highlighting snippets from search results, or for generating reports with citations?
+DSPy is a bet on _writing code instead of strings_. In other words, building the right control flow is crucial. Start by **defining your task**. What are the inputs to your system and what should your system produce as output? Is it a chatbot over your data or perhaps a code assistant? Or maybe a system for translation, for highlighting snippets from search results, or for generating reports with citations?
-Next, **define your initial pipeline**. Can your DSPy program just be a single module or do you need to break it down into a few steps? Do you need retrieval or other tools, like a calculator or a calendar API? Is there a typical workflow for solving your problem in multiple well-scoped steps, or do you want more open-ended tool use with agents for your task? Think about this space but always start simple, perhaps with just a single `dspy.ChainOfThought` module, then add complexity incrementally based on observations.
+Next, **define your initial pipeline**. Can your DSPy program just be a single module or do you need to break it down into a few steps? Do you need retrieval or other tools, like a calculator or a calendar API? Is there a typical workflow for solving your problem in multiple well-scoped steps, or do you want more open-ended tool use with agents for your task? Think about these but start simple, perhaps with just a single `dspy.ChainOfThought` module, then add complexity incrementally based on observations.
As you do this, **craft and try a handful of examples** of the inputs to your program. Consider using a powerful LM at this point, or a couple of different LMs, just to understand what's possible. Record interesting (both easy and hard) examples you try. This will be useful when you are doing evaluation and optimization later.