让文档内搜索更快更准,用智能提示自动补全查询。
DocQAC: Adaptive Trie-Guided Decoding for Effective In-Document Query Auto-Completion

- 用自适应前缀树引导语言模型,动态调整生成方向。
- 在新旧文档上表现优于大模型,且效率更高。
- 适合需要快速检索长文档的办公与科研场景。
查询自动补全(QAC)在网页搜索中已广泛研究,但在文档内搜索中仍属空白,本文提出DocQAC任务以提升长文档中的搜索效率。与传统全局历史查询不同,DocQAC利用文档特定上下文(如内容、用户交互历史)增强补全质量。为此,提出一种自适应前缀树引导解码框架,通过用户输入前缀软性引导语言模型生成高质量补全结果。引入可调超参数的自适应惩罚机制,在模型置信度与前缀引导间实现平衡。结合检索增强生成(RAG)及标题、关键词、摘要等轻量上下文信号,有效融入文档信息。在T5和BART等编码器-解码器模型上测试,该方法在已见和未见文档上的已见查询补全任务中超越强基线,甚至优于更大规模的指令微调模型如LLaMA-3和Phi-3。我们在基于ORCAS构建的新文档内查询补全基准上进行评估,并公开了数据集(https://bit.ly/3IGEkbH)和代码(https://github.com/rahcode7/DocQAC)。
原文摘要 · Abstract (English)
Query auto-completion (QAC) has been widely studied in the context of web search, yet remains underexplored for in-document search, which we term DocQAC. DocQAC aims to enhance search productivity within long documents by helping users craft faster, more precise queries, even for complex or hard-to-spell terms. While global historical queries are available to both WebQAC and DocQAC, DocQAC uniquely accesses document-specific context, including the current document's content and its specific history of user query interactions. To address this setting, we propose a novel adaptive trie-guided decoding framework that uses user query prefixes to softly steer language models toward high-quality completions. Our approach introduces an adaptive penalty mechanism with tunable hyperparameters, enabling a principled trade-off between model confidence and trie-based guidance. To efficiently incorporate document context, we explore retrieval-augmented generation (RAG) and lightweight contextual document signals such as titles, keyphrases, and summaries. When applied to encoder-decoder models like T5 and BART, our trie-guided framework outperforms strong baselines and even surpasses much larger instruction-tuned models such as LLaMA-3 and Phi-3 on seen queries across both seen and unseen documents. This demonstrates its practicality for real-world DocQAC deployments, where efficiency and scalability are critical. We evaluate our method on a newly introduced DocQAC benchmark derived from ORCAS, enriched with query-document pairs. We make both the DocQAC dataset (https://bit.ly/3IGEkbH) and code (https://github.com/rahcode7/DocQAC) publicly available.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。