Install Merit
Merit requires Python 3.12 or higher. Install directly from GitHub usinguv (recommended) or pip:
Write Your First Test
Create a file calledtest_chatbot.py:
test_chatbot.py
Run Your Tests
Add AI-Powered Assertions
Now let’s add an LLM-as-a-Judge assertion. First, set up your Merit API credentials:.env
AI predicates call the Merit cloud service. You need a Merit API key - contact us to get access.
test_chatbot.py
Use Parametrization
Test multiple inputs easily:test_chatbot.py