Skip to content

Commit 51415e9

Browse files
committed
Add automatic llms.txt generation via mkdocs-llmstxt plugin. Closes #8562
1 parent 80412ce commit 51415e9

File tree

3 files changed

+88
-1
lines changed

3 files changed

+88
-1
lines changed

docs/README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,14 @@ This guide is for contributors looking to make changes to the documentation in t
7272

7373
2. **Push your new changes on a new branch**: Feel free to add or edit existing documentation and open a PR for your changes. Once your PR is reviewed and approved, the changes will be ready to merge into main.
7474

75-
3. **Updating the website**: Once your changes are merged to main, the changes would be reflected on live websites usually in 5-15 mins.
75+
3. **Updating the website**: Once your changes are merged to main, the changes would be reflected on live websites usually in 5-15 mins.
76+
77+
## LLMs.txt Files
78+
79+
DSPy documentation automatically generates [llmstxt.org](https://llmstxt.org/) compliant files to help LLMs understand and work with DSPy:
80+
81+
- **`/llms.txt`** - A structured overview with links to key documentation sections
82+
- **`/llms-full.txt`** - A comprehensive version with full content for deep understanding
83+
84+
These txt files are automatically generated during the docs build process using the [mkdocs-llmstxt](https://github.com/pawamoy/mkdocs-llmstxt) plugin. When modifying documentation, consider updating the `llmstxt` plugin section within `mkdocs.yml` to help LLMs better understand DSPy's capabilities.
85+

docs/mkdocs.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,82 @@ plugins:
236236
"docs/quick-start/getting-started-02.md": "tutorials/rag/index.ipynb"
237237
"quick-start/getting-started-01.md": "tutorials/rag/index.ipynb"
238238
"quick-start/getting-started-02.md": "tutorials/rag/index.ipynb"
239+
- llmstxt:
240+
markdown_description: >
241+
DSPy is the framework for programming—rather than prompting—language models.
242+
DSPy unifies techniques for prompting, fine-tuning, reasoning, tool use, and evaluation of LMs.
243+
It provides a systematic approach to building AI applications through composable modules,
244+
optimization techniques, and evaluation frameworks.
245+
full_output: llms-full.txt
246+
sections:
247+
Getting Started:
248+
- index.md: DSPy overview and quick start
249+
- faqs.md: Frequently asked questions
250+
- cheatsheet.md: DSPy cheatsheet
251+
Core Learning:
252+
- learn/index.md: Learn DSPy fundamentals
253+
- learn/programming/*.md: Programming concepts - signatures, modules, language models
254+
- learn/evaluation/*.md: Evaluation framework - data handling, metrics, overview
255+
- learn/optimization/*.md: Optimization techniques and optimizers
256+
Building AI Programs:
257+
- tutorials/build_ai_program/index.md: Building AI programs overview
258+
- tutorials/conversation_history/index.md: Managing conversation history
259+
- tutorials/custom_module/index.ipynb: Customizing DSPy modules
260+
- tutorials/classification/index.md: Classification with DSPy
261+
- tutorials/rag/index.ipynb: Retrieval-Augmented Generation
262+
- tutorials/agents/index.ipynb: Building AI agents
263+
- tutorials/customer_service_agent/index.ipynb: Customer service agents
264+
- tutorials/entity_extraction/index.ipynb: Entity extraction
265+
- tutorials/multihop_search/index.ipynb: Multi-hop search and reasoning
266+
- tutorials/program_of_thought/index.ipynb: Program of thought reasoning
267+
- tutorials/tool_use/index.ipynb: Advanced tool use
268+
Optimization and Training:
269+
- tutorials/optimize_ai_program/index.md: Optimization overview
270+
- tutorials/math/index.ipynb: Math reasoning optimization
271+
- tutorials/classification_finetuning/index.ipynb: Classification fine-tuning
272+
- tutorials/games/index.ipynb: Agent fine-tuning with games
273+
- tutorials/rl_ai_program/index.md: Reinforcement learning overview
274+
- tutorials/rl_papillon/index.ipynb: RL for privacy-conscious delegation
275+
- tutorials/rl_multihop/index.ipynb: RL for multi-hop research
276+
Specialized Use Cases:
277+
- tutorials/papillon/index.md: Privacy-conscious delegation
278+
- tutorials/image_generation_prompting/index.ipynb: Image generation prompting
279+
- tutorials/audio/index.ipynb: Audio processing with DSPy
280+
- tutorials/ai_text_game/index.md: Creative text-based AI games
281+
- tutorials/email_extraction/index.md: Email information extraction
282+
- tutorials/sample_code_generation/index.md: Code generation for libraries
283+
- tutorials/llms_txt_generation/index.md: Generating llms.txt files
284+
- tutorials/mem0_react_agent/index.md: Memory-enabled ReAct agents
285+
- tutorials/yahoo_finance_react/index.md: Financial analysis agents
286+
Development and Deployment:
287+
- tutorials/core_development/index.md: Development workflow
288+
- tutorials/mcp/index.md: Model Context Protocol integration
289+
- tutorials/output_refinement/best-of-n-and-refine.md: Output refinement techniques
290+
- tutorials/saving/index.md: Saving and loading models
291+
- tutorials/cache/index.md: Caching strategies
292+
- tutorials/deployment/index.md: Production deployment
293+
- tutorials/observability/index.md: Debugging and observability
294+
- tutorials/optimizer_tracking/index.md: Tracking optimizer performance
295+
- tutorials/streaming/index.md: Streaming responses
296+
- tutorials/async/index.md: Asynchronous processing
297+
- production/index.md: DSPy in production environments
298+
API Reference - Core:
299+
- api/index.md: API documentation overview
300+
- api/modules/*.md: Core modules - Predict, ChainOfThought, ReAct, etc.
301+
- api/signatures/*.md: Signature system - InputField, OutputField, Signature
302+
- api/primitives/*.md: Core primitives - Example, Prediction, History, etc.
303+
API Reference - Optimizers:
304+
- api/optimizers/*.md: All optimizers - BootstrapFewShot, COPRO, MIPROv2, etc.
305+
API Reference - Adapters and Tools:
306+
- api/adapters/*.md: Input/output adapters - ChatAdapter, JSONAdapter, etc.
307+
- api/evaluation/*.md: Evaluation metrics and tools
308+
- api/models/*.md: Language model interfaces
309+
- api/tools/*.md: Built-in tools - ColBERTv2, Embeddings, PythonInterpreter
310+
- api/utils/*.md: Utility functions and helpers
311+
Community:
312+
- community/community-resources.md: Community resources
313+
- community/use-cases.md: Real-world use cases
314+
- community/how-to-contribute.md: Contributing guidelines
239315

240316
extra:
241317
social:

docs/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ mkdocs-material[imaging]
55
mkdocs-redirects
66
mkdocstrings
77
mkdocstrings-python
8+
mkdocs-llmstxt>=0.3.0
89
urllib3==1.26.6
910
mistune==3.0.2

0 commit comments

Comments
 (0)