Skip to content

Commit 0890466

Browse files
committed
update docs
1 parent 0e8928b commit 0890466

24 files changed

+463
-145
lines changed

README.md

Lines changed: 231 additions & 44 deletions
Large diffs are not rendered by default.

docs/about/changelog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7070
mkdir my-dspy-project
7171
cd my-dspy-project
7272
python -m venv .venv # Creates .venv IN project
73-
source .venv/bin/activate
73+
source .venv/bin/activate # For fish: source .venv/bin/activate.fish
7474
pip install dspy-code dspy
7575
dspy-code # Everything stays in my-dspy-project/
7676
```

docs/about/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ DSPy Code is **purpose-built** for DSPy development with deep, specialized knowl
3131
- **Natural Language Interface** - Describe your DSPy task in plain English
3232
- **Built-in MCP Client** - Connect to any MCP server
3333
- **Version-Aware Intelligence** - Adapts to YOUR installed DSPy version
34-
- **Real GEPA Optimization** - Actual Genetic Prompt Evolution Algorithm integration
34+
- **Real GEPA Optimization** - Actual Genetic Pareto integration
3535
- **Codebase Knowledge** - Understands your codebase and DSPy concepts
3636
- **Smart Validation** - Ensures best practices and correctness
3737

docs/getting-started/installation.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,12 @@ cd my-dspy-project
3636
python -m venv .venv
3737

3838
# Activate it
39-
source .venv/bin/activate # On macOS/Linux
40-
# OR
41-
.venv\Scripts\activate # On Windows
39+
# For bash/zsh (macOS/Linux):
40+
source .venv/bin/activate
41+
# For fish shell:
42+
source .venv/bin/activate.fish
43+
# On Windows:
44+
.venv\Scripts\activate
4245
```
4346

4447
!!! success "Why .venv in the Project?"
@@ -88,7 +91,7 @@ pip install dspy
8891
DSPy Code works with any version of DSPy you have installed:
8992

9093
```bash
91-
pip install dspy-ai
94+
pip install dspy
9295
```
9396

9497
!!! info "DSPy Version"
@@ -103,7 +106,7 @@ Check that everything is installed correctly:
103106
cd my-dspy-project
104107

105108
# Activate your virtual environment if not already active
106-
source .venv/bin/activate
109+
source .venv/bin/activate # For fish: source .venv/bin/activate.fish
107110

108111
# Check DSPy Code
109112
dspy-code --help
@@ -190,7 +193,7 @@ If you see this error:
190193

191194
```bash
192195
# Make sure your virtual environment is activated
193-
source .venv/bin/activate
196+
source .venv/bin/activate # For fish: source .venv/bin/activate.fish
194197

195198
# Verify installation
196199
pip list | grep dspy-code
@@ -212,7 +215,7 @@ You are running dspy-code from your home directory!
212215

213216
```bash
214217
cd my-dspy-project
215-
source .venv/bin/activate
218+
source .venv/bin/activate # For fish: source .venv/bin/activate.fish
216219
dspy-code
217220
```
218221

@@ -251,7 +254,7 @@ If you get permission errors, **don't use --user or sudo**. Use a virtual enviro
251254
```bash
252255
cd my-dspy-project
253256
python -m venv .venv
254-
source .venv/bin/activate
257+
source .venv/bin/activate # For fish: source .venv/bin/activate.fish
255258
pip install dspy-code
256259
```
257260

docs/getting-started/quick-start.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,12 @@ If you haven't done this yet, see [Installation Guide](installation.md).
1919
cd my-dspy-project
2020

2121
# Activate your virtual environment
22-
source .venv/bin/activate # macOS/Linux
23-
# OR
24-
.venv\Scripts\activate # Windows
22+
# For bash/zsh (macOS/Linux):
23+
source .venv/bin/activate
24+
# For fish shell:
25+
source .venv/bin/activate.fish
26+
# On Windows:
27+
.venv\Scripts\activate
2528
```
2629

2730
!!! tip "Always Activate Your Venv"

