DSPy: The framework for programming—not prompting—language models
Python
Update README.md
Omar Khattabba28bbfbe617
diff --git a/README.md b/README.mdindex 1603552d9..4bcaec4e1 100644--- a/README.md+++ b/README.md@@ -17,9 +17,9 @@**DSPy** is a framework for developing high-quality LM systems for complex tasks. Normally, you have to: (1) break down problems into steps, (2) prompt LMs well for each step, (3) generate synthetic data to improve quality, and (4) finetune smaller LMs to cut costs.-Composing these into the right multi-step pipelines is hard. To help you automate most of this, **DSPy** separates the flow of your program (`modules`) from the parameters (prompt instructions, few-shot examples, and LM weights) of each step, which DSPy `optimizers` can craft and tune if you give them an objective. This creates a systematic space of modular and trainable pieces, instead of hacky 'prompt engineering'.+Composing these into the right multi-step pipelines is hard. To help you automate most of this, **DSPy** separates the flow of your program (`modules`) from the parameters (LM prompts and weights) of each step, which DSPy `optimizers` can craft and tune if you give them an objective. This creates a systematic space of modular and trainable pieces, instead of hacky 'prompt engineering'.-Using **DSPy** is an iterative process. You start by defining a task and the metrics you want to maximize. You also prepare a few example inputs, typically without labels (or only with labels for the final outputs, if your metric requires these). Then, you build your pipeline: select built-in layers (`modules`) to use, give each layer a `signature` (input/output spec), and then simply call your modules in free-form Python code to define your control flow. Lastly, use one of the DSPy `optimizers` to compile your code into high-quality instructions, automatic few-shot examples, updated LM weights for your LM.+Using **DSPy** is an iterative process. You first define your task and the metrics you want to maximize, and prepare a few example inputs — typically without labels (or only with labels for the final outputs, if your metric requires them). Then, you build your pipeline by selecting built-in layers (`modules`) to use, giving each layer a `signature` (input/output spec), and then calling your modules freely in your Python code. Lastly, you use a DSPy `optimizer` to compile your code into high-quality instructions, automatic few-shot examples, or updated LM weights for your LM.**DSPy** can routinely teach powerful models like `GPT-3.5` or `GPT-4` and local models like `T5-base` or `Llama2-13b` to be much more reliable at tasks. **DSPy** will compile the _same program_ into different few-shot prompts and/or finetunes for each LM.