Requirements
- Python 3.12 or higher
- pip or uv package manager
Install with uv (Recommended)
uv is a fast Python package installer and resolver:Install with pip
Verify Installation
Check that Merit is installed correctly:Set Up API Keys (Optional)
For AI Predicates (LLM-as-a-Judge)
If you plan to use AI-powered assertions, you’ll need Merit API credentials:.env
Get API Access: Contact us to get your Merit API key.AI predicates (
has_facts, has_topics, etc.) call the Merit cloud service. Regular assertions work without any API keys.For Error Analyzer (Bring Your Own Key)
If you plan to use Merit Analyzer, you’ll need Anthropic credentials (direct API or via AWS Bedrock):Project Setup
Create a new project directory:- Start with
test_or end with_test.py - Contain functions starting with
merit_
Next Steps
Write Your First Test
Create and run your first Merit test