-
SPADE: Synthesizing Data Quality Assertions for Large Language Model Pipelines
Authors:
Shreya Shankar,
Haotian Li,
Parth Asawa,
Madelon Hulsebos,
Yiming Lin,
J. D. Zamfirescu-Pereira,
Harrison Chase,
Will Fu-Hinthorn,
Aditya G. Parameswaran,
Eugene Wu
Abstract:
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 m…
▽ More
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.
△ Less
Submitted 31 March, 2024; v1 submitted 5 January, 2024;
originally announced January 2024.
-
Revisiting Prompt Engineering via Declarative Crowdsourcing
Authors:
Aditya G. Parameswaran,
Shreya Shankar,
Parth Asawa,
Naman Jain,
Yujie Wang
Abstract:
Large language models (LLMs) are incredibly powerful at comprehending and generating data in the form of text, but are brittle and error-prone. There has been an advent of toolkits and recipes centered around so-called prompt engineering-the process of asking an LLM to do something via a series of prompts. However, for LLM-powered data processing workflows, in particular, optimizing for quality, w…
▽ More
Large language models (LLMs) are incredibly powerful at comprehending and generating data in the form of text, but are brittle and error-prone. There has been an advent of toolkits and recipes centered around so-called prompt engineering-the process of asking an LLM to do something via a series of prompts. However, for LLM-powered data processing workflows, in particular, optimizing for quality, while keeping cost bounded, is a tedious, manual process. We put forth a vision for declarative prompt engineering. We view LLMs like crowd workers and leverage ideas from the declarative crowdsourcing literature-including leveraging multiple prompting strategies, ensuring internal consistency, and exploring hybrid-LLM-non-LLM approaches-to make prompt engineering a more principled process. Preliminary case studies on sorting, entity resolution, and imputation demonstrate the promise of our approach
△ Less
Submitted 7 August, 2023;
originally announced August 2023.
-
COVID-19 in Spain and India: Comparing Policy Implications by Analyzing Epidemiological and Social Media Data
Authors:
Parth Asawa,
Manas Gaur,
Kaushik Roy,
Amit Sheth
Abstract:
The COVID-19 pandemic has forced public health experts to develop contingent policies to stem the spread of infection, including measures such as partial/complete lockdowns. The effectiveness of these policies has varied with geography, population distribution, and effectiveness in implementation. Consequently, some nations (e.g., Taiwan, Haiti) have been more successful than others (e.g., United…
▽ More
The COVID-19 pandemic has forced public health experts to develop contingent policies to stem the spread of infection, including measures such as partial/complete lockdowns. The effectiveness of these policies has varied with geography, population distribution, and effectiveness in implementation. Consequently, some nations (e.g., Taiwan, Haiti) have been more successful than others (e.g., United States) in curbing the outbreak. A data-driven investigation into effective public health policies of a country would allow public health experts in other nations to decide future courses of action to control the outbreaks of disease and epidemics. We chose Spain and India to present our analysis on regions that were similar in terms of certain factors: (1) population density, (2) unemployment rate, (3) tourism, and (4) quality of living. We posit that citizen ideology obtainable from twitter conversations can provide insights into conformity to policy and suitably reflect on future case predictions. A milestone when the curves show the number of new cases diverging from each other is used to define a time period to extract policy-related tweets while the concepts from a causality network of policy-dependent sub-events are used to generate concept clouds. The number of new cases is predicted using sentiment scores in a regression model. We see that the new case predictions reflects twitter sentiment, meaningfully tied to a trigger sub-event that enables policy-related findings for Spain and India to be effectively compared.
△ Less
Submitted 25 October, 2020;
originally announced October 2020.