This quickstart uses dataset mode — you pass your AI inputs and outputs directly. If you already have tracing set up, see Failure Analysis from traces instead.
Step 1: Install the SDK
Step 2: Set your API key
Step 3: Run Failure Analysis
Create a file calledquickstart.py and paste:
quickstart.py
What you’ll see
The output intentionally passes a wrong answer (“Berlin” instead of “Paris”) so you can see a real failure detected:The exact bucket names, severity scores, and rationale text may vary slightly depending on your backend configuration and LLM judge version.
Understanding the result
Theresult object is an FARunResult with these key fields:
Next: Fix the failure →
Learn how to interpret the result, understand root causes, and fix your prompt.