Install the SDK
Install the Quotient SDK for your language of choice.Make sure your environment has Python 3.9+ or Node.js 18+.
Create an API Key
Go to your Quotient dashboard and create an API key.Export it as an environment variable so the SDK can authenticate:
bash
Tip: use different keys fordev,staging, andprodto keep environments separate.
Initialize the Logger
The logger is the entry point for sending logs to Quotient. It records queries, model outputs, and retrieved documents.
Note: in development, set detection_sample_rate=1.0 for full coverage. In production, reduce it to balance cost and coverage.
Run the Script
Run the script with your API key set:If successful, you’ll see detection results printed in your console.
View Your Logs
Open the Detections Dashboard.Each log includes:
- the original query
- retrieved documents
- the model’s output
- detection scores (hallucination, document relevance, tool correctness)
Get Reports & Insights
After sending at least 100 logs, Quotient automatically generates your first Report.Reports show:
- Clusters of queries with similar failure modes
- Hallucination and document relevance rates over time
- Retrieval drift across environments
Tips for Developers
- Environments: keep logs separated by
dev,staging,prod. - Privacy: anonymize or filter out PII before logging.
- Iterate fast: start by logging a few queries manually, then integrate Quotient into your agent loop.