Module: Legion::LLM::Quality
- Defined in:
- lib/legion/llm/quality/confidence/scorer.rb,
lib/legion/llm/quality.rb,
lib/legion/llm/quality/checker.rb,
lib/legion/llm/quality/shadow_eval.rb,
lib/legion/llm/quality/confidence/score.rb
Overview
Computes a Score for an LLM response using available signals.
Strategy selection (in priority order):
1. logprobs — native model confidence from token log-probabilities (when available)
2. caller — caller-provided score passed via options[:confidence_score]
3. heuristic — derived from response content characteristics
Band boundaries are read from Legion::Settings[:confidence] when Legion::Settings is available, otherwise the DEFAULT_BANDS constants are used. Per-call overrides can be passed as options.
Defined Under Namespace
Modules: Checker, Confidence, ShadowEval