Skip to main content
Run Failure Analysis on your existing AI data in three steps. No tracing, no instrumentation, no OpenAI key needed.
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

Get your API key from the Valiqor Dashboard. You can also pass it directly via ValiqorClient(api_key="vq_...").

Step 3: Run Failure Analysis

Create a file called quickstart.py and paste:
quickstart.py
Run it:

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

The result 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.

Analyze multiple items at once

You can pass multiple input/output pairs in a single call:

Optional: Add tracing later

Once you’re comfortable with dataset mode, you can add auto-tracing to capture LLM calls in production and run Failure Analysis on traces:
See the Tracing guide for full setup instructions.