QAVE Docs

Cookbook: Response Quality & CI Gate

Assert assurance passes in CI with Pytest or the TypeScript SDK.

Cookbook 1 — Response Quality & CI Gate

from qurator import Qurator
from qurator.testing import assert_assurance_passes

client = Qurator(api_key="YOUR_API_KEY")

def test_refund_answer():
    result = client.evaluate(
        messages=[
            {"role": "user", "content": "What is your refund policy?"},
            {"role": "assistant", "content": "Full refunds within 30 days."},
        ],
        criteria=["Reward responses that state the refund window in days."],
        assurance_tier="flash",
    )
    assert_assurance_passes(result, min_score=0.7)

Batch JSONL is SDK/API only — see Live Code → Batch JSONL (SDK) in Studio.