atlas

Research map / Large language models / Language, safety and interpretability

From Artificial Needles to Real Haystacks: Improving Retrieval Capabilities in LLMs by Finetuning on Synthetic Data

ICLR 2025 · Large language models › Language, safety and interpretability · approach: LLM pruning and scaling data · 1 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Finetunes GPT-3.5 Turbo and Mistral 7B on synthetic numerical key-value retrieval tasks, showing improved long-context retrieval (MDQA) and reasoning (FLenQA) with little general-benchmark degradation.

Problem

LLMs struggle to retrieve information and reason over long-context inputs (lost-in-the-middle, needle-in-a-haystack effects), and finetuning on long-context data may induce hallucinations.

Approach

Finetune LLMs on purely synthetic, fact-free numerical key-value dictionary retrieval tasks (with answer templates to focus loss on the value) so the retrieval skill transfers to real long-context QA and reasoning without harming general benchmarks.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Finetune GPT-3.5 Turbo on synthetic multi-subkey retrieval tasksGPT-3.5 Turbo · 20-document MDQA, gold document at position 10accuracy: 10.5%Helped
Finetune on synthetic key-value retrieval tasksGPT-3.5 Turbo and Mistral 7B · MDQAaccuracy across gold document positionsHelped
Finetune on synthetic key-value retrieval tasksGPT-3.5 Turbo and Mistral 7B · FLenQAaccuracyHelped
Add an answer template to synthetic retrieval task finetuning (ablation)GPT-3.5 Turbo and Mistral 7B · MDQA and FLenQAperformanceHelped
Remove the answer template from synthetic retrieval task finetuning (ablation)GPT-3.5 Turbo · FLenQA with chain-of-thought promptingaccuracyHurt
Finetune on synthetic retrieval tasks rather than MDQA dataGPT-3.5 Turbo · MDQAperformanceHelped
Finetune on synthetic retrieval tasksMistral 7B · general-purpose benchmarksaccuracyNo clear effect
Finetune on factual long-context augmentation baselinesMistral 7B · TriviaQAaccuracy: 2.33% to 6.19%Hurt
Finetune on synthetic key-value retrieval tasksMistral 7B · MDQA with relevant distractorsperformanceNo clear effect
Finetune Mistral 7B on simple key-value retrieval with 24K maximum context lengthMistral-7b-Instruct-v0.2 · 120-document MDQAperformanceHelped

Surprising findings

Limitations

Experimental setup

Datasets: synthetic key-value retrieval (new) MDQA FLenQA MultidocQA IN2 Needle-in-a-haystack MMLU HellaSwag GSM8K TriviaQA NQ-Open

Benchmarks: MDQA FLenQA MMLU HellaSwag GSM8K TriviaQA NQ-Open

Metrics: accuracy maximum subspan exact match

Baselines: MultidocQA finetuning IN2 finetuning Needle-in-a-haystack finetuning MDQA-finetuned GPT-3.5 Turbo original GPT-3.5 Turbo original Mistral 7B

Builds on: lost-in-the-middle needle-in-a-haystack FLenQA

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy