input (required) and an optional expected_output. You keep them alongside your prompts and run them directly from the CLI.
Quick start
1. Create a dataset file (agentmark/datasets/sentiment.jsonl):
Dataset structure
Each line must be valid JSON:input(required) - Props passed to your promptexpected_output(optional) - Expected result for evaluation
What to test
Common cases:Expected-output types
Strings (classification):Dataset size
Start small (10-20 cases):- 5-7 common scenarios
- 3-5 edge cases
- 2-3 failure modes
- Initial development: 50-100 cases (recommended by Confident AI)
- Statistical significance: ~250 cases (for 95% confidence, 5% margin of error)
- Production systems: 100-300 cases minimum
- High-stakes applications: 300+ cases
Best practices
- One test case per line (valid JSONL)
- Use descriptive inputs that clearly show what the test case validates
- Version control datasets alongside prompts
- Avoid duplicates - each case should validate something unique
- Always anonymize data (never leak sensitive information)
Advanced: held-out test sets
Create separate datasets to avoid over-fitting:- Never iterate on held-out data
- Don’t peek at held-out results during development
- If you look at held-out results and make changes, create a new held-out set
Advanced: statistical significance
Sample size requirements (source):- Quick iteration: 10-20 cases (directional feedback only)
- Initial development: 50-100 cases (industry standard)
- Statistical rigor: ~250 cases (95% confidence, 5% margin of error)
- Production deployment: 100-300 cases minimum
- High-stakes systems: 300+ cases
If you only have 50 test cases, you can only reliably detect large improvements (>15%); smaller improvements look like noise. Plan your dataset size around the smallest improvement that matters to your application before you start collecting cases.
Next steps
Evaluations
Write evaluation functions
Running experiments
Test your datasets
Testing overview
Learn testing concepts
Have questions?
Reach out any time:
- Email the team at hello@agentmark.co for support
- Schedule an Enterprise Demo to learn about AgentMark’s business solutions