Expand description
Response-quality (sycophancy) detection wiring.
Runs the local, rule-based sycophancy-core detector on completed assistant
responses. Detection is sync and makes no LLM or network call. This module
exposes a single detect entry point plus the pure decision helpers it is
built from (so the strictness mapping and flag threshold are unit-testable).
Detection-only: this does not correct or regenerate responses — flagged
results are surfaced via the SycophancyFlagged event and metrics.
Structs§
- Sycophancy
Outcome - Outcome of running detection on a completed response.
Functions§
- correction_
messages - Build the message list for a single corrective LLM pass over a flagged response: a system instruction to rewrite away sycophancy while preserving correct, substantive content, plus the flagged text as the user turn.
- detect
- Run sycophancy detection on a completed assistant response.