Dataset Viewer
Auto-converted to Parquet Duplicate
category
stringclasses
5 values
topic
stringclasses
100 values
question
stringclasses
5 values
original_tokens
int64
1.32k
5.28k
compression_ratio
float64
0.1
0.9
compression_pct
float64
-16
90.3
compressed_tokens
int64
151
5.81k
tokens_saved
int64
-690
4.6k
semantic_similarity
float64
0.32
1
rouge_l
float64
0.09
1
combined_score
float64
0.22
1
science
Quantum mechanics
What is the main concept explained in this article?
4,754
0.1
86
665
4,089
0.6649
0.6957
0.6803
science
Quantum mechanics
What is the main concept explained in this article?
4,754
0.2
72
1,332
3,422
0.774
0.7805
0.7772
science
Quantum mechanics
What is the main concept explained in this article?
4,754
0.3
59.5
1,925
2,829
0.6088
0.3125
0.4607
science
Quantum mechanics
What is the main concept explained in this article?
4,754
0.4
45.5
2,591
2,163
0.8093
0.8372
0.8233
science
Quantum mechanics
What is the main concept explained in this article?
4,754
0.5
41.7
2,770
1,984
0.8093
0.8372
0.8233
science
Quantum mechanics
What is the main concept explained in this article?
4,754
0.6
27.9
3,428
1,326
0.8093
0.8372
0.8233
science
Quantum mechanics
What is the main concept explained in this article?
4,754
0.7
14.4
4,069
685
0.8093
0.8372
0.8233
science
Quantum mechanics
What is the main concept explained in this article?
4,754
0.8
1.7
4,674
80
0.8093
0.8372
0.8233
science
Quantum mechanics
What is the main concept explained in this article?
4,754
0.9
-11.2
5,285
-531
0.803
0.6667
0.7349
science
Black hole
What is the main concept explained in this article?
4,731
0.1
87
617
4,114
0.6164
0.4
0.5082
science
Black hole
What is the main concept explained in this article?
4,731
0.2
76.6
1,105
3,626
0.8589
0.5306
0.6947
science
Black hole
What is the main concept explained in this article?
4,731
0.3
63.6
1,724
3,007
0.9349
0.7037
0.8193
science
Black hole
What is the main concept explained in this article?
4,731
0.4
49.9
2,372
2,359
0.9349
0.7037
0.8193
science
Black hole
What is the main concept explained in this article?
4,731
0.5
42.9
2,702
2,029
0.8429
0.6
0.7214
science
Black hole
What is the main concept explained in this article?
4,731
0.6
30
3,313
1,418
0.9866
0.9767
0.9817
science
Black hole
What is the main concept explained in this article?
4,731
0.7
16.4
3,955
776
0.9506
0.7407
0.8457
science
Black hole
What is the main concept explained in this article?
4,731
0.8
3.5
4,565
166
0.8681
0.5316
0.6998
science
Black hole
What is the main concept explained in this article?
4,731
0.9
-10.4
5,223
-492
0.8996
0.506
0.7028
science
DNA
What is the main concept explained in this article?
4,713
0.1
87
615
4,098
0.5921
0.4486
0.5203
science
DNA
What is the main concept explained in this article?
4,713
0.2
73.9
1,231
3,482
0.7137
0.5208
0.6173
science
DNA
What is the main concept explained in this article?
4,713
0.3
60.9
1,842
2,871
0.7342
0.5149
0.6245
science
DNA
What is the main concept explained in this article?
4,713
0.4
50.4
2,336
2,377
0.7618
0.5
0.6309
science
DNA
What is the main concept explained in this article?
4,713
0.5
43.4
2,667
2,046
0.7989
0.48
0.6395
science
DNA
What is the main concept explained in this article?
4,713
0.6
30.6
3,273
1,440
0.8042
0.4848
0.6445
science
DNA
What is the main concept explained in this article?
4,713
0.7
16.2
3,950
763
0.7989
0.48
0.6395
science
DNA
What is the main concept explained in this article?
4,713
0.8
1.6
4,637
76
0.8616
0.8358
0.8487
science
DNA
What is the main concept explained in this article?
4,713
0.9
-11.1
5,237
-524
0.8162
0.6545
0.7353
science
Photosynthesis
What is the main concept explained in this article?
5,098
0.1
87.4
640
4,458
0.7956
0.2857
0.5406
science
Photosynthesis
What is the main concept explained in this article?
5,098
0.2
74.6
1,297
3,801
0.8795
0.3673
0.6234
science
Photosynthesis
What is the main concept explained in this article?
5,098
0.3
60.4
2,019
3,079
0.8162
0.3636
0.5899
science
Photosynthesis
What is the main concept explained in this article?
5,098
0.4
47.4
2,680
2,418
0.8021
0.383
0.5926
science
Photosynthesis
What is the main concept explained in this article?
5,098
0.5
40.7
3,023
2,075
0.8021
0.383
0.5926
science
Photosynthesis
What is the main concept explained in this article?
5,098
0.6
27.2
3,710
1,388
0.8021
0.383
0.5926
science
Photosynthesis
What is the main concept explained in this article?
5,098
0.7
13.5
4,411
687
0.826
0.3871
0.6065
science
Photosynthesis
What is the main concept explained in this article?
5,098
0.8
3.5
4,921
177
0.8791
0.3942
0.6366
science
Photosynthesis
What is the main concept explained in this article?
5,098
0.9
-10.1
5,613
-515
0.8565
0.3087
0.5826
science
Evolution
What is the main concept explained in this article?
4,946
0.1
86.7
659
4,287
0.8492
0.35
0.5996
science
Evolution
What is the main concept explained in this article?
4,946
0.2
73.2
1,325
3,621
0.8663
0.4746
0.6704
science
Evolution
What is the main concept explained in this article?
4,946
0.3
62.5
1,853
3,093
0.8663
0.4746
0.6704
science
Evolution
What is the main concept explained in this article?
4,946
0.4
50.2
2,461
2,485
0.8919
0.4918
0.6919
science
Evolution
What is the main concept explained in this article?
4,946
0.5
43.6
2,788
2,158
0.8919
0.4918
0.6919
science
Evolution
What is the main concept explained in this article?
4,946
0.6
30.7
3,429
1,517
0.8919
0.4918
0.6919
science
Evolution
What is the main concept explained in this article?
4,946
0.7
16.5
4,130
816
0.9882
0.9434
0.9658
science
Evolution
What is the main concept explained in this article?
4,946
0.8
3.7
4,763
183
1
1
1
science
Evolution
What is the main concept explained in this article?
4,946
0.9
-10
5,439
-493
1
1
1
science
General relativity
What is the main concept explained in this article?
4,928
0.1
86.7
655
4,273
0.7554
0.4727
0.614
science
General relativity
What is the main concept explained in this article?
4,928
0.2
73.1
1,325
3,603
0.9344
0.7419
0.8381
science
General relativity
What is the main concept explained in this article?
4,928
0.3
59.8
1,980
2,948
0.9959
0.9818
0.9889
science
General relativity
What is the main concept explained in this article?
4,928
0.4
46.6
2,631
2,297
0.8498
0.6071
0.7285
science
General relativity
What is the main concept explained in this article?
4,928
0.5
43.1
2,805
2,123
0.9959
0.9818
0.9889
science
General relativity
What is the main concept explained in this article?
4,928
0.6
29.2
3,488
1,440
1
1
1
science
General relativity
What is the main concept explained in this article?
4,928
0.7
15.6
4,161
767
1
1
1
science
General relativity
What is the main concept explained in this article?
4,928
0.8
2.1
4,825
103
0.9195
0.7347
0.8271
science
General relativity
What is the main concept explained in this article?
4,928
0.9
-10.7
5,456
-528
0.8173
0.4651
0.6412
science
Neuroscience
What is the main concept explained in this article?
5,246
0.1
86.2
725
4,521
0.6141
0.303
0.4586
science
Neuroscience
What is the main concept explained in this article?
5,246
0.2
73.9
1,371
3,875
0.6996
0.3678
0.5337
science
Neuroscience
What is the main concept explained in this article?
5,246
0.3
60.7
2,060
3,186
0.8386
0.3434
0.591
science
Neuroscience
What is the main concept explained in this article?
5,246
0.4
46.3
2,816
2,430
0.8113
0.3617
0.5865
science
Neuroscience
What is the main concept explained in this article?
5,246
0.5
39
3,198
2,048
0.6436
0.2927
0.4681
science
Neuroscience
What is the main concept explained in this article?
5,246
0.6
26.2
3,869
1,377
0.7892
0.4565
0.6229
science
Neuroscience
What is the main concept explained in this article?
5,246
0.7
13
4,566
680
0.9142
0.6154
0.7648
science
Neuroscience
What is the main concept explained in this article?
5,246
0.8
0.8
5,204
42
0.8952
0.4651
0.6802
science
Neuroscience
What is the main concept explained in this article?
5,246
0.9
-10.3
5,788
-542
0.8794
0.3182
0.5988
science
Climate change
What is the main concept explained in this article?
4,804
0.1
89.3
516
4,288
0.7947
0.4516
0.6231
science
Climate change
What is the main concept explained in this article?
4,804
0.2
75.9
1,158
3,646
0.8819
0.4615
0.6717
science
Climate change
What is the main concept explained in this article?
4,804
0.3
61.8
1,834
2,970
0.957
0.8475
0.9022
science
Climate change
What is the main concept explained in this article?
4,804
0.4
48.3
2,482
2,322
0.8887
0.6154
0.752
science
Climate change
What is the main concept explained in this article?
4,804
0.5
41.8
2,797
2,007
0.9152
0.4478
0.6815
science
Climate change
What is the main concept explained in this article?
4,804
0.6
28.4
3,440
1,364
0.8935
0.4918
0.6926
science
Climate change
What is the main concept explained in this article?
4,804
0.7
15.1
4,078
726
0.8935
0.4918
0.6926
science
Climate change
What is the main concept explained in this article?
4,804
0.8
2.1
4,703
101
0.8935
0.4918
0.6926
science
Climate change
What is the main concept explained in this article?
4,804
0.9
-10.9
5,326
-522
0.8483
0.4557
0.652
science
Artificial intelligence
What is the main concept explained in this article?
5,019
0.1
87.6
620
4,399
0.62
0.4194
0.5197
science
Artificial intelligence
What is the main concept explained in this article?
5,019
0.2
74.5
1,278
3,741
0.6878
0.4815
0.5847
science
Artificial intelligence
What is the main concept explained in this article?
5,019
0.3
60.8
1,969
3,050
0.6746
0.4074
0.541
science
Artificial intelligence
What is the main concept explained in this article?
5,019
0.4
47.6
2,629
2,390
0.7938
0.4815
0.6376
science
Artificial intelligence
What is the main concept explained in this article?
5,019
0.5
41.1
2,954
2,065
0.7938
0.4815
0.6376
science
Artificial intelligence
What is the main concept explained in this article?
5,019
0.6
26.9
3,668
1,351
0.6626
0.44
0.5513
science
Artificial intelligence
What is the main concept explained in this article?
5,019
0.7
13.5
4,342
677
0.8448
0.4918
0.6683
science
Artificial intelligence
What is the main concept explained in this article?
5,019
0.8
2.8
4,880
139
0.9643
0.7805
0.8724
science
Artificial intelligence
What is the main concept explained in this article?
5,019
0.9
-10.8
5,560
-541
0.8268
0.4762
0.6515
science
Periodic table
What is the main concept explained in this article?
4,525
0.1
86.2
626
3,899
0.6555
0.3855
0.5205
science
Periodic table
What is the main concept explained in this article?
4,525
0.2
73
1,223
3,302
0.6617
0.2526
0.4571
science
Periodic table
What is the main concept explained in this article?
4,525
0.3
60.3
1,797
2,728
0.6636
0.4
0.5318
science
Periodic table
What is the main concept explained in this article?
4,525
0.4
46.9
2,401
2,124
0.6336
0.3656
0.4996
science
Periodic table
What is the main concept explained in this article?
4,525
0.5
40.6
2,689
1,836
0.6336
0.3656
0.4996
science
Periodic table
What is the main concept explained in this article?
4,525
0.6
26.7
3,319
1,206
0.6892
0.3956
0.5424
science
Periodic table
What is the main concept explained in this article?
4,525
0.7
12.8
3,946
579
0.6892
0.3956
0.5424
science
Periodic table
What is the main concept explained in this article?
4,525
0.8
0.1
4,521
4
0.6892
0.3956
0.5424
science
Periodic table
What is the main concept explained in this article?
4,525
0.9
-10.3
4,989
-464
0.8796
0.6852
0.7824
science
Gravity
What is the main concept explained in this article?
4,694
0.1
86.7
624
4,070
0.7731
0.4063
0.5897
science
Gravity
What is the main concept explained in this article?
4,694
0.2
73.8
1,228
3,466
0.8484
0.4615
0.655
science
Gravity
What is the main concept explained in this article?
4,694
0.3
63.7
1,703
2,991
0.8875
0.4478
0.6676
science
Gravity
What is the main concept explained in this article?
4,694
0.4
50.1
2,340
2,354
0.774
0.3256
0.5498
science
Gravity
What is the main concept explained in this article?
4,694
0.5
43.6
2,646
2,048
0.774
0.3256
0.5498
science
Gravity
What is the main concept explained in this article?
4,694
0.6
30.1
3,283
1,411
0.7396
0.4848
0.6122
science
Gravity
What is the main concept explained in this article?
4,694
0.7
16.1
3,938
756
0.7704
0.4368
0.6036
science
Gravity
What is the main concept explained in this article?
4,694
0.8
2.9
4,560
134
0.7664
0.506
0.6362
science
Gravity
What is the main concept explained in this article?
4,694
0.9
-10.3
5,177
-483
0.786
0.3455
0.5657
science
Vaccine
What is the main concept explained in this article?
4,981
0.1
86.6
667
4,314
0.7544
0.566
0.6602
End of preview. Expand in Data Studio

YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

TokenLens Compression Benchmark

A benchmark dataset measuring LLM prompt compression quality across 100 Wikipedia articles in 5 categories, generated using TokenLens.

Dataset Description

This dataset contains compression quality measurements for 100 Wikipedia articles compressed at 9 different ratios (0.1 to 0.9) using extractive embedding-based compression. For each article and compression ratio, the dataset records tokens saved, semantic similarity, ROUGE-L score, and combined quality score.

Key Findings

Across 100 Wikipedia articles and 900 compression measurements:

  • science_people (biographies): avg 85.8% semantic similarity at 38% compression
  • technology articles: avg 82.8% semantic similarity at 38% compression
  • science articles: avg 82.1% semantic similarity at 38% compression
  • history articles: avg 79.2% semantic similarity at 38% compression
  • concepts (philosophy/theory): avg 78.5% semantic similarity at 39% compression

ROUGE-L scores are significantly lower than semantic similarity across all categories, indicating compressed answers correctly paraphrase rather than reproduce exact wording. This suggests extractive compression preserves meaning better than surface-level word overlap metrics suggest.

Dataset Structure

900 rows total. Each row represents one Wikipedia article compressed at one ratio.

Column Description
category Document category (science, history, technology, science_people, concepts)
topic Wikipedia article title
question Question used to evaluate compression quality
original_tokens Token count of full document
compression_ratio Fraction of chunks kept (0.1 = keep top 10%)
compression_pct Percentage of tokens removed
compressed_tokens Token count after compression
tokens_saved Tokens removed
semantic_similarity Cosine similarity between baseline and compressed answer embeddings
rouge_l ROUGE-L F1 score between baseline and compressed answers
combined_score Average of semantic_similarity and rouge_l

