Examples
Doubleword provides a set of real-world use-case examples that demonstrate different batch inference patterns.
Listing Examples
dw examples listCloning an Example
dw examples clone model-evals
cd model-evals
dw project setup
dw project infoEach example includes a dw.toml manifest, Python code, and a README with full instructions.
Available Examples
Model Evals
Evaluate LLM accuracy at batch pricing. Runs the full GSM8K test set and scores model answers against ground truth.
dw examples clone model-evalsEmbeddings
Batch embeddings for semantic search. Downloads Wikipedia abstracts, generates embeddings, and builds a searchable HNSW index.
dw examples clone embeddingsSynthetic Data Generation
Generate training data at scale. Three-stage pipeline: scenario generation, conversation generation, and quality filtering.
dw examples clone synthetic-data-generationData Processing Pipelines
Clean and enrich company records. Normalize names, deduplicate, and classify industries using real SEC EDGAR data.
dw examples clone data-processing-pipelinesImage Summarization
Vision-language batch inference. Fetches images from Unsplash, encodes them, and generates social media-style summaries.
dw examples clone image-summarizationStructured Extraction
Extract fields from scanned documents. Receipt data extraction with ensemble voting on the SROIE dataset.
dw examples clone structured-extractionBug Detection Ensemble
Classify security vulnerabilities. CWE classification on the CVEfixes dataset with calibration via running twice.
dw examples clone bug-detection-ensembleDataset Compilation
Compile exhaustive datasets with LLM + search. Recursive query expansion, web search, extraction, and filtering.
dw examples clone dataset-compilationAsync Agents
Deep research with recursive multi-agent orchestration. A root agent spawns sub-agents that independently search the web and synthesize findings.
dw examples clone async-agentsRunning an Example
Every example follows the same pattern:
dw examples clone <name>
cd <name>
dw project setup # Install dependencies
dw project info # See the workflow
dw project run-all # Run everythingOr run steps individually — see dw project info for the full workflow.