[Paper Review] Evaluating the Decency and Consistency of Data Validation Tests Generated by LLMs
This study evaluates the quality of data validation tests generated by GPT-3.5 and GPT-4 using varied prompts, roles, few-shot learning, and temperature settings. It finds that few-shot prompting significantly improves test decency and consistency, with GPT-4 and GPT-3.5 performing similarly, suggesting LLMs can effectively assist in creating initial data validation suites for data science workflows.
We investigated whether large language models (LLMs) can develop data validation tests. We considered 96 conditions each for both GPT-3.5 and GPT-4, examining different prompt scenarios, learning modes, temperature settings, and roles. The prompt scenarios were: 1) Asking for expectations, 2) Asking for expectations with a given context, 3) Asking for expectations after requesting a data simulation, and 4) Asking for expectations with a provided data sample. The learning modes were: 1) zero-shot, 2) one-shot, and 3) few-shot learning. We also tested four temperature settings: 0, 0.4, 0.6, and 1. And the two distinct roles were: 1) helpful assistant, 2) expert data scientist. To gauge consistency, every setup was tested five times. The LLM-generated responses were benchmarked against a gold standard data validation suite, created by an experienced data scientist knowledgeable about the data in question. We find there are considerable returns to the use of few-shot learning, and that the more explicit the data setting can be the better, to a point. The best LLM configurations complement, rather than substitute, the gold standard results. This study underscores the value LLMs can bring to the data cleaning and preparation stages of the data science workflow, but highlights that they need considerable evaluation by experienced analysts.
Motivation & Objective
- To assess the feasibility of using large language models (LLMs) to generate dataset validation tests for real-world data science workflows.
- To investigate how prompt design, learning modes, temperature settings, and role definitions affect the quality of LLM-generated validation tests.
- To benchmark LLM outputs against a gold standard suite of tests created by an expert data scientist.
- To explore whether LLMs can reduce the time and effort required to build initial data validation pipelines.
- To evaluate the consistency and decency of LLM-generated tests across multiple experimental configurations.
Proposed method
- Conducted 96 experiments per LLM (GPT-3.5 and GPT-4), varying prompt scenarios, learning modes (zero-shot, one-shot, few-shot), temperature settings (0, 0.4, 0.6, 1), and roles (helpful assistant, expert data scientist).
- Used a human coder to rate each LLM response on decency (1–5) and consistency (1–5), with five repetitions per configuration to assess stability.
- Benchmarked LLM-generated tests against a gold standard suite of validation tests manually constructed by an experienced data scientist.
- Applied ordinal regression models using rstanarm to analyze the impact of prompt design and configuration on decency and consistency scores.
- Focused on the Great Expectations framework for test generation, ensuring compatibility with common data validation pipelines.
- Collected and analyzed responses across diverse prompt variations, including context descriptions and data samples, to assess their influence on output quality.

Experimental results
Research questions
- RQ1How do different prompt scenarios (e.g., asking for expectations, providing context, or including a data sample) affect the decency and consistency of LLM-generated validation tests?
- RQ2To what extent does few-shot learning improve the quality of LLM-generated data validation tests compared to zero-shot or one-shot settings?
- RQ3How do temperature settings influence the consistency of LLM-generated test outputs, and do they affect decency?
- RQ4Does the role assigned to the LLM (e.g., 'helpful assistant' vs. 'expert data scientist') significantly impact the quality of generated tests?
- RQ5How do GPT-3.5 and GPT-4 compare in generating high-quality, consistent, and decent data validation tests under identical experimental conditions?
Key findings
- Few-shot learning significantly improves the decency and consistency of LLM-generated data validation tests compared to zero-shot or one-shot settings.
- Providing detailed descriptions of the expected dataset structure enhances test quality more than including a sample data instance.
- Temperature settings are strongly associated with consistency but not with decency, with lower temperatures (e.g., 0) yielding more stable outputs.
- GPT-4 and GPT-3.5 show comparable performance in generating high-quality validation tests, with no significant difference in overall decency or consistency scores.
- The best-performing LLM configurations produce tests that complement, rather than replace, the gold standard, suggesting a valuable role in initial test suite generation.
- The study demonstrates that LLMs can effectively assist in automating the creation of initial data validation rules, reducing manual effort in data preparation pipelines.

Better researchstarts right now
From reading papers to final review, dramatically reduce your research time.
No credit card · Free plan available
This review was created by AI and reviewed by human editors.