逻辑草图提示(LSP):一种确定性和可解释的提示方法
Logic Sketch Prompting (LSP): A Deterministic and Interpretable Prompting Method
AI总结:
逻辑草图提示(LSP)通过引入类型变量、确定性条件评估器和规则验证器,提升了大语言模型在需要严格规则遵守、确定性和可审计性任务中的性能和可解释性。
摘要:
大型语言模型(LLMs)在自然语言推理方面表现出色,但在需要严格规则遵守、确定性和可审计性任务上仍不可靠。逻辑草图提示(LSP)是一种轻量级的提示框架,引入了带类型变量、确定性条件评估器和基于规则的验证器,以产生可追溯和可重复的输出。通过两个药理学逻辑合规任务,我们对LSP在Gemma 2、Mistral和Llama 3三个开源模型上进行了基准测试,与零样本提示、思维链提示和简洁提示进行了比较。在两个任务和所有模型上,LSP始终在准确率(0.83至0.89)和F1分数(0.83至0.89)上取得最高成绩,显著优于零样本提示(0.24至0.60)、简洁提示(0.16至0.30)和思维链提示(0.56至0.75)。McNemar检验显示,LSP在几乎所有比较中均显示出统计学显著优势(p < 0.01)。这些结果表明,LSP在不牺牲性能的情况下提高了确定性、可解释性和一致性,支持其在临床、受控和安全关键决策支持系统中的应用。
英文摘要:
Large language models (LLMs) excel at natural language reasoning but remain unreliable on tasks requiring strict rule adherence, determinism, and auditability. Logic Sketch Prompting (LSP) is a lightweight prompting framework that introduces typed variables, deterministic condition evaluators, and a rule based validator that produces traceable and repeatable outputs. Using two pharmacologic logic compliance tasks, we benchmark LSP against zero shot prompting, chain of thought prompting, and concise prompting across three open weight models: Gemma 2, Mistral, and Llama 3. Across both tasks and all models, LSP consistently achieves the highest accuracy (0.83 to 0.89) and F1 score (0.83 to 0.89), substantially outperforming zero shot prompting (0.24 to 0.60), concise prompts (0.16 to 0.30), and chain of thought prompting (0.56 to 0.75). McNemar tests show statistically significant gains for LSP across nearly all comparisons (p < 0.01). These results demonstrate that LSP improves determinism, interpretability, and consistency without sacrificing performance, supporting its use in clinical, regulated, and safety critical decision support systems.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。