Skip to main content
Every example in this index is a complete, runnable program in crates/dspy-rs/examples/. Most need an OPENAI_API_KEY; a few run fully offline against the in-process test client and say so in their header comment. Run any of them with:
Some examples need a feature flag (noted in the file header), for example --features dataloaders for the HotpotQA ones.

The examples

The front desk examples

These nine exercise a small support-desk pipeline end to end. Each maps to a component page and is kept compiling by CI.
The 9x- files (90 through 94, plus the 97-99 benches) are CI surfaces: smoke slices that exercise typed predict, chain of thought, module authoring, ReAct, and the optimizer interface, and a few performance benchmarks. They are kept deliberately boring and stable; read them as compatibility contracts rather than tutorials.