dspy-1-start-simple-then-optimize

Sub-skill of dspy: 1. Start Simple, Then Optimize (+2).

5 stars

Best use case

dspy-1-start-simple-then-optimize is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Sub-skill of dspy: 1. Start Simple, Then Optimize (+2).

Teams using dspy-1-start-simple-then-optimize should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/1-start-simple-then-optimize/SKILL.md --create-dirs "https://raw.githubusercontent.com/vamseeachanta/workspace-hub/main/.agents/skills/_archive/ai/prompting/dspy/1-start-simple-then-optimize/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/1-start-simple-then-optimize/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How dspy-1-start-simple-then-optimize Compares

Feature / Agentdspy-1-start-simple-then-optimizeStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Sub-skill of dspy: 1. Start Simple, Then Optimize (+2).

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 1. Start Simple, Then Optimize (+2)

## 1. Start Simple, Then Optimize


```python
# 1. Start with basic Predict
basic = dspy.Predict("question -> answer")

# 2. Add ChainOfThought if needed
cot = dspy.ChainOfThought("question -> answer")

# 3. Optimize only after baseline is established
optimized = optimizer.compile(cot, trainset=data)
```


## 2. Quality Training Data


```python
def create_training_example(question, answer, inputs=["question"]):
    """Create well-formed training example."""
    example = dspy.Example(
        question=question,
        answer=answer
    )
    return example.with_inputs(*inputs)

# Include diverse examples
trainset = [
    create_training_example("Simple question?", "Simple answer"),
    create_training_example("Complex technical question?", "Detailed answer..."),
    create_training_example("Edge case question?", "Careful handling..."),
]
```


## 3. Meaningful Metrics


```python
def comprehensive_metric(example, prediction, trace=None):
    """Combine multiple evaluation dimensions."""
    scores = {
        "correctness": check_correctness(example, prediction),
        "completeness": check_completeness(prediction),
        "format": check_format(prediction),
        "citations": check_citations(prediction)
    }

    weights = {"correctness": 0.4, "completeness": 0.3, "format": 0.15, "citations": 0.15}

    return sum(scores[k] * weights[k] for k in scores)
```

Related Skills

session-start-dirty-state-triage-with-background-agents

5
from vamseeachanta/workspace-hub

Distinguish real implementation dirt from generated session-state churn when resuming a repo with active overnight/background agents.

session-start-routine

5
from vamseeachanta/workspace-hub

Pre-flight checks at session start — load context, check prior state, validate env, check for in-flight work from other terminals

seo-optimizer

5
from vamseeachanta/workspace-hub

SEO optimization toolkit with scoring, keyword research, and technical SEO auditing. Use for improving search rankings, content optimization, and technical SEO fixes. Based on alirezarezvani/Codex-skills.

dspy

5
from vamseeachanta/workspace-hub

Build complex AI systems with declarative programming, optimize prompts automatically, create modular RAG systems and agents with DSPy - Stanford NLP's framework for systematic LM programming

agent-usage-optimizer

5
from vamseeachanta/workspace-hub

Reads quota state and recommends optimal Codex/Codex/Gemini allocation per task

mkdocs-line-number-start

5
from vamseeachanta/workspace-hub

Sub-skill of mkdocs: Line Number Start.

agent-teams-subagent-startup-convention

5
from vamseeachanta/workspace-hub

Sub-skill of agent-teams: Subagent startup convention (+2).

clinical-trial-protocol-startup-welcome-and-mode-selection

5
from vamseeachanta/workspace-hub

Sub-skill of clinical-trial-protocol: Startup: Welcome and Mode Selection (+1).

catenary-riser-1-simple-catenary-analysis

5
from vamseeachanta/workspace-hub

Sub-skill of catenary-riser: 1. Simple Catenary Analysis (+2).

google-earth-engine-11-authentication

5
from vamseeachanta/workspace-hub

Sub-skill of google-earth-engine: 1.1 Authentication (+2).

paraview-interface-python-script-structure-paraviewsimple

5
from vamseeachanta/workspace-hub

Sub-skill of paraview-interface: Python Script Structure (paraview.simple) (+5).

webapp-testing-start-server-before-testing

5
from vamseeachanta/workspace-hub

Sub-skill of webapp-testing: Start Server Before Testing (+1).