id stringlengths 5 5 | messages listlengths 14 30 | probe stringclasses 20
values | required_facts listlengths 1 1 | probe_type stringclasses 2
values | depth stringclasses 2
values | concept stringclasses 7
values | placement stringclasses 2
values | seed int64 0 2 |
|---|---|---|---|---|---|---|---|---|
s0000 | [
{
"role": "system",
"content": "You are a terse engineering assistant.",
"name": null
},
{
"role": "user",
"content": "Also tweak the test fixtures (pass 0); minor cleanup.",
"name": null
},
{
"role": "assistant",
"content": "Updated the test fixtures; no functional change.",... | What database backs the service again? | [
"PostgreSQL"
] | paraphrase | mid | For | statement | 0 |
s0001 | [
{
"role": "system",
"content": "You are a terse engineering assistant.",
"name": null
},
{
"role": "user",
"content": "Also tweak the CI config (pass 0); minor cleanup.",
"name": null
},
{
"role": "assistant",
"content": "Updated the CI config; no functional change.",
"na... | What signing algorithm do our JWT tokens use? | [
"RS256"
] | verbatim | mid | Authentication | statement | 0 |
s0002 | [
{
"role": "system",
"content": "You are a terse engineering assistant.",
"name": null
},
{
"role": "user",
"content": "Also tweak the build script (pass 0); minor cleanup.",
"name": null
},
{
"role": "assistant",
"content": "Updated the build script; no functional change.",
... | How long do we keep entries before they expire? | [
"900 seconds"
] | paraphrase | mid | The | buried | 0 |
s0003 | [
{
"role": "system",
"content": "You are a terse engineering assistant.",
"name": null
},
{
"role": "user",
"content": "Set up the relevant component (step 0).",
"name": null
},
{
"role": "assistant",
"content": "We deploy to the Kubernetes namespace 'orion-prod'.",
"name"... | Which Kubernetes namespace do we deploy to? | [
"orion-prod"
] | verbatim | early | We | statement | 0 |
s0004 | [
{
"role": "system",
"content": "You are a terse engineering assistant.",
"name": null
},
{
"role": "user",
"content": "Also tweak the dev container (pass 0); minor cleanup.",
"name": null
},
{
"role": "assistant",
"content": "Updated the dev container; no functional change.",... | What is the API rate limit per key? | [
"100 requests"
] | verbatim | mid | The | statement | 0 |
s0005 | [
{
"role": "system",
"content": "You are a terse engineering assistant.",
"name": null
},
{
"role": "user",
"content": "Set up the relevant component (step 0).",
"name": null
},
{
"role": "assistant",
"content": "Background jobs run through a Redis-backed queue.",
"name": ... | Which system processes async tasks? | [
"[Rr]edis"
] | paraphrase | early | Background | statement | 0 |
s0006 | [
{
"role": "system",
"content": "You are a terse engineering assistant.",
"name": null
},
{
"role": "user",
"content": "Also tweak the makefile (pass 0); minor cleanup.",
"name": null
},
{
"role": "assistant",
"content": "Updated the makefile; no functional change.",
"name... | How long before we give up waiting on a downstream call? | [
"30 seconds"
] | paraphrase | mid | The | buried | 0 |
s0007 | [
{
"role": "system",
"content": "You are a terse engineering assistant.",
"name": null
},
{
"role": "user",
"content": "Set up the relevant component (step 0).",
"name": null
},
{
"role": "assistant",
"content": "Production runs in the us-east-1 region.",
"name": null
},... | Where is the live environment hosted geographically? | [
"us-east-1"
] | paraphrase | early | Production | statement | 0 |
s0008 | [
{
"role": "system",
"content": "You are a terse engineering assistant.",
"name": null
},
{
"role": "user",
"content": "Also tweak the build script (pass 0); minor cleanup.",
"name": null
},
{
"role": "assistant",
"content": "Updated the build script; no functional change.",
... | Which framework is the service built on? | [
"[Ff]ast[Aa]pi"
] | verbatim | mid | The | statement | 0 |
s0009 | [
{
"role": "system",
"content": "You are a terse engineering assistant.",
"name": null
},
{
"role": "user",
"content": "Also tweak the dev container (pass 0); minor cleanup.",
"name": null
},
{
"role": "assistant",
"content": "Updated the dev container; no functional change.",... | Where are the secrets stored? | [
"Secrets Manager"
] | verbatim | mid | Secrets | statement | 0 |
s0010 | [
{
"role": "system",
"content": "You are a terse engineering assistant.",
"name": null
},
{
"role": "user",
"content": "Set up the relevant component (step 0).",
"name": null
},
{
"role": "assistant",
"content": "Tests are green and the lint passes. For the primary datastore w... | What database backs the service again? | [
"PostgreSQL"
] | paraphrase | early | For | buried | 0 |
s0011 | [
{
"role": "system",
"content": "You are a terse engineering assistant.",
"name": null
},
{
"role": "user",
"content": "Also tweak the dev container (pass 0); minor cleanup.",
"name": null
},
{
"role": "assistant",
"content": "Updated the dev container; no functional change.",... | How do we verify who a caller is? | [
"RS256"
] | paraphrase | mid | Authentication | buried | 0 |
s0012 | [
{
"role": "system",
"content": "You are a terse engineering assistant.",
"name": null
},
{
"role": "user",
"content": "Also tweak the docs (pass 0); minor cleanup.",
"name": null
},
{
"role": "assistant",
"content": "Updated the docs; no functional change.",
"name": null
... | How long do we keep entries before they expire? | [
"900 seconds"
] | paraphrase | mid | The | statement | 0 |
s0013 | [
{
"role": "system",
"content": "You are a terse engineering assistant.",
"name": null
},
{
"role": "user",
"content": "Set up the relevant component (step 0).",
"name": null
},
{
"role": "assistant",
"content": "I went ahead and wired up the module. We deploy to the Kubernete... | Where does the service ship to in the cluster? | [
"orion-prod"
] | paraphrase | early | We | buried | 0 |
s0014 | [
{
"role": "system",
"content": "You are a terse engineering assistant.",
"name": null
},
{
"role": "user",
"content": "Also tweak the logging format (pass 0); minor cleanup.",
"name": null
},
{
"role": "assistant",
"content": "Updated the logging format; no functional change.... | How many calls can a client make before it gets throttled? | [
"100 requests"
] | paraphrase | mid | The | statement | 0 |
s0015 | [
{
"role": "system",
"content": "You are a terse engineering assistant.",
"name": null
},
{
"role": "user",
"content": "Set up the relevant component (step 0).",
"name": null
},
{
"role": "assistant",
"content": "Background jobs run through a Redis-backed queue.",
"name": ... | What backs our background job queue? | [
"[Rr]edis"
] | verbatim | early | Background | statement | 0 |
Agentic Context-Compression Faithfulness Benchmark (Tier A)
A reproducible, judge-free benchmark measuring whether context compression preserves the specific facts a later agent turn depends on — in multi-turn agentic sessions, not single-shot prompts.
- 📄 Paper / write-up: Faithful Context Compression for Agentic Sessions: A Reproducible Benchmark and a Granularity-vs-Signal Decomposition (preprint).
- 🛠️ Harness + generator (MIT): https://github.com/nac7/ctx-gate — one command reproduces every number.
- 🏆 Leaderboard: see
LEADERBOARD.mdin the repo.
What's in it
Synthetic agentic sessions (system prompt + tool dumps + re-read files + filler turns + task shifts) each carrying one planted fact (a realistic service-configuration value with a known ground-truth answer) and a probe that requires it. The primary Layer-A metric is a string match on the compressed context, so it is immune to pretraining contamination regardless of how common the fact is; Layer-B controls for prior knowledge via a compressed−full delta (see limitations).
Each item:
| field | description |
|---|---|
id |
unique item identifier |
messages |
the full session up to (not including) the probe |
probe |
the question asked now |
probe_type |
verbatim (shares content words with the fact) or paraphrase (shares meaning, zero content words) |
required_facts |
list of ground-truth answer string(s), e.g. ["PostgreSQL"] (⊆ the planted fact) |
depth / placement |
where the fact sits (early/mid/recent, statement/buried) |
concept |
concept tag derived from the fact |
The paraphrase split is the discriminating stressor: methods that match on surface form pass verbatim and fail paraphrase.
How it's scored (two layers)
- Layer A — fact retention (primary, deterministic, $0): does the compressed context still contain the planted fact (exact match)? Decoupled from any model and from any compressor's selection criterion.
- Layer B — answer accuracy (optional): a reader model answers the probe under compressed vs. full context; report Δ. Confirms retention predicts accuracy.
Compare methods at matched realized savings, not matched knob.
Quickstart
from datasets import load_dataset
ds = load_dataset("nac7/tool-output-faithfulness", split="train")
print(ds[0]["probe"], ds[0]["probe_type"], ds[0]["required_facts"])
Reproduce the full benchmark (methods, seeds, Pareto):
pip install "ctx-gate[bench]"
ctx-gate bench scale --n 300 --seeds 0,1,2 \
--methods ctxgate,ctxgate_sentence,ctxgate_sentence_embedding,selective \
--out results/scale
Headline finding
Token-level self-information pruning (Selective Context) is perfectly lossless (100% retention, zero between-seed variance) through ~89% savings and Pareto-dominates message-level relevance selection. Decomposing the gap shows granularity (message→sentence: +63.6 pts paraphrase retention), not the selection signal, is the dominant factor — and the winning method is query-agnostic, so query-awareness is not the operative variable. Self-information is near-optimal here because planted facts are high-surprisal; the benchmark predicts this inverts for low-surprisal facts (the open frontier).
Intended uses & limitations
- Use: benchmarking context/prompt compressors on faithfulness; ablating granularity vs. selection signal; as a fast, judge-free CI gate for compressors.
- Limitation (important): facts are high-surprisal by construction — the regime most favorable to self-information pruning. Do not read the result as "self-information is universally optimal." A low-surprisal fact suite and a real-transcript (Tier B) tier are planned for external validity.
- Contamination: Layer-A is contamination-immune by construction (string match on the context, not a model guess). Some Layer-B answers are common technical terms; the compressed−full delta controls for this. Regenerate with a fresh seed / canary (or fictional-constant facts) to further harden Layer-B.
Datasheet & license
Follows Datasheet for Datasets (Gebru et al., 2021) — see the repo's
paper/dataset-release-plan.md. Data: CC-BY-4.0. Generator/harness code:
MIT. DOI: 10.57967/hf/9671 (pinned version v1.0).
Citation
@misc{lele2026faithfulcompression,
title = {Faithful Context Compression for Agentic Sessions:
A Reproducible Benchmark and a Granularity-vs-Signal Decomposition},
author = {Lele, Nachiket},
year = {2026},
doi = {10.57967/hf/9671},
note = {Benchmark: huggingface.co/datasets/nac7/tool-output-faithfulness (v1.0);
code: github.com/nac7/ctx-gate},
}
- Downloads last month
- 81