docs/getting-started/understanding.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ class ChainOfThought(Predict):
337337

338338
### GEPA Overview
339339

340-
GEPA (Genetic Prompt Evolution Algorithm) optimizes DSPy programs by:
340+
GEPA (Genetic Pareto) optimizes DSPy programs by:
341341

342342
1. **Evaluation**: Test current performance
343343
2. **Reflection**: Analyze failures

docs/guide/creating-gold-data.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Complete guide to creating high-quality training data for DSPy optimization usin
2323

2424
## Data Requirements for GEPA
2525

26-
GEPA (Genetic Prompt Evolution Algorithm) requires:
26+
GEPA (Genetic Pareto) requires:
2727

2828
**Minimum:**
2929
- 10-20 examples for simple tasks

docs/guide/optimization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Optimization with GEPA
22

3-
Learn how to optimize your DSPy programs using GEPA (Genetic Prompt Evolution Algorithm) for better performance.
3+
Learn how to optimize your DSPy programs using GEPA (Genetic Pareto) for better performance.
44

55
## Quick Start with Natural Language
66

docs/index.md

Lines changed: 125 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -26,31 +26,31 @@ hide:
2626
</h1>
2727

2828
<h2 class="hero-subtitle gradient-text-purple-pink-orange">
29-
Comprehensive CLI to Optimize Your DSPy Code
29+
Develop DSPy Applications • Optimize with GEPA
3030
</h2>
3131
</div>
3232

3333
<div class="hero-middle">
3434
<p class="hero-description">
35-
Your AI-Powered DSPy Development Assistant: Claude Code for DSPy
35+
The Complete Platform for Building and Optimizing DSPy Applications
3636
</p>
3737

3838
<div class="hero-features">
3939
<div class="feature-item">
40-
<span class="feature-icon"></span>
41-
<span class="feature-text">Natural Language</span>
40+
<span class="feature-icon">🏗️</span>
41+
<span class="feature-text">Develop</span>
4242
</div>
4343
<div class="feature-item">
44-
<span class="feature-icon">🔗</span>
45-
<span class="feature-text">MCP Client</span>
44+
<span class="feature-icon">🧬</span>
45+
<span class="feature-text">Optimize</span>
4646
</div>
4747
<div class="feature-item">
48-
<span class="feature-icon">🧬</span>
49-
<span class="feature-text">GEPA Optimization</span>
48+
<span class="feature-icon">🚀</span>
49+
<span class="feature-text">Deploy</span>
5050
</div>
5151
<div class="feature-item">
52-
<span class="feature-icon">🧠</span>
53-
<span class="feature-text">Codebase RAG</span>
52+
<span class="feature-icon">📚</span>
53+
<span class="feature-text">Learn</span>
5454
</div>
5555
</div>
5656
</div>
@@ -86,14 +86,47 @@ hide:
8686

8787
## 🎯 What is DSPy Code?
8888

