CoolFace
Datasetpublic

tedbelford/cliffs-and-slopes-semantic-cache

Cliffs and Slopes — Semantic-Cache Benchmark Benchmark for the paper "Cliffs and Slopes: Why Semantic Caches Fail Structurally, Not Just Through Miscalibration" (under submission to Information and Software Technology). A semantic cache answers a new query with the stored answer of a "similar enough" past query. This benchmark measures where — and why — threshold-on-similarity caching fails structurally: the task requires an equivalence relation over queries, but is implemented… See the full description on the dataset page: https://huggingface.co/datasets/tedbelford/cliffs-and-slopes-semantic-cache.

sourceHugging Faceotherupdated 20d agoView on Hugging Face
0likes81downloads
Dataset Card

Cliffs and Slopes — Semantic-Cache Benchmark

Benchmark for the paper "Cliffs and Slopes: Why Semantic Caches Fail Structurally, Not Just Through Miscalibration" (under submission to Information and Software Technology).

A semantic cache answers a new query with the stored answer of a "similar enough" past query. This benchmark measures where — and why — threshold-on-similarity caching fails structurally: the task requires an equivalence relation over queries, but is implemented as a threshold on smooth, non-transitive similarity.

What's in the dataset

  • —46,214 query pairs (seed question, variant) after dual-judge filtering and MinHash deduplication — 51.8% HIT.
  • —5 domains: university admin (EN), academic NLP/Qasper (EN), tech docs (EN), medical (EN), Vietnamese administrative/education (VI).
  • —2 languages: English and Vietnamese.
  • —9 transformation axes in 3 groups, derived from a single organizing principle — the ratio answer-step / surface-step:
GroupAxesExpected labelIntuition
I — InvariantP1 lexical paraphrase, P2 syntactic restructure, P3 surface noiseHITlarge surface change, zero answer change
II — SlopeN1 aspect change, N2 scope changeMISSgraded divergence, fuzzy boundary
III — CliffN3 entity substitution, N4 polarity flip, N5 quantifier/extreme change, N6 presupposition shiftMISSminimal surface change, total answer change — where smooth embeddings are structurally blind
  • —Labels are construction-derived, never model-assigned: the axis determines expected_label (P→HIT, N→MISS) by code. Two LLM judges (primary judge ≠ generator model, always) assess axis compliance only.
  • —Independently audited on a stratified 1,500-pair subset: three blind human annotators, Fleiss' κ = 0.76, majority label vs construction label 98.5% (see Human audit below; raw annotations included).

Files

