An Empirically-grounded tool for Automatic Prompt Linting and Repair: A Case Study on Bias, Vulnerability, and Optimization in Developer Prompts
Not on the map. Why?
Abstract (arXiv)
The tidal wave of advancements in Large Language Models (LLMs) has led to their swift integration into application-level logic. Many software systems now use prompts to interact with these black-box models, combining natural language with dynamic values interpolated at runtime, to perform tasks ranging from sentiment analysis to question answering. Due to the programmatic and structured natural language aspects of these prompts, we refer to them as Developer Prompts. Unlike traditional software artifacts, Dev Prompts blend natural language instructions with artificial languages such as programming and markup languages, thus requiring specialized tools for analysis, distinct from classical software evaluation methods. In response to this need, we introduce PromptDoctor, a tool explicitly designed to detect and correct issues of Dev Prompts. PromptDoctor identifies and addresses problems related to bias, vulnerability, and sub-optimal performance in Dev Prompts, helping mitigate their possible harms. In our analysis of 2,173 Dev Prompts, selected as a representative sample of 40,573 Dev Prompts, we found that 3.46% contained one or more forms of bias, 10.75% were vulnerable to prompt injection attacks. Additionally, 3,310 were amenable to automated prompt optimization. To address these issues, we applied PromptDoctor to the flawed Dev Prompts we discovered. PromptDoctor de-biased 68.29% of the biased Dev Prompts, hardened 41.81% of the vulnerable Dev Prompts, and improved the performance of 37.1% sub-optimal Dev Prompts. Finally, we developed a PromptDoctor VSCode extension, enabling developers to easily enhance Dev Prompts in their existing development workflows. The data and source code for this work are available at
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Builds on 50 of its 80 references that are in the map. First posted on arXiv 21 Jan 2025.
Builds on
50 of 80 references.
References · 50
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2023GPT-4 Technical Reportcited by 18,132
- 2024The Llama 3 Herd of Modelscited by 14,192
- 2021Training Verifiers to Solve Math Word Problemscited by 9,743
- 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,049
- 2023Judging LLM-as-a-Judge with MT-Bench and Chatbot Arenacited by 8,393
- 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 2,914
- 2023Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injectioncited by 1,339
- 2023Jailbreaking Black Box Large Language Models in Twenty Queriescited by 1,326
- 2020What Disease does this Patient Have? A Large-scale Open Domain Question Answering Dataset from Medical Examscited by 1,324
- 2017Get To The Point: Summarization with Pointer-Generator Networkscited by 1,281
- 2019PubMedQA: A Dataset for Biomedical Research Question Answeringcited by 1,271
38 more
- 2023Large Language Models as Optimizerscited by 830
- 2022Ignore Previous Prompt: Attack Techniques For Language Modelscited by 760
- 2023Automatic Prompt Optimization with "Gradient Descent" and Beam Searchcited by 628
- 2023Bias and Fairness in Large Language Models: A Surveycited by 626
- 2023A Prompt Pattern Catalog to Enhance Prompt Engineering with ChatGPTcited by 612
- 2023Prompt Injection attack against LLM-integrated Applicationscited by 568
- 2023Plan-and-Solve Prompting: Improving Zero-Shot Chain-of-Thought Reasoning by Large Language Modelscited by 550
- 2023Promptbreeder: Self-Referential Self-Improvement Via Prompt Evolutioncited by 521
- 2024A Systematic Survey of Prompt Engineering in Large Language Models: Techniques and Applicationscited by 428
- 2023Formalizing and Benchmarking Prompt Injection Attacks and Defensescited by 328
- 2023Benchmarking and Defending Against Indirect Prompt Injection Attacks on Large Language Modelscited by 237
- 2023Using an LLM to Help With Code Understandingcited by 222
- 2023Marked Personas: Using Natural Language Prompts to Measure Stereotypes in Language Modelscited by 204
- 2024PLeak: Prompt Leaking Attacks against Large Language Model Applicationscited by 113
- 2024Synthetic Data (Almost) from Scratch: Generalized Instruction Tuning for Language Modelscited by 99
- 2023Automatic Semantic Augmentation of Language Model Prompts (for Code Summarization)cited by 72
- 2023ARB: Advanced Reasoning Benchmark for Large Language Modelscited by 60
- 2023Copiloting the Copilots: Fusing Large Language Models with Completion Engines for Automated Program Repaircited by 55
- 2023Assessing Prompt Injection Risks in 200+ Custom GPTscited by 49
- 2020"Call me sexist, but...": Revisiting Sexism Detection Using Psychological Scales and Adversarial Samplescited by 48
- 2024Prompt Design and Engineering: Introduction and Advanced Methodscited by 45
- 2022How to Prompt? Opportunities and Challenges of Zero- and Few-Shot Learning for Human-AI Interaction in Creative Applications of Generative Modelscited by 43
- 2023WinoQueer: A Community-in-the-Loop Benchmark for Anti-LGBTQ+ Bias in Large Language Modelscited by 42
- 2024Signed-Prompt: A New Approach to Prevent Prompt Injection Attacks Against LLM-Integrated Applicationscited by 42
- 2023Prompting Is All You Need: Automated Android Bug Replay with Large Language Modelscited by 40
- 2021True Few-Shot Learning with Prompts -- A Real-World Perspectivecited by 38
- 2024Dialect prejudice predicts AI decisions about people's character, employability, and criminalitycited by 35
- 2023PromptCARE: Prompt Copyright Protection by Watermark Injection and Verificationcited by 30
- 2023Language Models Get a Gender Makeover: Mitigating Gender Bias with Few-Shot Data Interventionscited by 28
- 2024An Early Categorization of Prompt Injection Attacks on Large Language Modelscited by 28
- 2023Don't Stop Pretraining? Make Prompt-based Fine-tuning Powerful Learnercited by 23
- 2024Ethos: Rectifying Language Models in Orthogonal Parameter Spacecited by 20
- 2024Large Language Models as Software Components: A Taxonomy for LLM-Integrated Applicationscited by 17
- 2024Benchmarking Large Language Models for Math Reasoning Taskscited by 12
- 2024PromptSet: A Programmer's Prompting Datasetcited by 9
- 2023Fair Models in Credit: Intersectional Discrimination and the Amplification of Inequitycited by 3
- 2021Identifying the Prevalence of Gender Biases among the Computing Organizationscited by 1
- 2022Gender Bias in Big Data Analysiscited by 1
Built on by
Citing papers per year: 2026: 1.
1 paper.