Documentation Index
Fetch the complete documentation index at: https://docs.gaussia.ai/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The Regulatory metric evaluates whether AI responses comply with a regulatory corpus (laws, policies, guidelines). It uses a RAG-based pipeline to:- Retrieve relevant regulatory chunks for each interaction
- Check for contradictions between the response and the retrieved chunks
- Score compliance per interaction and aggregate per session
Verdicts
| Verdict | Meaning |
|---|---|
COMPLIANT | Response supports regulatory requirements |
NON_COMPLIANT | Response contradicts regulatory requirements |
IRRELEVANT | No relevant regulatory content found |
Usage
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
retriever | type[Retriever] | required | Retriever class |
corpus_connector | CorpusConnector | required | Loader for regulatory documents |
embedder | Embedder | required | Text embedder for retrieval |
reranker | Reranker | required | Reranker for contradiction detection |
statistical_mode | StatisticalMode | FrequentistMode() | Statistical computation mode |
chunk_size | int | 1000 | Characters per chunk |
chunk_overlap | int | 100 | Overlap between chunks |
top_k | int | 10 | Max chunks to retrieve |
similarity_threshold | float | 0.3 | Minimum cosine similarity for retrieval |
contradiction_threshold | float | 0.6 | Score below which a chunk contradicts |
compliance_threshold | float | 0.5 | Minimum score for COMPLIANT verdict |
Output schema
RegulatoryMetric
| Field | Type | Description |
|---|---|---|
session_id | str | Session identifier |
assistant_id | str | Assistant identifier |
n_interactions | int | Interactions evaluated |
compliance_score | float | Aggregated compliance score |
compliance_score_ci_low | float | None | Lower CI (Bayesian only) |
compliance_score_ci_high | float | None | Upper CI (Bayesian only) |
verdict | str | Session-level verdict |
total_supporting_chunks | int | Total supporting evidence |
total_contradicting_chunks | int | Total contradicting evidence |
interactions | list[RegulatoryInteraction] | Per-interaction breakdown |
Requires the
regulatory extra: pip install "gaussia[regulatory]".