Skip to content

feat(v0.4-alpha): llmlingua_style selector + 11-family paired-task corpus - #4

Merged
snchimata merged 3 commits into
developfrom
feat/v0.4-alpha-corpus-baselines
Jul 27, 2026
Merged

feat(v0.4-alpha): llmlingua_style selector + 11-family paired-task corpus#4
snchimata merged 3 commits into
developfrom
feat/v0.4-alpha-corpus-baselines

Conversation

@snchimata

Copy link
Copy Markdown
Owner

Summary

Advances v0.4-alpha (Phase 8, F-057) toward its "reproducible baseline report" exit: adds the last buildable deterministic selector and expands the paired-task corpus from 3 to 11 families. Still shadow-only, no ML, nothing served — develop-targeted research.

What's in it

  • llmlingua_style selector — a perplexity-free LLMLingua-style proxy: ranks units by mean per-token self-information (surprisal, -log2 P(token)) under a document-derived unigram model. A deterministic stand-in for LLMLingua's small-LM perplexity (the real method needs an LM at inference, deferred per model-research.md). That's the last lightweight selector; RTK (external tool) and the Kompress-v2 sweep (ML checkpoint) remain deferred.
  • Corpus 3 → 11 fixtures covering the model-research.md required slices: long_context_needle, code_build_error, code_patch, tool_call_json, log_multi_service, ccr_marker, and the project-disjoint rust_holdout + typescript_holdout hard slices.
    • Authored + self-validated against the live gate in isolated temp dirs, then adversarially verified (8/8 confirmed). Each passes the gate and genuinely differentiates selectors (≥1 selector fails the task at the 25% ceiling), so the report discriminates instead of trivially scoring 1.0.

The report now discriminates

baseline                 ratio   task   crit  achieved
keep_all                  0.25    1.0    1.0       1.0
bm25                      0.25 0.8182    1.0    0.2437   ← strongest deterministic selector
frequency                 0.25 0.2727    1.0    0.2437
llmlingua_style           0.25 0.2727    1.0    0.2448
recency                   0.25    0.0    1.0    0.2422
forced_only               0.25    0.0    1.0    0.1173   ← safety floor
deterministic-tokenfold   0.25    1.0    1.0     0.937   ← safe, but can't hit the budget

Two gaps a learned selector must close: match bm25's 0.82 task success at aggressive ratios (and be more robust across task types), or match tokenfold's safety (1.0) at real compression.

Testing

python eval/run_baselines.py --gatepass, 132 checks (6 selectors × 11 fixtures × 2 ratios): universal critical-atom survival, ceiling respected, keep_all upper bound.

Still deferred

RTK / RTK+tokenfold (external tool) and the unmodified Kompress-v2 achieved-token sweep (ML checkpoint); Tier-B public-repo corpora with license/revision manifests + project-disjoint splits; structural segmentation; LLM-judge failure diagnosis.

A perplexity-free LLMLingua-style keep/drop selector: ranks units by mean per-token
self-information (surprisal, -log2 P(token)) under a document-derived unigram model — a
deterministic stand-in for LLMLingua's small-LM perplexity (the real method needs an LM at
inference, deferred per model-research.md). Query-independent but information-theoretic, so
boilerplate ranks low and rare/surprising content ranks high. Gate green (36 checks).

Also refreshes the deferred lists: deterministic-tokenfold (PR #3) and llmlingua_style are no
longer deferred; RTK and the Headroom Kompress-v2 sweep remain.
Adds 8 Tier-A fixtures spanning the model-research.md required slices: long_context_needle,
code_build_error, code_patch, tool_call_json, log_multi_service, ccr_marker, and the
project-disjoint rust_holdout + typescript_holdout hard slices. Authored + self-validated
against the live gate and adversarially verified (8/8 confirmed) so each passes the gate AND
genuinely differentiates selectors (>=1 selector fails at the 25% ceiling).

Full 11-fixture gate: pass (132 checks). The richer report now discriminates: bm25 is the
strongest deterministic selector (0.82 task @ 0.25), query-independent selectors are weak on
query-driven tasks, and deterministic-tokenfold stays safe (1.0 task) but can't hit aggressive
budgets (0.937) — the two gaps a learned selector must close.
Add fixtures 010-015 for all 11 Tier-A families, each with a notes field
documenting why the fixture discriminates selectors. Gate-validated
(eval/run_baselines.py --gate passes, 924 rows checked). Also documents
the AgentMemory project-slug convention already used by this repo's local
memory directory.
@snchimata
snchimata merged commit 6460c6c into develop Jul 27, 2026
11 checks passed
@snchimata
snchimata deleted the feat/v0.4-alpha-corpus-baselines branch July 27, 2026 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant