Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

In-Context Learning for the Imputation of Public Opinion Data with Large Language Models

About

Large language models have been widely evaluated as simulators of individual survey responses. In practice, however, fully unobserved responses are rare; the dominant problem is partial non-response. Imputation aims to restore the overall structure of a survey dataset by filling in these missing values. It has its own well-defined evaluation criteria and differs fundamentally from prediction. We propose to impute missing survey data through in-context learning (ICL). We systematically evaluate ICL design choices across different missingness mechanisms (MCAR, MAR, MNAR) on 150 opinion variables spanning 15 waves of the American Trends Panel. Compared to well-established statistical methods for data imputation like MICE PMM, our ICL approach consistently reduces absolute error across all missingness mechanisms, with the largest gains under non-random missingness (MNAR). Notably, the best-performing specification (gpt-oss-120b with 100 in-context examples) achieves near-nominal aggregate coverage (approaching the 95% level) with confidence intervals two to five times narrower than MICE PMM. We publish a Python package with an sklearn-like API to enable easy deployment of our method using local and proprietary LLMs.

Tobias Holtdirk, Georg Ahnert, Joseph W Sakshaug, Anna-Carolina Haensch• 2026

Related benchmarks

TaskDatasetResultRank
ImputationOpinionQA MCAR 140 opinion variables (W26 to W82) American Trends Panel
Median Absolute Error0.033
36
ImputationOpinionQA MNAR 140 opinion variables (W26 to W82) American Trends Panel
Median Absolute Error0.048
36
Survey ImputationOpinionQA MAR
Median Absolute Error0.044
25
ImputationOpinionQA MAR American Trends Panel 140 opinion variables (W26 to W82)
Median Absolute Error0.044
11
Showing 4 of 4 rows

Other info

Follow for update