Audit¶
The high-level entry points for running an audit.
audit
¶
High-level audit entry point.
audit() is the one-call API: feed it conversations, get back detections.
default_registry() returns the set of production-ready detectors enabled
by default in the current version.
default_registry
¶
default_registry() -> DetectorRegistry
Return a DetectorRegistry with all production-ready detectors enabled.
This includes every detector that works out-of-the-box without configuration: death-loop, silent-churn, escalation-burial, sentiment-collapse, and brand-damage.
ConfidentLiesDetector and ConfidentMisinformationDetector require a
PolicyBase or FactBase to be genuinely useful and are NOT included
in the default registry. Add them manually with your own knowledge base:
from chatbot_auditor import default_registry, ConfidentLiesDetector
from chatbot_auditor.knowledge import PolicyBase
registry = default_registry()
registry.register(ConfidentLiesDetector(policy=PolicyBase(...)))
audit
¶
audit(conversations: Iterable[Conversation], detectors: DetectorRegistry | None = None) -> list[Detection]
Run all registered detectors against a batch of conversations.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
conversations
|
Iterable[Conversation]
|
Any iterable of |
required |
detectors
|
DetectorRegistry | None
|
Optional custom registry. If None, uses |
None
|
Returns:
| Type | Description |
|---|---|
list[Detection]
|
A flat list of |
default_registry
¶
default_registry() -> DetectorRegistry
Return a DetectorRegistry with all production-ready detectors enabled.
This includes every detector that works out-of-the-box without configuration: death-loop, silent-churn, escalation-burial, sentiment-collapse, and brand-damage.
ConfidentLiesDetector and ConfidentMisinformationDetector require a
PolicyBase or FactBase to be genuinely useful and are NOT included
in the default registry. Add them manually with your own knowledge base:
from chatbot_auditor import default_registry, ConfidentLiesDetector
from chatbot_auditor.knowledge import PolicyBase
registry = default_registry()
registry.register(ConfidentLiesDetector(policy=PolicyBase(...)))