The Commonplace
Home Papers Evidence Explore Trends Syntheses Digests References Docs 🎲 Workforce Futures
← Papers
Direction, evidence grade, and study type are AI-generated labels (gpt-5-mini), not human-verified. Syntheses are LLM-written. "Tensions" are machine-detected candidates, not confirmed contradictions. A research-acceleration tool, not peer review. How this is built →

Locally deployable open-weight LLMs can handle the bulk of cohort-study data cleaning, reaching up to 88% task completion on a 20-task benchmark; this indicates a practical path to AI-assisted research pipelines without sending sensitive data to cloud services.

Agentic coding without the cloud: evaluating open-weight large language models on longitudinal data preparation tasks
Mack Nixon, Liam Wright, Yevgeniya Kovalchuk, Alison Fang-Wei Wu, Martin Danka, Andy Boyd, David Bann · July 23, 2026
arxiv descriptive medium evidence 7/10 relevance Full text usable extracted full text Source PDF

Structured author observations

Linked only from stored provider relations; the raw author line above is never matched by name.

Arxiv

Latest observation:

  1. Mack Nixon unresolved corpus identity
  2. Liam Wright unresolved corpus identity
  3. Yevgeniya Kovalchuk unresolved corpus identity
  4. Alison Fang-Wei Wu unresolved corpus identity
  5. Martin Danka unresolved corpus identity
  6. Andy Boyd unresolved corpus identity
  7. David Bann unresolved corpus identity

Semantic Scholar

Latest observation:

  1. M. Nixon provider ID
  2. Liam Wright provider ID
  3. Yevgeniya Kovalchuk provider ID
  4. Alison Fang-Wei Wu provider ID
  5. Martin N. Danka provider ID
  6. Andy Boyd provider ID
  7. D. Bann provider ID
Benchmarking on a curated cohort-data cleaning suite shows open-weight LLMs running locally can complete most data-preparation tasks (up to ~88% average task completion), suggesting feasible AI-assisted workflows for governance-restricted research settings.

Citation observations

Cumulative provider counts captured on specific dates; providers are never combined.

Large language models (LLMs) and agents are now widely used tools in code development, with data typically sent to third-party cloud-based models. Their adoption in research using personal data is constrained by governance requirements that typically prohibit data transmission to external services. Locally deployable open-weight models offer an alternative since sensitive data never leave the local environment. We introduce an open-source framework for evaluating the efficacy of AI agents powered by open-weight LLMs on one of the most persistent bottlenecks in research on longitudinal population studies: data preparation. The framework comprises: a curated ground-truth dataset (cleaning scripts preparing six sweeps of data from a British cohort study), task definitions encompassing tasks such as category harmonization and multi-wave merging, and automated routines for evaluating the LLM-produced R code and outputted data. We benchmark LLMs across the (consumer grade) deployment spectrum to assess their efficacy in 20 data preparation tasks (creation of 102 variables). Current state-of-the-art, 31-35B parameter models almost saturated our benchmark ('average task completion' up to 87.9%). The performance of open-weight LLMs running on consumer-grade hardware shows promise of a viable path toward AI-assisted data preparation in governance-restricted research settings. Our framework is publicly available at: https://github.com/UCL-ARC/RRBench.

Summary

Main Finding

Open-weight LLMs running locally on consumer-grade hardware can substantially automate realistic longitudinal survey data-preparation tasks. In a benchmark of 20 tasks (102 derived variables) drawn from the Next Steps cohort, contemporary 31–35B-parameter models achieved high coverage and accuracy (best model balanced performance ≈ 85.9%, average task completion up to 87.9%), showing a viable path for AI-assisted, governance-compliant workflows where data cannot be sent to cloud APIs.

