What problem does it solve?
This Skill streamlines the development of AI systems by providing systematic approaches to programming and optimizing LMs declaratively.
Core Features & Use Cases
- Declarative Programming: Program LMs without manual prompting.
- Prompt Optimization: Automate prompt optimization using data-driven methods.
- Modular AI: Build modular AI pipelines and systems that are maintainable and portable.
- Use Case: Build a RAG system for information retrieval and answer generation, with automatic optimization for better model outputs.
Quick Start
Use the dspy skill to create a question answering module for the provided text, with the expected output being a summary of the text.
import dspy
lm = dspy.Claude(model="claude-sonnet-4-5-20250929")
dspy.settings.configure(lm=lm)
class QA(dspy.Signature):
question = dspy.InputField()
answer = dspy.OutputField(desc="summary of the provided text")
qa = dspy.Predict(QA)
response = qa(question="Summarize the text.")
print(response.answer)