89-
<div style="background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); padding: 2em; border-radius: 10px; color: white; margin: 2em 0;">
90-
<h3 style="color: white; margin-top: 0;">Comprehensive CLI to Optimize Your DSPy Code - The Living Playbook</h3>
89+
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 2em; margin: 2em 0;">
90+
91+
<div style="background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); padding: 2em; border-radius: 10px; color: white;">
92+
<h3 style="color: white; margin-top: 0;">🏗️ Develop DSPy Applications</h3>
9193
<p style="font-size: 1.1em; line-height: 1.8;">
92-
DSPy Code is an <strong>interactive development environment</strong> that transforms how you learn and build with DSPy.
93-
No need to read docs, books, or tutorials. Just enter the CLI, start building, ask questions, and get answers from your actual code in natural language.
94+
Build, learn, and create DSPy programs with natural language.
95+
Generate signatures, modules, and complete applications with
96+
AI-powered assistance.
9497
</p>
95-
<p style="font-size: 1.1em; line-height: 1.8; margin-bottom: 0;">
96-
<strong>Learn as you build.</strong> Whether you're a complete beginner or a DSPy expert, the CLI adapts to your level and guides you through every step.
98+
<ul style="color: white; padding-left: 1.5em;">
99+
<li>Natural language to code</li>
100+
<li>Codebase understanding</li>
101+
<li>Validation & best practices</li>
102+
<li>20+ templates</li>
103+
</ul>
104+
</div>
105+
106+
<div style="background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); padding: 2em; border-radius: 10px; color: white;">
107+
<h3 style="color: white; margin-top: 0;">🧬 Optimize with GEPA</h3>
108+
<p style="font-size: 1.1em; line-height: 1.8;">
109+
Transform your DSPy code into production-ready applications using
110+
GEPA (Genetic Pareto). Automatically improve accuracy
111+
and achieve better performance.
112+
</p>
113+
<ul style="color: white; padding-left: 1.5em;">
114+
<li>Real GEPA execution</li>
115+
<li>Automated metrics</li>
116+
<li>Prompt evolution</li>
117+
<li>Production-ready code</li>
118+
</ul>
119+
</div>
120+
121+
</div>
122+
123+
<div style="background: rgba(147, 51, 234, 0.1); padding: 2em; border-radius: 10px; margin: 2em 0; text-align: center;">
124+
<h3 style="margin-top: 0;">The Complete Workflow</h3>
125+
<div style="font-size: 1.2em; font-weight: bold; color: var(--md-default-fg-color);">
126+
Develop → Validate → Optimize with GEPA → Deploy
127+
</div>
128+
<p style="margin-bottom: 0;">
129+
From idea to production-ready DSPy application in one platform
97130
</p>
98131
</div>
99132

@@ -125,9 +158,49 @@ hide:
125158

126159
---
127160

161+
## 🔄 Complete Development + Optimization Workflow
162+
163+
<div class="grid cards" markdown>
164+
165+
- :material-code-tags:{ .lg .middle style="color: #7c3aed;" } **Phase 1: Development**
166+
167+
Build your DSPy application from scratch or enhance existing code.
168+
169+
**Steps:**
170+
1. `/init` - Initialize project
171+
2. Natural language commands to generate code
172+
3. `/validate` - Ensure best practices
173+
4. Test and iterate
174+
175+
[Start Developing →](getting-started/quick-start.md){ .md-button }
176+
177+
- :material-trending-up:{ .lg .middle style="color: #ec4899;" } **Phase 2: Optimization**
178+
179+
Optimize your working code with GEPA for production.
180+
181+
**Steps:**
182+
1. `/data` - Generate training examples
183+
2. `/optimize` - Run GEPA optimization
184+
3. `/eval` - Evaluate improvements
185+
4. `/export` - Package for deployment
186+
187+
[Start Optimizing →](guide/optimization.md){ .md-button }
188+
189+
</div>
190+
191+
<div style="background: linear-gradient(90deg, #9333ea, #ec4899, #f97316); padding: 2em; border-radius: 12px; margin: 2em 0; color: white; text-align: center;">
192+
<h3 style="color: white; margin-top: 0;">🎯 The Result</h3>
193+
<p style="font-size: 1.2em; margin-bottom: 0;">
194+
Production-ready DSPy applications with optimized performance,
195+
evolved prompts, and documented improvements
196+
</p>
197+
</div>
198+
199+
---
200+
128201
## 🚀 Use Cases: When to Use DSPy Code
129202

130-
### 1. Starting a New DSPy Project
203+
### 1. 🏗️ Starting a New DSPy Project
131204

132205
**Perfect for:**
133206

@@ -154,7 +227,37 @@ dspy-code
154227

155228
---
156229

