Papers › SPADE: Synthesizing Data Quality Assertions for Large Language Model Pipelines

SPADE: Synthesizing Data Quality Assertions for Large Language Model Pipelines

5 Jan 2024arXiv:2401.03038links table onlyarchive 2025-07-28

Shreya Shankar, Haotian Li, Parth Asawa, Madelon Hulsebos, Yiming Lin, J. D. Zamfirescu-Pereira, Harrison Chase, Will Fu-Hinthorn, Aditya G. Parameswaran, Eugene Wu

The archive published only this paper's code-link row. Authors, date and abstract are from arXiv's metadata (CC0), read from the Kaggle arXiv metadata snapshot of 2026-09-12 where its title matched the archive's; the title is the archive's.

Large language models (LLMs) are being increasingly deployed as part of pipelines that repeatedly process or generate data of some sort. However, a common barrier to deployment are the frequent and often unpredictable errors that plague LLMs. Acknowledging the inevitability of these errors, we propose {\em data quality assertions} to identify when LLMs may be making mistakes. We present SPADE, a method for automatically synthesizing data quality assertions that identify bad LLM outputs. We make the observation that developers often identify data quality issues during prototyping prior to deployment, and attempt to address them by adding instructions to the LLM prompt over time. SPADE therefore analyzes histories of prompt versions over time to create candidate assertion functions and then selects a minimal set that fulfills both coverage and accuracy requirements. In testing across nine different real-world LLM pipelines, SPADE efficiently reduces the number of assertions by 14\% and decreases false failures by 21\% when compared to simpler baselines. SPADE has been deployed as an offering within LangSmith, LangChain's LLM pipeline hub, and has been used to generate data quality assertions for over 2000 pipelines across a spectrum of industries.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2401.03038")

Code

Syntology Ran 15 of 17 code samples harvested from 1 repository linked to this paper; 2 have no recorded run. Of those that ran: 15 ran with no contract checked.

By repository: official repository: 17 samples from 1 repository, 15 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

shreyashankar/spade-experiments officialmentioned in paper report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

17 samples harvested; 15 ran; 0 honoured the contract we drafted; 2 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

15ran
2unverified

Licence: 17 of the 17 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from shreyashankar/spade-experiments. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

ask_llm shreyashankar/spade-experiments/paper_experiments/codereviews/candidate_assertions.py official repository ran no licence file found · pointer only · 7017da1e68286a10 · report
ask_llm shreyashankar/spade-experiments/paper_experiments/emails/candidate_assertions.py official repository ran no licence file found · pointer only · 48cde357655569c7 · report
assert_includes_code_improvements_v1 shreyashankar/spade-experiments/paper_experiments/codereviews/candidate_assertions.py official repository ran no licence file found · pointer only · 49e1aa19c774b88a · report
assert_response_follows_review_format_v1 shreyashankar/spade-experiments/paper_experiments/codereviews/candidate_assertions.py official repository ran no licence file found · pointer only · d9bcdd3a934191fc · report
assert_structured_format_followed_1 shreyashankar/spade-experiments/paper_experiments/emails/candidate_assertions.py official repository ran no licence file found · pointer only · 3e08867dd69902b4 · report
assert_workflow_followed_2 shreyashankar/spade-experiments/paper_experiments/emails/candidate_assertions.py official repository ran no licence file found · pointer only · 7f9b221d3ccd89d1 · report
calculate_coverage shreyashankar/spade-experiments/spade_v3/optimizer.py official repository ran no licence file found · pointer only · 53f4c7efd1b7e4a0 · report
calculate_ffr shreyashankar/spade-experiments/spade_v3/optimizer.py official repository ran no licence file found · pointer only · c2802c9c9076c140 · report
does_func1_imply_func2 shreyashankar/spade-experiments/spade_v3/check_subsumes.py official repository ran fingerprinted no licence file found · pointer only · cfdd045ac1a9c656 · report
execute_candidate_assertions shreyashankar/spade-experiments/spade_v3/execute_assertions.py official repository ran no licence file found · pointer only · 451bac2fe4a2e8d3 · report
generate_assertions shreyashankar/spade-experiments/spade_v3/assertion_gen.py official repository ran no licence file found · pointer only · cea97b04cf63f5b6 · report
get_clean_ast shreyashankar/spade-experiments/spade_v3/check_subsumes.py official repository ran no licence file found · pointer only · 1db4a844d3afd5ea · report
get_clean_ast_dup shreyashankar/spade-experiments/spade_v3/check_subsumes.py official repository ran no licence file found · pointer only · 47210ce2a56ded82 · report
label_responses shreyashankar/spade-experiments/spade_v3/label_results.py official repository ran no licence file found · pointer only · b7bd217d972994f3 · report
prepare_for_optimizer shreyashankar/spade-experiments/spade_v3/label_results.py official repository ran no licence file found · pointer only · c0acd8f49d961a35 · report
execute_pipeline_on_examples shreyashankar/spade-experiments/spade_v3/execute_assertions.py official repository unverified no licence file found · pointer only · a05b1d590e92bc28 · report
show_diff shreyashankar/spade-experiments/spade_v3/candidate_gen.py official repository unverified no licence file found · pointer only · 51dbe3731b9fb8a9 · report

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections