让大模型按流程交易,避免出错。
Aligning Large Language Models with Procedural Rules: An Autoregressive State-Tracking Prompting for In-Game Trading
- 用提示词让大模型显式追踪交易状态
- 状态准确率超99%,计算精度达99.3%
- 小模型也能达到大模型效果,响应快10倍
大语言模型虽能实现动态游戏交互,但在规则驱动的交易系统中常无法遵循关键流程(浏览-报价-审核-确认),损害玩家信任。本文提出自回归状态追踪提示(ASTP),通过精心设计的提示迫使大模型显式报告上一轮的预定义状态标签,取代依赖隐式上下文理解。为保障交易完整性,结合状态特定占位符后处理方法以精确计算价格。在300组交易对话上的评估显示,状态符合率超过99%,计算精度达99.3%。值得注意的是,采用占位符后处理的ASTP在较小模型(Gemini-2.5-Flash)上达到大型模型(Gemini-2.5-Pro)性能,同时将响应时间从21.2秒降至2.4秒,为商业游戏在实时性与资源限制下提供可行解决方案。
原文摘要 · Abstract (English)
Large Language Models (LLMs) enable dynamic game interactions but fail to follow essential procedural flows in rule-governed trading systems, eroding player trust. This work resolves the core tension between the creative flexibility of LLMs and the procedural demands of in-game trading (browse-offer-review-confirm). To this end, Autoregressive State-Tracking Prompting (ASTP) is introduced, a methodology centered on a strategically orchestrated prompt that compels an LLM to make its state-tracking process explicit and verifiable. Instead of relying on implicit contextual understanding, ASTP tasks the LLM with identifying and reporting a predefined state label from the previous turn. To ensure transactional integrity, this is complemented by a state-specific placeholder post-processing method for accurate price calculations. Evaluation across 300 trading dialogues demonstrates >99% state compliance and 99.3% calculation precision. Notably, ASTP with placeholder post-processing on smaller models (Gemini-2.5-Flash) matches larger models' (Gemini-2.5-Pro) performance while reducing response time from 21.2s to 2.4s, establishing a practical foundation that satisfies both real-time requirements and resource constraints of commercial games.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。