Abstract
We introduce a new problem KTRL+F, a knowledge-augmented in-document search that necessitates real-time identification of all semantic targets within a document with the awareness of external sources through a single natural query. KTRL+F addresses following unique challenges for in-document search: 1) utilizing knowledge outside the document for extended use of additional information about targets, and 2) balancing between real-time applicability with the performance. We analyze various baselines in KTRL+F and find limitations of existing models, such as hallucinations, high latency, or difficulties in leveraging external knowledge. Therefore, we propose a Knowledge-Augmented Phrase Retrieval model that shows a promising balance between speed and performance by simply augmenting external knowledge in phrase embedding. We also conduct a user study to verify whether solving KTRL+F can enhance search experience for users. It demonstrates that even with our simple model, users can reduce the time for searching with less queries and reduced extra visits to other sources for collecting evidence. We encourage the research community to work on KTRL+F to enhance more efficient in-document information access.
Introduction: Beyond Lexical Search
Standard in-document search, typically accessed via the Ctrl+F shortcut, relies on lexical matching. While efficient, this approach is limited by its inability to understand semantic relationships or utilize external context. For instance, a user searching for "social network platforms of China" in a document mentioning WeChat and Weibo would find no results if those specific entities are not explicitly categorized as such within the text.
Existing semantic search methods like Machine Reading Comprehension (MRC) often focus on single-answer extraction and fail to incorporate external knowledge. Conversely, Large Language Models (LLMs) possess the necessary knowledge but are often too slow for real-time UI interactions and prone to hallucinations. KTRL+F bridges this gap by requiring systems to identify all relevant semantic targets using external knowledge in real-time.
Methodology: Knowledge-Augmented Phrase Retrieval
To address the KTRL+F task, researchers from KAIST and Samsung proposed a Knowledge-Augmented Phrase Retrieval model. This system extends the DensePhrases architecture through a four-step process:
- Entity Linking: The document is scanned to link mentions (e.g., "WeChat") to external knowledge bases like Wikipedia.
- Knowledge Embedding: Embeddings are generated for the linked Wikipedia entries, capturing their titles and summaries.
- Augmentation via Addition: The model performs a simple element-wise addition of the external knowledge embedding to the document's phrase embedding. This allows the phrase representation to "absorb" external context without requiring expensive retraining.
- Maximum Inner Product Search (MIPS): To maintain real-time performance, MIPS is used to retrieve all matching phrases in a single pass.
The KTRL+F Dataset
As no existing benchmarks required both external knowledge and exhaustive target identification, the authors curated the KTRL+F Dataset. This dataset consists of 512 queries derived from 100 English news articles in the C4 dataset.
The construction involved a sophisticated pipeline: LLAMA-2-70B generated initial query-target pairs, which were then refined through a multi-stage filter using GPT-3.5, GPT-4, and an MRC model (DeBERTa). This ensured that the queries truly required external knowledge—a fact confirmed by the finding that 74.3% of queries could not be answered using the document text alone.
Key Results and User Impact
Performance and Efficiency
The proposed model demonstrates a significant advantage in speed, achieving a latency of just 15ms per query. In comparison, LLAMA-2-7B requires over 2,000ms, making it unsuitable for interactive search. Despite its simplicity, the retrieval-based approach outperformed extractive baselines on the "List Overlap F1" metric and remained competitive with larger generative models while avoiding their characteristic hallucinations.
User Study
A user study involving a Chrome extension implementation revealed that KTRL+F significantly improves the search experience. Users reported:
- Reduced Search Time: Finding information faster due to semantic awareness.
- Lower Query Volume: Needing fewer search attempts to locate all relevant mentions.
- Decreased External Reliance: Fewer visits to search engines or Wikipedia, as the necessary context was integrated directly into the document search.
Conclusion and Future Directions
KTRL+F represents a shift toward more "intelligent" document navigation. While the current model relies on a static Wikipedia snapshot and faces a brief initial indexing overhead (1–3 seconds), it proves that simple embedding augmentation can effectively bridge the knowledge gap in real-time. Future work may explore dynamic knowledge updates and domain-specific databases to further enhance the utility of knowledge-augmented search.
Summary updated