Skip to content
This page is not translated yet — showing the original. We never ship machine translation as a placeholder.
One commandMIT Tested
DSPy

DSPy

In one line:DSPy 是一个斯坦福开源的框架,主张用代码而不是手写提示词来构建大模型应用,能自动优化提示。

别手写提示词了——用代码的方式声明任务,让框架自己把提示优化好。

Official source

We host and mirror nothing — the official page is the source of truth.

Official icon for DSPy stanfordnlphttps://github.com/stanfordnlp/dspyOpen official page
Official sourceYou are leaving AIWorksWell for stanfordnlp. That site is not under our control; its content, privacy and security are its own responsibility. Please judge for yourself.

Install prompt

Copy it, paste it into your AI (Claude Code, Codex, ChatGPT…), and it installs and verifies for you.

48 lines
我需要你帮我在我的机器上安装并运行一个软件。

【软件信息】
名称:DSPy
用途:别手写提示词了——用代码的方式声明任务,让框架自己把提示优化好。
官方来源:https://github.com/stanfordnlp/dspy
许可:MIT
Scroll inside the box with your mouse wheel — copying still gives you the full prompt1550 chars

Copy → paste into your own AI → it installs for you

Contact the original author (stanfordnlp)

Bugs in the software itself go to the author's own official channel — that is where they actually receive them. We pass things on; we do not answer for the author.

Install failed?

Paste the raw error — once triaged and verified it is written back here, so the next person's AI avoids it. No login needed.

About this entry

它是什么

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)。

Summary for AI

DSPy 是斯坦福 NLP 组的开源框架(MIT),用代码声明任务,让框架自动优化提示,减少手写提示词的工作。

A self-contained answer paragraph — this is the part AI search quotes. · Page reviewed 2026-10-06

FAQ

它解决什么问题?

把手写提示词这件事交给框架,通过声明任务与示例自动优化。

许可能商用吗?

标的是 MIT,可按 MIT 条款使用。

Pitfalls / known issues

All recorded from real installs, and injected into the prompt above.

  • •版本迭代快,教程与已安装版本的 API 可能对不上,注意对照官方版本说明。
  • •没配 API Key 时一调用就报错——先设好环境变量里的密钥。
  • •优化器(optimizer)会多次调用模型,跑之前先估算调用量,避免额度超支。

You might also like

We store, mirror and repackage nothing. Every install path points to the author’s own official page.

Nothing here has been reviewed by an app store. Judge the source and licence yourself; you install at your own risk.