Skip to main content

Module feedback

Module feedback 

Source
Expand description

User-feedback signal for chunks.

A chunk’s feedback_score is a signed net count — thumbs-up adds, thumbs-down subtracts, neutral leaves it alone. 0 is the default and must produce identical confidence to a store that never records any feedback. Scoring lives in [crate::search::compute_confidence]; this module is just the write path and a thin read helper for tests and library callers.

Structs§

FeedbackReport
Result of a feedback write, shaped for the lantern feedback CLI output.

Enums§

Feedback
A single feedback event applied to a chunk.

Functions§

apply_feedback
Apply feedback and package the result for display. Thin wrapper around record_feedback so the CLI and MCP layers don’t each re-derive the report shape.
get_feedback_score
Read the current feedback score for chunk_id, or None if the chunk is not in the store.
print_json
print_text
record_feedback
Apply feedback to chunk_id and return the chunk’s new net score.