Skip to main content

Module compression_guidelines

Module compression_guidelines 

Source
Expand description

ACON failure-driven compression guidelines updater.

Runs as a background task. Periodically checks whether the number of unused compression failure pairs exceeds a threshold; if so, calls the LLM to update the compression guidelines document stored in SQLite.

Structs§

CompressionGuidelinesConfig
Configuration for ACON failure-driven compression guidelines.

Functions§

build_guidelines_update_prompt
Build the LLM prompt for a guidelines update cycle.
sanitize_guidelines
Sanitize LLM-generated guidelines before injecting into prompts.
start_guidelines_updater
Start the background guidelines updater loop.
truncate_to_token_budget
Truncate text so it contains at most max_tokens tokens.
update_guidelines_once
Run a single guidelines update cycle.