Skip to main content

detect

Function detect 

Source
pub fn detect(
    config: &SycophancyConfig,
    text: &str,
) -> Option<SycophancyOutcome>
Expand description

Run sycophancy detection on a completed assistant response.

Returns None when detection is disabled or the text is empty/whitespace. Otherwise returns the score, the flag decision, and a compact list of pattern classifications (never the response text). Sync and rule-based — no LLM call.