1
Install the SDK
Install the Quotient SDK for your language of choice.Make sure your environment has Python 3.9+ or Node.js 18+.
2
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
, andprod
to keep environments separate.
3
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.
4
Run the Script
Run the script with your API key set:If successful, you’ll see detection results printed in your console.
5
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)
6
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.