Researchers have introduced DocQAC, a novel query auto-completion system designed specifically for in-document search within long texts. Unlike traditional web-based QAC, DocQAC leverages the full document context—including current content and user interaction history—to help users craft faster, more precise queries.
The core innovation is an adaptive trie-guided decoding framework that softly steers language models toward high-quality completions using user query prefixes. A tunable biasing mechanism balances model confidence with trie-based guidance. To incorporate document context efficiently, the system employs retrieval-augmented generation (RAG) alongside lightweight signals such as titles, keyphrases, and summaries.
When tested on encoder–decoder models like T5 and BART, the trie-guided approach outperformed strong baselines and even surpassed larger instruction-tuned models such as LLaMA-3 and Phi-3 in seen-query scenarios. This demonstrates its practicality for real-world deployments where efficiency and scalability are critical. The work was evaluated on a newly introduced DocQAC benchmark, highlighting its effectiveness for enhancing search productivity within long documents.