Compression Method

Extractive compression using sentence-transformers (all-MiniLM-L6-v2). Each document is split into overlapping 200-word chunks. Chunks are ranked by cosine similarity to the evaluation question. The top k% most relevant chunks are kept based on the compression ratio.

Quality is measured by asking the same question to both the full document and the compressed document using Llama 3.2 via Ollama, then comparing answers using ROUGE-L and semantic similarity.

Dataset Statistics

  • Total articles: 100
  • Articles per category: 20
  • Compression ratios tested: 9 (0.1 to 0.9)
  • Total rows: 900
  • Errors: 0
  • LLM used for evaluation: Llama 3.2
  • Embedding model: all-MiniLM-L6-v2

How to Use

from datasets import load_dataset

dataset = load_dataset("lavanyaashri/tokenlens-compression-benchmark")
df = dataset["train"].to_pandas()

# Average semantic similarity by category
df.groupby("category")["semantic_similarity"].mean()

# Average quality by compression ratio
df.groupby("compression_ratio")["combined_score"].mean()

# Find best compression ratio per category
df.groupby(["category", "compression_ratio"])["semantic_similarity"].mean().unstack()

Generation

Generated using TokenLens running Llama 3.2 via Ollama on a local Mac. Evaluation runs in parallel using ThreadPoolExecutor for efficiency. Total generation time approximately 6 hours for 100 articles.

Citation

@misc{tokenlens2026,
  author = {Lavanya Ashri},
  title = {TokenLens Compression Benchmark},
  year = {2026},
  publisher = {HuggingFace},
  url = {https://huggingface.co/datasets/lavanyaashri/tokenlens-compression-benchmark}
}

Links

Downloads last month
-