它是什么
DSPy 是斯坦福开源(MIT)的框架,主张用编程而不是手写提示词来构建大模型应用:你用代码声明"要做什么",框架负责把提示词优化到更好。它把"提示工程"从反复试字,变成了可测试、可迭代的模块化流程——对学习如何系统性构建 LLM 应用的人,是一条很值得走的路径。来源:https://github.com/stanfordnlp/dspyhttps://github.com/stanfordnlp/dspy
怎么用起来
主推「复制提示词」——让 AI 帮你建环境、配 Key、跑通第一个例子。人工兜底:pip install dspy → 配置一家 LLM 的 API Key → 照官方教程定义一个"签名"和"模块",编译后调用。来源:https://github.com/stanfordnlp/dspyhttps://github.com/stanfordnlp/dspy
以上坑来自 https://github.com/stanfordnlp/dspyhttps://github.com/stanfordnlp/dspy 与官方文档。
来源与署名
Mentioned from:https://github.com/stanfordnlp/dspyhttps://github.com/stanfordnlp/dspy · 原作者 stanfordnlp(MIT)。
