Skip to main content

Module compaction_probe

Module compaction_probe 

Source
Expand description

Compaction probe: validates summary quality before committing it to the context.

Generates factual questions from the messages being compacted, then answers them using only the summary text, and scores the answers against expected values. Returns a CompactionProbeResult that the caller uses to decide whether to commit or reject the summary.

Structs§

CompactionProbeConfig
Configuration for the compaction probe.
CompactionProbeResult
Full result of a compaction probe run.
ProbeQuestion
A single factual question with the expected answer.

Enums§

ProbeVerdict
Three-tier verdict for compaction probe quality.

Functions§

answer_probe_questions
Answer probe questions using only the compaction summary as context.
generate_probe_questions
Generate factual probe questions from the messages being compacted.
score_answers
Score answers against expected values using token-set-ratio similarity.
validate_compaction
Run the compaction probe: generate questions, answer them from the summary, score results.