arXiv:2509.14404cs.SEcs.AI2025-09被引 6

首次系统梳理大模型提示词缺陷,助你避免因小错导致系统失效。

A Taxonomy of Prompt Defects in LLM Systems

  • 按六维度分类提示词缺陷,涵盖意图、内容、结构等
  • 识别各类缺陷根源,并提供可落地的缓解策略
  • 适合开发大模型应用的工程师与研究者参考

大型语言模型已成为现代软件的核心组件,提示词充当其事实上的编程接口。然而,提示词设计仍以经验为主,微小错误可能引发不可靠、不安全或低效的行为。本文首次系统调研并构建了提示词缺陷的分类体系,归纳出六维缺陷:(1) 规范与意图,(2) 输入与内容,(3) 结构与格式,(4) 上下文与记忆,(5) 性能与效率,(6) 可维护性与工程化。每个维度细分为具体子类型,辅以实例和根本原因分析。基于软件工程原则,揭示这些缺陷在实际开发中的表现及其下游影响。针对每类缺陷,提出涵盖新兴提示工程模式、自动化防护机制、测试框架与评估体系在内的缓解策略。最终形成一张整合缺陷、影响与应对措施的主分类图谱。文章还提出开放挑战,呼吁建立严谨的工程化方法,确保大模型系统可靠设计。

原文摘要 · Abstract (English)

Large Language Models (LLMs) have become key components of modern software, with prompts acting as their de-facto programming interface. However, prompt design remains largely empirical and small mistakes can cascade into unreliable, insecure, or inefficient behavior. This paper presents the first systematic survey and taxonomy of prompt defects, recurring ways that prompts fail to elicit their intended behavior from LLMs. We organize defects along six dimensions: (1) Specification and Intent, (2) Input and Content, (3) Structure and Formatting, (4) Context and Memory, (5) Performance and Efficiency, and (6) Maintainability and Engineering. Each dimension is refined into fine-grained subtypes, illustrated with concrete examples and root cause analysis. Grounded in software engineering principles, we show how these defects surface in real development workflows and examine their downstream effects. For every subtype, we distill mitigation strategies that span emerging prompt engineering patterns, automated guardrails, testing harnesses, and evaluation frameworks. We then summarize these strategies in a master taxonomy that links defect, impact, and remedy. We conclude with open research challenges and a call for rigorous engineering-oriented methodologies to ensure that LLM-driven systems are dependable by design.

提示词缺陷LLM工程系统可靠性

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。