Principle:42 evey Hermes plugins Importance Scoring
| Knowledge Sources | |
|---|---|
| Domains | Memory_Management, Importance_Scoring, LLM_Processing |
| Last Updated | 2026-10-29 00:00 GMT |
Overview
A memory filtering method that uses an LLM to score each extracted fact's importance on a 1-10 scale, keeping only facts above a threshold and annotating them with their score for future decay and trimming.
Description
Importance Scoring prevents memory bloat. Without a filter, fact extraction would accumulate every observation, making the memory file unmanageably large. The method:
- Per-fact LLM scoring: Each fact line is individually scored 1-10 via a scoring prompt with clear rubric definitions (10 = critical security rule/user preference, 7-9 = important learned behavior, 4-6 = useful finding, 1-3 = trivial).
- Threshold filtering: Only facts scoring ≥5 are kept. Trivia (greetings, routine checks) is discarded.
- Score annotation: Kept facts are annotated with
[importance:N]for downstream use by the decay model and trimming logic. - Size-based trimming: When the memory file exceeds a character limit (4200 chars), the lowest-importance facts are removed first, preserving high-value knowledge.
Usage
Use this principle when building memory systems that accumulate facts over time and need to prioritize high-value information. The LLM-based scoring adapts to the content (unlike fixed rules), while the threshold + trimming keeps the memory bounded.
Theoretical Basis
The scoring and filtering pipeline:
Failed to parse (syntax error): {\displaystyle \text{annotated} = \{f + \text{"[importance:"} + \text{score}(f) + \text{"]"} : f \in \text{kept}\} }
The trimming logic when over the character limit:
Failed to parse (syntax error): {\displaystyle \text{trim} = \text{remove lowest-}\text{importance facts until } |\text{memory}| \leq \text{CHAR\_LIMIT} }
# Abstract pattern (NOT real implementation)
for fact in facts:
score = parse_int(call_llm(SCORE_PROMPT.format(fact=fact))) # 1-10
if score >= 5:
memory.append(f"{fact} [importance:{score}]")
if len(memory) > CHAR_LIMIT:
# Sort by importance, remove lowest first
removable = sorted(memory, key=importance)
while len(memory) > CHAR_LIMIT and removable:
memory.remove(removable.pop(0))
The importance annotations feed into the decay model, which uses importance as the base value that decays over time.