Key Points

  • Benchmark scope: 20 realistic data-preparation tasks from a longitudinal study (Next Steps), covering demographic, education, health, and socioeconomic variables; ground-truth created by experienced cohort researchers.
  • Outputs: agents produced R scripts and executed them locally; evaluation compared resulting datasets cell-by-cell to ground-truth.
  • Evaluation metrics:
    • Completeness: % of expected variables produced.
    • Correctness: % of produced variables meeting agreement threshold (categorical ≥95% cell match; continuous normalized RMSE ≤1e-4).
    • Balanced performance = Completeness × Correctness.
    • Task-level: share of fully-completed tasks and average task completion.
  • Model/evaluation setup:
    • Agentic framework: SmolAgents (lightweight, no native tool-calling required).
    • Models required ≥100k token context windows; 3 agentic runs per task; temperature = 0.8.
    • Detailed vs “lite” prompts were tested; main results use detailed prompts aligned to human ground-truth decisions.
  • Models evaluated (examples & deployment tiers): Gemma 4 (31B, dense), Qwen3.6-35B-A3B (MoE), Qwen3.5-35B (MoE), GPT-OSS-20B (MoE), Devstral-24B (dense), Qwen3.5-9B, Mistral-3-14B, Gemma 4 E4B (failed to produce structured outputs).
  • Top quantitative results (detailed-prompt benchmark):
    • Gemma 4 31B: Completeness 99.7%, Correctness 86.2%, Balanced 85.9%, Complete tasks 75.0%, Avg task completion 87.9%.
    • Qwen3.6-35B-A3B: Balanced 81.7%, Complete tasks 73.3%, Avg task completion 87.6%.
    • Mid/Lower: GPT-OSS-20B Balanced 77.8% (avg task completion 81.0%); Mistral-3-14B Balanced 52.6% (avg 62.0%).
    • Even weaker models often produced most variables (high completeness), but correctness separated performance.
  • Error patterns and limits:
    • Reliable on concepts with standard definitions (sex, ethnicity, BMI, language).
    • Failed or weak on tasks requiring complex, survey-specific metadata interpretation: wave-specific logic, taxonomy compression, multi-input derived variables; housing tenure was not fully completed by any model.
    • Task success negatively correlated with prompt length, script length, and number of operations (r ≈ -0.6 to -0.75).
  • Reproducibility and transparency: framework and code released publicly as RRBench (https://github.com/UCL-ARC/RRBench).

Data & Methods

  • Ground-truth dataset: Next Steps Core (cleaned, research-ready longitudinal data for ages ~14–32), scripts written and validated by cohort researchers. Data stored in wide format across multiple sweeps.
  • Task design: 20 tasks packaged with input files, JSON metadata (variable names, labels, value labels), and detailed prompts specifying expected derived variables and coding decisions. Total 102 target variables.
  • Agent setup:
    • SmolAgents orchestrated iterative code generation, execution, debugging within a closed local environment.
    • LLMs generated R code, which agents executed; failures triggered iterative fixes by the agent.
    • Each task run 3 times per model; temperature 0.8 to avoid agent “sticking” during debugging.
  • Models: only open-weight models released within previous 12 months and supporting large context windows were included; deployment tiers categorized by hardware feasibility (lightweight → consumer → high-end consumer).
  • Evaluation:
    • Variable-level: completeness, correctness (95% categorical agreement threshold; numeric RMSE threshold ≤1e-4), balanced score.
    • Task-level: % tasks fully completed, average within-task completion.
    • Downstream analyses: tested how discrepancies affect applied analyses (e.g., regressions on BMI and income) for variable sets with high/medium/low LLM performance (details summarized qualitatively in results).
  • Sensitivity analyses: varied correctness thresholds, tested lite prompts, and assessed withholding missing-value handling to probe robustness.

Implications for AI Economics

  • Productivity and labor substitution
    • Potential to materially reduce repetitive preprocessing labour in quantitative social and health sciences (authors estimate large duplicated effort across studies). High-performing open-weight models could cut time spent on routine cleaning and variable construction, lowering marginal research costs per project.
    • But gains are heterogeneous: standard constructs (BMI, sex) are easier to automate than bespoke, metadata-heavy tasks. Human oversight remains essential for complex or bespoke derivations.
  • Cost structure and deployment incentives
    • Local open-weight models allow institutions to avoid cloud-provider costs and governance barriers around sensitive data. Up-front hardware costs (suitable GPUs, memory for large-context models) are balanced against avoided per-token cloud fees and compliance costs.
    • There is a cluster of viable model sizes: ~31–35B models achieve near state-of-the-art accuracy while still running on high-end consumer hardware (e.g., 24–32GB GPUs). This creates a market opportunity for institutional procurement of local inference infrastructure and managed open-weight stacks.
  • Quality, risk, and value-of-information
    • High completeness but lower correctness on some models shows a risk of undetected errors propagating into analyses. Economic value of automation depends on error rates acceptable for downstream inference; small miscoding can lead to large analytic biases, implying non-trivial human validation costs remain.
    • Institutions will need to weigh expected labor savings against validation overhead; formal cost-benefit analyses should include the marginal reduction in expert time, costs to acquire/maintain hardware, and the risk-adjusted costs of errors.
  • Market and labor implications
    • Demand shifts: greater demand for AI-fluent data custodians and validators rather than pure manual cleaners. Skills premium may shift toward designing prompts, auditing outputs, and integrating agent workflows.
    • Distributional effects: lower-barrier institutes (with fewer resources) might adopt smaller models with lower accuracy, potentially widening quality gaps unless shared infrastructure or consortia are established.
  • Governance and competition concerns
    • Local open-weight models mitigate one barrier (data privacy) but raise questions about standardization, benchmarking, and certification of model behavior on sensitive datasets — potential role for institutional benchmarks (like RRBench) and regulatory guidance.
    • For applied economics, the ability to run powerful models locally reduces reliance on a small set of cloud LLM providers, with competitive implications and possible downward pressure on API pricing for specialized services.
  • Research priorities for AI economics
    • Quantify time- and cost-savings per project across task types and model classes; estimate ROI for hardware + maintenance vs cloud fees.
    • Model the value of human validation workflows (how much reviewer time per automated variable) to compute net labor savings and residual risk.
    • Study adoption dynamics across institutions with different compliance constraints and budgets — potential for shared TRE-compatible model hosting or cooperative procurement.
    • Measure downstream analytic impact (bias/variance) across many real studies to translate model accuracy into economic value and risk metrics.

Repository - Benchmark and code: https://github.com/UCL-ARC/RRBench

Assessment

Paper Typedescriptive Evidence Strengthmedium — The paper provides systematic, reproducible benchmarking with a curated ground-truth and automated evaluation of LLM-generated R code and outputs, showing strong within-sample performance; however, it does not establish causal effects on economic outcomes or productivity, is limited to a single cohort dataset and task set, and may be sensitive to prompt engineering, model versions, and evaluation choices. Methods Rigormedium — The authors build an open, well-documented benchmark with ground-truth cleaning scripts, clear task definitions (20 tasks, 102 variables), automated scoring, and comparisons across multiple open-weight models and hardware tiers; nevertheless, rigor is limited by reliance on one dataset (one UK cohort across six sweeps), possible selection of tasks that favor code-generation, limited discussion of inter-annotator or human verification of outputs, and potential variability from prompts, model seeds, and local deployment constraints that are not fully explored. SampleA curated ground-truth dataset consisting of cleaning scripts that prepare six sweeps of a British longitudinal cohort study; benchmark defines 20 data-preparation tasks (e.g., category harmonization, multi-wave merging) that produce 102 variables; LLMs (including state-of-the-art 31–35B open-weight models) are evaluated when run on consumer-grade local hardware with automated routines scoring generated R code and resulting data. Themesproductivity human_ai_collab GeneralizabilitySingle dataset: results may not generalize beyond this specific British cohort (UK population, survey structure)., Task scope: focuses on typical cohort data-preparation tasks (tabular, R-based); performance may differ for other tasks (text, images, unstructured data) or workflows., Tooling/language: benchmark uses R code generation; outcomes may differ for other languages/tools (Python, SQL, Stata)., Model/hardware diversity: tested models are open-weight and consumer-grade — larger proprietary models or different open models may perform differently., Evaluation setup: curated ground-truth scripts and task definitions may align with benchmark biases; real-world messy or domain-specific datasets could reduce performance., Operational factors: prompt engineering, chain-of-thought, human-in-the-loop checks, and maintenance costs are not fully captured.

Claims (9)

ClaimDirectionOutcomeConfidence & EvidenceDetails
We introduce an open-source framework for evaluating the efficacy of AI agents powered by open-weight LLMs on data preparation for longitudinal population studies, comprising a curated ground-truth dataset, task definitions, and automated evaluation routines. Research Productivity positive availability of an open-source evaluation framework (dataset, task definitions, evaluation routines)
Reading fidelity high
Study strength high
n=6
0.3
The curated ground-truth dataset comprises cleaning scripts preparing six sweeps of data from a British cohort study. Research Productivity positive number of data sweeps prepared with cleaning scripts
Reading fidelity high
Study strength high
n=6
0.3
We benchmarked LLMs across the consumer-grade deployment spectrum on 20 data preparation tasks involving the creation of 102 variables. Research Productivity positive number of benchmark tasks and variables created
Reading fidelity high
Study strength medium
n=20
102 variables
0.18
Current state-of-the-art, 31-35B parameter models almost saturated our benchmark, achieving average task completion up to 87.9%. Developer Productivity positive average task completion (success rate) on the benchmark
Reading fidelity high
Study strength medium
n=20
87.9%
0.18
The performance of open-weight LLMs running on consumer-grade hardware shows promise of a viable path toward AI-assisted data preparation in governance-restricted research settings. Research Productivity positive feasibility/promise of open-weight LLMs on consumer hardware for governed research workflows
Reading fidelity medium
Study strength medium
not reported
0.11
Data are typically sent to third-party cloud-based models in code development workflows. Governance And Regulation null_result typical data flow practice (sending data to third-party cloud models)
Reading fidelity high
Study strength low
not reported
0.09
Adoption of cloud-based LLMs in research using personal data is constrained by governance requirements that typically prohibit data transmission to external services. Governance And Regulation negative constraint on adoption due to governance prohibitions on external data transmission
Reading fidelity high
Study strength medium
not reported
0.18
Locally deployable open-weight models offer an alternative because sensitive data never leave the local environment. Governance And Regulation positive data locality (sensitive data remaining local)
Reading fidelity high
Study strength medium
not reported
0.18
The framework and all artifacts are publicly available at https://github.com/UCL-ARC/RRBench. Research Productivity positive public availability of framework/artifacts
Reading fidelity high
Study strength high
not reported
0.3

Notes