-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathmkdocs.yml
More file actions
336 lines (322 loc) · 14.6 KB
/
mkdocs.yml
File metadata and controls
336 lines (322 loc) · 14.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
site_name: DSPy
site_description: The framework for programming—rather than prompting—language models.
site_url: https://dspy.ai/
repo_url: https://github.com/stanfordnlp/dspy
repo_name: stanfordnlp/dspy
edit_uri: blob/main/docs/docs/
docs_dir: "docs/"
nav:
- Get Started: index.md
- Learn DSPy:
- Learning DSPy: learn/index.md
- DSPy Programming:
- Programming Overview: learn/programming/overview.md
- Language Models: learn/programming/language_models.md
- Signatures: learn/programming/signatures.md
- Modules: learn/programming/modules.md
- Adapters: learn/programming/adapters.md
- Tools: learn/programming/tools.md
- MCP: learn/programming/mcp.md
- DSPy Evaluation:
- Evaluation Overview: learn/evaluation/overview.md
- Data Handling: learn/evaluation/data.md
- Metrics: learn/evaluation/metrics.md
- DSPy Optimization:
- Optimization Overview: learn/optimization/overview.md
- Optimizers: learn/optimization/optimizers.md
- Tutorials:
- Tutorials Overview: tutorials/index.md
- Build AI Programs with DSPy:
- Overview: tutorials/build_ai_program/index.md
- Managing Conversation History: tutorials/conversation_history/index.md
- Building AI Agents with DSPy: tutorials/customer_service_agent/index.ipynb
- Building AI Applications by Customizing DSPy Modules: tutorials/custom_module/index.ipynb
- Retrieval-Augmented Generation (RAG): tutorials/rag/index.ipynb
- Building RAG as Agent: tutorials/agents/index.ipynb
- Entity Extraction: tutorials/entity_extraction/index.ipynb
- Classification: tutorials/classification/index.md
- Multi-Hop RAG: tutorials/multihop_search/index.ipynb
- Privacy-Conscious Delegation: tutorials/papillon/index.md
- Program Of Thought: tutorials/program_of_thought/index.ipynb
- Image Generation Prompt iteration: tutorials/image_generation_prompting/index.ipynb
- Audio: tutorials/audio/index.ipynb
- Optimize AI Programs with DSPy:
- Overview: tutorials/optimize_ai_program/index.md
- Math Reasoning: tutorials/math/index.ipynb
- Classification Finetuning: tutorials/classification_finetuning/index.ipynb
- Advanced Tool Use: tutorials/tool_use/index.ipynb
- Finetuning Agents: tutorials/games/index.ipynb
- Reflective Prompt Evolution with dspy.GEPA:
- Overview: tutorials/gepa_ai_program/index.md
- GEPA for AIME (Math): tutorials/gepa_aime/index.ipynb
- GEPA for Structured Information Extraction for Enterprise Tasks: tutorials/gepa_facilitysupportanalyzer/index.ipynb
- GEPA for Privacy-Conscious Delegation: tutorials/gepa_papillon/index.ipynb
- GEPA for Code Backdoor Classification (AI control): tutorials/gepa_trusted_monitor/index.ipynb
- Experimental RL Optimization for DSPy:
- Overview: tutorials/rl_ai_program/index.md
- RL for Privacy-Conscious Delegation: tutorials/rl_papillon/index.ipynb
- RL for Multi-Hop Research: tutorials/rl_multihop/index.ipynb
- Tools, Development, and Deployment:
- Overview: tutorials/core_development/index.md
- Use MCP in DSPy: tutorials/mcp/index.md
- Output Refinement: tutorials/output_refinement/best-of-n-and-refine.md
- Saving and Loading: tutorials/saving/index.md
- Cache: tutorials/cache/index.md
- Deployment: tutorials/deployment/index.md
- Debugging & Observability: tutorials/observability/index.md
- Tracking DSPy Optimizers: tutorials/optimizer_tracking/index.md
- Streaming: tutorials/streaming/index.md
- Async: tutorials/async/index.md
- Real-World Examples:
- Overview: tutorials/real_world_examples/index.md
- Generating llms.txt: tutorials/llms_txt_generation/index.md
- Memory-Enabled ReAct Agents: tutorials/mem0_react_agent/index.md
- Financial Analysis with Yahoo Finance: tutorials/yahoo_finance_react/index.md
- Email Information Extraction: tutorials/email_extraction/index.md
- Code Generation for Unfamiliar Libraries: tutorials/sample_code_generation/index.md
- Building a Creative Text-Based AI Game: tutorials/ai_text_game/index.md
- Deployment:
- Deploying DSPy: production/index.md
- Community:
- Use Cases: community/use-cases.md
- Built with DSPy: community/built-with-dspy.md
- Resources: community/community-resources.md
- Contributing: community/how-to-contribute.md
- FAQ:
- FAQ: faqs.md
- Cheatsheet: cheatsheet.md
- API Reference:
- API Reference: api/index.md
- Adapters:
- Adapter: api/adapters/Adapter.md
- ChatAdapter: api/adapters/ChatAdapter.md
- XMLAdapter: api/adapters/XMLAdapter.md
- JSONAdapter: api/adapters/JSONAdapter.md
- TwoStepAdapter: api/adapters/TwoStepAdapter.md
- Evaluation:
- CompleteAndGrounded: api/evaluation/CompleteAndGrounded.md
- Evaluate: api/evaluation/Evaluate.md
- EvaluationResult: api/evaluation/EvaluationResult.md
- SemanticF1: api/evaluation/SemanticF1.md
- answer_exact_match: api/evaluation/answer_exact_match.md
- answer_passage_match: api/evaluation/answer_passage_match.md
- Experimental:
- Citations: api/experimental/Citations.md
- Document: api/experimental/Document.md
- Models:
- Embedder: api/models/Embedder.md
- LM: api/models/LM.md
- Modules:
- BestOfN: api/modules/BestOfN.md
- ChainOfThought: api/modules/ChainOfThought.md
- CodeAct: api/modules/CodeAct.md
- Module: api/modules/Module.md
- MultiChainComparison: api/modules/MultiChainComparison.md
- Parallel: api/modules/Parallel.md
- Predict: api/modules/Predict.md
- ProgramOfThought: api/modules/ProgramOfThought.md
- ReAct: api/modules/ReAct.md
- Refine: api/modules/Refine.md
- RLM: api/modules/RLM.md
- Optimizers:
- GEPA:
- 1. GEPA Overview: api/optimizers/GEPA/overview.md
- 2. GEPA Advanced: api/optimizers/GEPA/GEPA_Advanced.md
- BetterTogether: api/optimizers/BetterTogether.md
- BootstrapFewShot: api/optimizers/BootstrapFewShot.md
- BootstrapFewShotWithRandomSearch: api/optimizers/BootstrapFewShotWithRandomSearch.md
- BootstrapFinetune: api/optimizers/BootstrapFinetune.md
- BootstrapRS: api/optimizers/BootstrapRS.md
- COPRO: api/optimizers/COPRO.md
- Ensemble: api/optimizers/Ensemble.md
- InferRules: api/optimizers/InferRules.md
- KNN: api/optimizers/KNN.md
- KNNFewShot: api/optimizers/KNNFewShot.md
- LabeledFewShot: api/optimizers/LabeledFewShot.md
- MIPROv2: api/optimizers/MIPROv2.md
- SIMBA: api/optimizers/SIMBA.md
- Primitives:
- Audio: api/primitives/Audio.md
- Code: api/primitives/Code.md
- Example: api/primitives/Example.md
- History: api/primitives/History.md
- Image: api/primitives/Image.md
- Prediction: api/primitives/Prediction.md
- Tool: api/primitives/Tool.md
- ToolCalls: api/primitives/ToolCalls.md
- Signatures:
- InputField: api/signatures/InputField.md
- OutputField: api/signatures/OutputField.md
- Signature: api/signatures/Signature.md
- Tools:
- ColBERTv2: api/tools/ColBERTv2.md
- Embeddings: api/tools/Embeddings.md
- PythonInterpreter: api/tools/PythonInterpreter.md
- Utils:
- configure: api/utils/configure.md
- context: api/utils/context.md
- StatusMessage: api/utils/StatusMessage.md
- StatusMessageProvider: api/utils/StatusMessageProvider.md
- StreamListener: api/utils/StreamListener.md
- asyncify: api/utils/asyncify.md
- configure_cache: api/utils/configure_cache.md
- disable_litellm_logging: api/utils/disable_litellm_logging.md
- disable_logging: api/utils/disable_logging.md
- enable_litellm_logging: api/utils/enable_litellm_logging.md
- enable_logging: api/utils/enable_logging.md
- inspect_history: api/utils/inspect_history.md
- load: api/utils/load.md
- streamify: api/utils/streamify.md
theme:
name: material
custom_dir: overrides
features:
- navigation.tabs
- navigation.path
- navigation.indexes
- navigation.expand
- toc.follow
- toc.integrate
- navigation.top
- search.suggest
- search.highlight
- content.tabs.link
- content.code.annotation
- content.code.copy
- navigation.footer
- content.action.edit
language: en
palette:
- scheme: default
toggle:
icon: material/weather-night
name: Switch to dark mode
primary: white
accent: black
- scheme: slate
toggle:
icon: material/weather-sunny
name: Switch to light mode
primary: black
accent: lime
icon:
repo: fontawesome/brands/git-alt
edit: material/pencil
view: material/eye
logo: static/img/dspy_logo.png
favicon: static/img/logo.png
extra_css:
- stylesheets/extra.css
plugins:
- social
- search:
lang: en
separator: '[\s\-\.]+'
- mkdocstrings:
handlers:
python:
options:
docstring_style: google
show_source: true
show_root_heading: true
heading_level: 3
members_order: source
separate_signature: false
show_category_heading: true
show_symbol_type_heading: true
show_docstring_parameters: true
show_if_no_docstring: true
show_signature_annotations: true
unwrap_annotated: true
annotations_path: brief
docstring_section_style: table
merge_init_into_class: true
rendering:
show_if_no_docstring: true
show_warnings: false
html_meta: false
- mkdocs-jupyter:
ignore_h1_titles: true
- redirects:
redirect_maps:
# Redirect /intro/ to the main page
"intro/index.md": "index.md"
"intro.md": "index.md"
"deep-dive/optimizers/bootstrap-fewshot.md": "api/optimizers/BootstrapFewShot.md"
"deep-dive/optimizers/bfrs.md": "api/optimizers/BootstrapFewShotWithRandomSearch.md"
"deep-dive/optimizers/BootstrapFinetune.md": "api/optimizers/BootstrapFinetune.md"
"deep-dive/optimizers/copro.md": "api/optimizers/COPRO.md"
"deep-dive/optimizers/Ensemble.md": "api/optimizers/Ensemble.md"
"deep-dive/optimizers/LabeledFewShot.md": "api/optimizers/LabeledFewShot.md"
"deep-dive/optimizers/miprov2.md": "api/optimizers/MIPROv2.md"
"api/optimizers/GEPA/index.md": "api/optimizers/GEPA/overview.md"
"docs/quick-start/getting-started-01.md": "tutorials/rag/index.ipynb"
"docs/quick-start/getting-started-02.md": "tutorials/rag/index.ipynb"
"quick-start/getting-started-01.md": "tutorials/rag/index.ipynb"
"quick-start/getting-started-02.md": "tutorials/rag/index.ipynb"
"community/community-ports.md": "community/built-with-dspy.md"
"production/companies.md": "community/use-cases.md"
- llmstxt:
markdown_description: >
DSPy is the framework for programming—rather than prompting—language models.
DSPy unifies techniques for prompting, fine-tuning, reasoning, tool use, and evaluation of LMs.
It provides a systematic approach to building AI applications through composable modules,
optimization techniques, and evaluation frameworks.
sections:
Get Started:
- index.md: DSPy overview and quick start guide
Learn DSPy - Learning DSPy:
- learn/index.md: Three stages of building AI systems - programming, evaluation, and optimization
Learn DSPy - DSPy Programming:
- learn/programming/**.md
Learn DSPy - DSPy Evaluation:
- learn/evaluation/**.md
Learn DSPy - DSPy Optimization:
- learn/optimization/**.md
# Since we don't have a learn/**.md, future sections within learn/ should be added here
# to ensure they show up in the llms.txt navigation
Tutorials - Docs:
- tutorials/**.md
Tutorials - Notebooks:
- tutorials/**.ipynb
Community:
- community/**.md
FAQ:
- faqs.md: Common questions on DSPy usage, comparisons, optimization, and debugging
- cheatsheet.md: DSPy cheatsheet for quick reference
API Reference:
- api/**.md
extra:
social:
- icon: fontawesome/brands/github
link: https://github.com/stanfordnlp/dspy
- icon: fontawesome/brands/discord
link: https://discord.gg/XCGy2WDCQB
extra_javascript:
- "js/runllm-widget.js"
- "js/tutorial-nav.js"
- "js/copy-as-markdown.js"
markdown_extensions:
- toc:
permalink: true
toc_depth: 3
- pymdownx.tabbed:
alternate_style: true
- pymdownx.highlight:
anchor_linenums: true
- pymdownx.inlinehilite
- pymdownx.snippets
- admonition
- pymdownx.arithmatex:
generic: true
- footnotes
- pymdownx.details
- pymdownx.superfences
- pymdownx.mark
- attr_list
- md_in_html
- pymdownx.emoji:
emoji_index: !!python/name:material.extensions.emoji.twemoji
emoji_generator: !!python/name:material.extensions.emoji.to_svg
copyright: |
© 2025 <a href="https://github.com/stanfordnlp" target="_blank" rel="noopener">DSPy</a>