157-
### 2. Adding DSPy to Existing Projects
230+
### 2. 🧬 Optimizing DSPy Programs with GEPA
231+
232+
**Perfect for:**
233+
- Improving accuracy of existing programs
234+
- Automatic prompt engineering
235+
- Production optimization
236+
237+
**What you get:**
238+
```bash
239+
# Generate training data
240+
→ Generate 100 examples for sentiment analysis
241+
242+
# Optimize automatically
243+
/optimize my_program.py training_data.jsonl
244+
```
245+
246+
✅ Real GEPA execution (not just code generation)
247+
✅ Automated metric functions
248+
✅ Progress tracking & resumption
249+
✅ Production-ready optimized code
250+
✅ Performance improvements documented
251+
252+
**Real results:** 75% → 92% accuracy automatically!
253+
254+
**Example:** "My sentiment analyzer is 75% accurate. Optimize it with GEPA to reach 90%+"
255+
256+
[Learn GEPA Optimization →](guide/optimization.md){ .md-button .md-button--primary }
257+
258+
---
259+
260+
### 3. Adding DSPy to Existing Projects
158261

159262
**Perfect for:**
160263

@@ -182,7 +285,7 @@ dspy-code
182285

183286
---
184287

185-
### 3. Learning DSPy (No Docs Required!)
288+
### 4. Learning DSPy (No Docs Required!)
186289

187290
**Perfect for:**
188291

@@ -209,7 +312,7 @@ The CLI answers using **YOUR installed DSPy version** and provides working code
209312

210313
---
211314

212-
### 4. Connecting to MCP Servers for Powerful DSPy Programs
315+
### 5. Connecting to MCP Servers for Powerful DSPy Programs
213316

214317
**DSPy Code is an MCP Client!**
215318

@@ -240,35 +343,6 @@ Connect to any MCP (Model Context Protocol) server to supercharge your DSPy prog
240343

241344
---
242345

243-
### 5. Optimizing DSPy Programs with GEPA
244-
245-
**Perfect for:**
246-
247-
- Improving accuracy of existing programs
248-
- Automatic prompt engineering
249-
- Production optimization
250-
251-
**What you get:**
252-
253-
```bash
254-
# Generate training data
255-
→ Generate 100 examples for sentiment analysis
256-
257-
# Optimize automatically
258-
/optimize my_program.py training_data.jsonl
259-
```
260-
261-
✅ AI-generated training data
262-
✅ Automatic GEPA optimization
263-
✅ 10-30% accuracy improvements
264-
✅ Production-ready optimized code
265-
266-
**Real results:** 75% → 92% accuracy automatically!
267-
268-
[Learn GEPA Optimization →](guide/optimization.md){ .md-button }
269-
270-
---
271-
272346
### 6. Building Production AI Applications
273347

274348
**Perfect for:**
@@ -320,7 +394,7 @@ Connect to any MCP (Model Context Protocol) server to supercharge your DSPy prog
320394
321395
- :material-rocket-launch-outline:{ .lg .middle style="color: #8b5cf6;" } **Real GEPA Optimization**
322396
323-
Not mocked. Real genetic prompt evolution that improves your programs by 10-30% automatically.
397+
Not mocked. Real GEPA (Genetic Pareto) optimization that improves your programs by 10-30% automatically.
324398
325399
**Production-grade results.**
326400
@@ -469,7 +543,7 @@ Result: Deep understanding through hands-on building
469543
**Any!** Ollama (local), OpenAI, Anthropic, Gemini. Connect with one command: `/connect ollama llama3.1:8b`
470544

471545
!!! question "Is the optimization real or mocked?"
472-
**Real GEPA optimization!** Actual genetic prompt evolution that improves accuracy by 10-30%.
546+
**Real GEPA optimization!** Actual Genetic Pareto optimization that improves accuracy by 10-30%.
473547

474548
!!! question "Do I need to read documentation?"
475549
**No!** Just ask DSPy Code. It answers questions using your actual installed DSPy version.

docs/reference/commands.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ Run a DSPy program in a sandboxed environment.
163163

164164
### `/optimize` - Optimize with GEPA
165165

166-
Optimize a DSPy program using the Genetic Prompt Evolution Algorithm.
166+
Optimize a DSPy program using GEPA (Genetic Pareto).
167167

168168
**Usage:**
169169
```

0 commit comments

Comments
 (0)