krzonkalla/kamradt-paul-graham-niah-128k-3p5m
收藏资源简介:
--- license: mit language: - en task_categories: - question-answering pretty_name: Kamradt-style Paul Graham Long-Context Needle-in-a-Haystack configs: - config_name: default data_files: - split: test path: data/test.jsonl.gz --- # Kamradt-style Paul Graham Long-Context Needle-in-a-Haystack This dataset contains long-context retrieval prompts inspired by Greg Kamradt's Needle-in-a-Haystack setup. ## What makes this Kamradt-style - The haystack is built from the original PaulGrahamEssays directory in gkamradt/LLMTest_NeedleInAHaystack. - A short needle fact is inserted into the haystack. - The needle is inserted at document depths from 0% to 100%. - The insertion point is moved backward to a sentence boundary by searching for the previous period token. - Context lengths are swept across several sizes. ## Structure - Context lengths: [128000, 256000, 512000, 1000000, 2000000, 3500000] - Needle depths: [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100] - Number of examples: 66 - Tokenizer used for construction: cl100k_base - Final context length buffer: 200 - Expected answer for every example: RIO_NIAH_PASSCODE_2026 - Base Paul Graham corpus tokens: 149194 - Corpus repeats needed for max context: 25 ## Important note The original Paul Graham essay corpus is much smaller than 3.5M tokens, so this dataset repeats the Paul Graham corpus for the largest contexts. This preserves the original Kamradt haystack source, but it does mean the 512k, 1M, 2M, and 3.5M examples contain repeated essay text. ## Grading A response is correct if it contains this substring: RIO_NIAH_PASSCODE_2026 ## Fields - id: unique example id - benchmark: benchmark name - haystack_source: source corpus - tokenizer: tokenizer used for construction - context_length: requested Kamradt-style context length - final_context_length_buffer: reserved buffer, matching the Kamradt idea - depth_percent: intended needle depth - estimated_context_tokens: estimated context tokens from construction - measured_context_tokens: exact measured context tokens for smaller rows, null for larger rows - measured_prompt_tokens: exact measured prompt tokens for smaller rows, null for larger rows - approximate_needle_start_token_in_context: approximate token index where the needle starts - approximate_needle_end_token_in_context: approximate token index where the needle ends - needle_text: inserted hidden fact - question: retrieval question - expected_answer: fixed answer - answer_check_substring: substring for simple grading - grading_rule: grading description - prompt_sha256: SHA-256 hash of the full prompt - prompt: full prompt to send to the model
This dataset contains long-context retrieval prompts inspired by Greg Kamradts Needle-in-a-Haystack setup. The haystack is built from the original PaulGrahamEssays directory, with a short needle fact inserted at various document depths from 0% to 100%. The insertion point is adjusted to a sentence boundary by searching for the previous period token. Context lengths are varied across several sizes. The dataset structure includes different context lengths, needle depths, and a total of 66 examples. Note that the original Paul Graham essay corpus is much smaller than 3.5M tokens, so the corpus is repeated for the largest contexts. A response is correct if it contains the substring RIO_NIAH_PASSCODE_2026. The dataset includes fields such as unique ID, benchmark name, haystack source, tokenizer, context length, depth percent, needle text, question, expected answer, and more.




