DSPy
DSPy is an open-source declarative programming framework developed at Stanford University, designed for building applications on top of large language models (LLMs). It abstracts prompt engineering into composable modular components and supports automatic optimization of prompts and model weights, enabling developers to construct and tune language model pipelines programmatically without manually crafting extensive prompts. DSPy's core principle is to separate the declaration of objectives from optimization strategies, improving the maintainability and reproducibility of complex LLM applications.
Core Facts
DSPy is a prompt programming framework developed by Stanford that transforms prompt optimization into a differentiable programming problem.
DSPy's built-in optimizers include BootstrapFewShot and MIPROv2, which can automatically search for the optimal combination of few-shot examples and instruction phrasing.
DSPy (Declarative Self-improving Language Programs) was released by Stanford's NLP lab in 2023.
Timeline (last 90 days)
Frameworks such as DSPy can iteratively optimize prompt templates by evaluating output quality without changing model weights.
DSPy uses a small set of examples to learn the optimal system prompt through genetic-programming-style candidate merging and evaluation.
The main technical approaches to automatic prompt tuning include frameworks such as DSPy and APE (Automatic Prompt Engineer).
DSPy treats prompts as optimizable parameters, automatically adjusting the wording and structure of prompts through multiple forward passes and backward signals (such as task scores).
Usage traces are input/output logs, error messages, and execution paths automatically recorded by the system during operation, and are the core feedback source for mainstream LLM optimization frameworks such as DSPy and TextGrad.
Representative tools in the execution framework layer include LangChain, LlamaIndex, DSPy, and Instructor, among others.
The workshop covers optimization at both the few-shot and instruction-level layers.
DSPy supports saving and reusing optimized DSPy programs, giving optimization results reproducibility and a foundation for engineering management.
When DSPy and MLflow are used together, DSPy is responsible for generating the optimized program while MLflow is responsible for persistently storing the program version, evaluation scores, and experiment context.
In DSPy, a Signature defines the input and output types of a task (similar to a function signature), a Module is the basic unit for executing a task (similar to a layer in a neural network), and multiple Modules can be connected and combined into a Pipeline.
17 more timeline events
All Facts (20)
DSPy is a prompt programming framework developed by Stanford that transforms prompt optimization into a differentiable programming problem.
75%VerifiedDSPy's built-in optimizers include BootstrapFewShot and MIPROv2, which can automatically search for the optimal combination of few-shot examples and instruction phrasing.
75%VerifiedDSPy (Declarative Self-improving Language Programs) was released by Stanford's NLP lab in 2023.
65%UnverifiedDSPy的核心思想是将LLM程序的结构与参数分离,由优化器自动搜索和编译生成最优的提示配置
90%UnverifiedDSPy(Declarative Self-improving Python)由斯坦福大学Omar Khattab等人于2023年提出
90%Unverified提示词工程领域已出现系统化框架如 CRISPE、CO-STAR 和自动化优化工具如 DSPy
90%Unverified2023年以来业界出现了多种将软件工程方法论引入Prompt管理的实践,包括DSPy、LangChain、LlamaIndex和微软Semantic Kernel等
85%UnverifiedDSPy框架将Prompt优化抽象为可编程的模块化管道
85%UnverifiedGIPA据原论文报告仅需三个样本就够开始优化,效果优于强化学习和过去的DSPy优化器
80%UnverifiedFrameworks such as DSPy can iteratively optimize prompt templates by evaluating output quality without changing model weights.
50%UnverifiedDSPy uses a small set of examples to learn the optimal system prompt through genetic-programming-style candidate merging and evaluation.
50%UnverifiedDSPy treats prompts as optimizable parameters, automatically adjusting the wording and structure of prompts through multiple forward passes and backward signals (such as task scores).
50%UnverifiedThe main technical approaches to automatic prompt tuning include frameworks such as DSPy and APE (Automatic Prompt Engineer).
50%UnverifiedUsage traces are input/output logs, error messages, and execution paths automatically recorded by the system during operation, and are the core feedback source for mainstream LLM optimization frameworks such as DSPy and TextGrad.
50%UnverifiedRepresentative tools in the execution framework layer include LangChain, LlamaIndex, DSPy, and Instructor, among others.
50%UnverifiedDSPy has built-in optimizers (such as BootstrapFewShot and MIPRO) that can automatically search for better few-shot examples or instruction phrasing based on evaluation metrics.
50%UnverifiedThe workshop covers optimization at both the few-shot and instruction-level layers.
50%UnverifiedDSPy is an open-source framework developed by Stanford University's NLP team, and its full name is Declarative Self-improving Python.
50%UnverifiedWhen DSPy and MLflow are used together, DSPy is responsible for generating the optimized program while MLflow is responsible for persistently storing the program version, evaluation scores, and experiment context.
50%UnverifiedDSPy supports saving and reusing optimized DSPy programs, giving optimization results reproducibility and a foundation for engineering management.
50%