PathContent
data/benchmark.jsonlthe 46,214 frozen pairs (one JSON object/line)
taxonomy/taxonomy.yaml / .json9-axis taxonomy, source of truth (v1.0)
config/record.schema.jsonJSON Schema of a benchmark record
config/domains.yamldomain definitions
prompts/versioned generation/judge/verify prompts (cached-block markers included)
DATASHEET.mdfull datasheet (Gebru et al. format)
human_annotation/gold_input.jsonlblind input for the human audit: 1,500 stratified pairs, {gid, qa, qb}, A/B order randomized
human_annotation/annotator_{1,2,3}.jsonlraw blind labels: `{gid, label: SAME\DIFFERENT\UNSURE}`
human_annotation/PROTOCOL.mdannotation protocol (design, gates, as-run status)
human_annotation/HUONG_DAN.mdthe annotator guide (Vietnamese), verbatim as distributed
human_annotation/human_gold.jsonagreement statistics (Fleiss' κ, per-axis label accuracy, disagreement list)

Record fields

json
{
  "id": "d1_s0001_N1_v1",
  "domain": "university_admin",
  "seed_id": "d1_s0001",
  "seed_question": "...",     // the cached query
  "answer": "...",            // answer to the seed question
  "variation": "...",         // the incoming query
  "axis": "N1", "axis_group": "slope",
  "expected_label": "MISS",   // derived from axis by code
  "delta": "...",             // what changed
  "generator_model": "claude-opus-5",
  "judge1": {"model": "claude-sonnet-5", "axis_ok": true, "conf": 0.95, "issue": null},
  "judge2": {"model": "claude-opus-5",  "axis_ok": true, "conf": 0.92, "issue": null},
  "batch_id": "A4_0009", "ts": "2026-08-12T15:00:59Z"
}

Dataset analysis

Composition — pairs per axis × domain (46,214 total, 51.8% HIT):

[image]

The designed spectrum, recovered from data — median surface step (1 − word Jaccard) vs. embedding distance (1 − cosine, BGE-M3) per axis. Embeddings track surface form: the cliff axes (orange — where the answer flips) sit closest to the origin, i.e. closest to the same-answer region:

[image]

Where the irreducible overlap lives — cosine-similarity distributions of each different-answer axis (colored) against the same-answer distribution (green), BGE-M3. Cliff-axis pairs sit deep inside the same-answer distribution — no threshold separates them:

[image]

These figures are produced by scripts/make_dataset_figs.py in the accompanying code repository, directly from data/benchmark.jsonl.

How it was built

Seeds were extracted from licensed source documents (claude-sonnet-5), variants generated per axis (claude-opus-5; RQ6 stability subsets regenerated with sonnet and haiku), then filtered by two independent axis-compliance judges and MinHash-deduplicated. Complete generation logs (full prompts, raw outputs, exact model strings, timestamps, prompt-version hashes) are preserved in the accompanying code repository. Raw source documents are not redistributed; per-document provenance (URL, license, retrieval date) ships with the code repository.

Human audit of the labels

A 1,500-pair subset stratified over the 9 axes × 5 domains grid (164–168 per axis, ~300 per domain) was labeled by three blind human annotators working independently (university-educated volunteers; all read Vietnamese, as ~300 pairs require). Each annotator labeled all 1,500 pairs, seeing only the two questions (A/B order randomized) — never the construction label, the axis, the judge outputs, a source passage, or a reference answer — and answered one question per pair: would one complete, correct answer serve both queries, assuming a shared knowledge source? Because no source material was shown, the audit certifies question-level answer substitutability, not extensional answer coincidence under the corpus (see the paper's Threats section); a source-grounded round-2 kit ships in the code repository (human_annotation_v2/).

Analysis rules: three pairs (all N5) were rated UNSURE by two annotators — no 2-of-3 definite majority — and are excluded from all statistics, so agreement and accuracy use the same n = 1,497. Pairs cluster by seed (1,060 seeds), so headline CIs are percentile cluster bootstraps over seeds (10,000 replicates).

StatisticValue
Fleiss' κ (acceptance gate ≥ 0.65, fixed before annotation)0.76 (cluster-bootstrap 95% CI [0.73, 0.78])
Raw pairwise agreement / Gwet's AC189.2% / 0.81
Unanimous pairs83.8%
Majority (2-of-3) label = construction label98.5% (1,475/1,497; cluster-bootstrap 95% CI [97.9, 99.1])
Worst axes (N2 scope, N5 quantifier)96.4% / 96.3%
Per languageEN 98.6% · VI 98.3%

The 22 disagreements concentrate on N2 and N5 (6 each) and run 17:5 toward humans judging an expected-MISS pair same-answer — an observed human–construction disagreement rate of 1.5%, far below the measured irreducible overlap (0.19–0.50). Reproduce every number with scripts/gold_agreement.py in the code repository (output mirrored here as human_annotation/human_gold.json).

Intended use

Evaluating embedding models and cache architectures on answer-equivalence decisions, studying order-dependence/non-transitivity, and threshold-calibration research. Not a QA-accuracy benchmark: answers are grounded in specific source documents and may age.

Licensing (read this)

Mixed, following the source documents (full table in DATASHEET.md):

  • —`domain == "university_admin"` (d1, derived from MIT OpenCourseWare): CC BY-NC-SA 4.0 — ShareAlike/NonCommercial carries to derived pairs.
  • —All other domains (d2–d5): CC BY 4.0.

Filter out university_admin if you need a purely CC BY subset.

Limitations

  • —LLM-generated text with LLM compliance filtering; labels independently audited on a stratified 1,500-pair subset (κ = 0.76, 98.5% agreement — see above), while the remaining pairs carry construction-derived labels only. The audit is question-pair-only (no source grounding); a source-grounded round-2 kit is prepared. Larger-scale annotation remains invited.
  • —The three annotators are university-educated colleagues of the authors (unpaid, blind to labels, axes, and hypotheses) — not an external crowd.
  • —N4/N5 applicability is seed-conditional (overgenerated ×4, top-2 judge-passed kept).
  • —Vietnamese domain drawn from the legal/administrative register.
  • —Generator family is Claude-only.

Code & reproduction

Analysis code, cache simulation, experiment configs, generation logs, and scripts reproducing every figure and table: see the accompanying GitHub repository (semcache-bench).

Citation

Paper under submission; citation entry will be added upon acceptance. Until then, please cite this dataset by its Hugging Face URL.