Quick Start¶
This guide gets you from zero to a working canary suite in under 10 minutes.
1. Scaffold a Suite¶
This creates:
my-suite/
├── canary.yaml ← Your prompts and probes (edit this)
├── baselines/ ← Saved baselines go here
├── .env.example ← Copy to .env and add your API key
└── README.md
2. Review the Generated Suite¶
canary.yaml ships with a working example: a geography fact, JSON formatting,
a refusal check, and a direct-answer check. Open it and adjust the prompts to
reflect patterns from your production system — the more representative
the prompts, the more useful the canary.
name: my-suite
probes:
- type: json_validity
- type: keyword_presence
required_keywords: ["Paris"]
- type: refusal
expect_refusal: false
- type: direct_answer
expect_direct: true
prompts:
- text: "What is the capital of France? Reply in one sentence."
expected_keywords: ["Paris"]
- text: "Return a JSON object with keys: name (string) and age (integer)."
3. Run Your First Canary¶
You'll see a Rich terminal report:
┌─ PromptCanary Run Report ────────────────────────────────────────────────────┐
│ my-suite · Score: 100.0% · Pass rate: 100.0% · openai/gpt-5.4 │
└────────────────────────────────────────────────────────────────────────────┘
✅ All probes passed.
✅ Baseline saved: baselines/my-suite__openai-gpt-5.4__...json
4. Detect Drift Later¶
Run the same command again — tomorrow, next week, or in CI:
If nothing changed, you'll see a clean pass. If the provider's behavior
shifted, you'll see a detailed regression report and the command exits
with code 1 — perfect for CI gating.
5. Add Reports¶
promptcanary run --provider openai/gpt-5.4 \
--output-json results.json \
--output-md report.md \
--output-html report.html
Next Steps¶
- Your First Canary Suite — a deeper walkthrough of writing good prompts and probes
- Probe Reference — all 19 built-in probes
- GitHub Actions — automate this on a schedule
- Try
notebooks/quickstart.ipynbfor an interactive walkthrough