Abstract
Grounded conversational agents must accurately identify relevant information within long documents to provide helpful responses. This task, known as knowledge identification, is often hindered by document length and the loss of dialogue context. We introduce DIALKI (DIALogue-document Knowledge Identification), a novel framework that treats documents as structured passages and employs a multi-task learning objective to track dialogue history. DIALKI demonstrates significant performance gains on the Doc2Dial and Wizard of Wikipedia benchmarks, particularly in generalizing to unseen domains. Our results show that by contextualizing the document within the dialogue trajectory, DIALKI achieves up to a 72% relative improvement in Exact Match on unseen domains and enhances downstream response generation quality.
1. Introduction
The development of conversational agents that are "grounded" in external documents—such as technical manuals, social welfare policies, or Wikipedia pages—is a major frontier in natural language processing. A core challenge in this domain is "finding the needle in the haystack": accurately identifying the specific snippet of text within a long document that is required to answer a user's current query.
Existing approaches typically face two major hurdles. First, they often treat documents as single, massive strings, which frequently exceed the token limits of transformer-based models like BERT. Alternatively, they treat documents as collections of isolated sentences, which strips away vital structural and discourse context. Second, many models fail to account for the sequential nature of dialogue; they treat each turn as an independent event, ignoring how previous knowledge usage informs the current turn.
As illustrated in Figure 1, identifying the correct document section requires understanding both the user's intent and the document's hierarchical structure. We propose DIALKI to bridge this gap by explicitly modeling the interaction between dialogue history and document structure.
2. Methodology
DIALKI introduces a multi-faceted approach to knowledge identification, focusing on structural preservation and temporal context.
2.1 Multi-Passage Encoding
To overcome the limitations of flat document representations, DIALKI divides documents into structured passages, such as paragraphs or sections. The model encodes the dialogue context alongside each passage individually using BERT. This approach allows the model to process significantly longer documents while maintaining the local discourse context necessary for accurate matching.
2.2 Dialogue-Document Contextualization
A central innovation of DIALKI is its specialized gating mechanism, inspired by Entity Networks. This mechanism updates the representations of document spans based on the sequence of previous dialogue turns. By doing so, the model "understands" the evolving relationship between the document content and the ongoing conversation, effectively maintaining a "knowledge state."
2.3 Multi-Task Learning with History Tracking
During the training phase, DIALKI is optimized using a multi-task objective. In addition to predicting the knowledge required for the next turn, the model performs an auxiliary task: History Knowledge Identification. It attempts to predict which parts of the document were utilized in previous turns. This forces the model to learn the latent interdependencies between the dialogue trajectory and the document's internal structure.
2.4 Posterior Regularization
To enhance robustness against domain shifts—such as transitioning from documents about social services to those about public health—DIALKI incorporates an adversarial training loss based on f-divergence. This posterior regularization helps the model generalize its matching strategy across diverse topics.
3. Experimental Evaluation
We evaluated DIALKI on two primary benchmarks: Doc2Dial, a goal-oriented dataset grounded in long social-welfare documents, and Wizard of Wikipedia (WoW), a social chat dataset.
3.1 Results on Doc2Dial
On the Doc2Dial blind test set involving unseen domains, DIALKI achieved an Exact Match (EM) of 59.5 and an F1 score of 71.0. This is a staggering improvement over the previous state-of-the-art baseline, which reached only 34.6 EM and 53.2 F1. This represents a ~72% relative improvement in Exact Match, demonstrating the model's superior ability to locate precise information in unfamiliar contexts.
3.2 Generalization on Wizard of Wikipedia
DIALKI also set a new state-of-the-art on the WoW dataset. Notably, on the "Unseen" topic split, DIALKI achieved 35.5 EM, nearly doubling the 18.3 EM of the previous SLKS model. These results suggest that DIALKI learns a generalizable strategy for matching dialogue intent to document segments rather than simply memorizing keywords.
3.3 Impact on Response Generation
To assess the downstream utility of improved knowledge identification, we fed DIALKI’s predicted knowledge into a BART-based response generator. This configuration improved the SacreBLEU score by nearly 3 points compared to providing the generator with the full document. This confirms that better "filtering" of knowledge directly leads to more coherent and relevant agent responses.
4. Discussion and Limitations
While DIALKI represents a significant step forward, several challenges remain. The model currently relies on static datasets and may require further adaptation for real-world interactive settings where users might provide irrelevant information. Additionally, performance is sensitive to the initial segmentation of documents into passages; automated, optimal segmentation is an area for future research. Finally, the model assumes the answer is always present in the document; handling "out-of-document" queries is a necessary next step for production-ready systems.
5. Conclusion
DIALKI demonstrates that respecting document structure and tracking dialogue history are critical for effective knowledge identification in grounded conversational systems. By contextualizing documents within the dialogue flow, DIALKI achieves massive performance leaps and shows remarkable robustness across diverse domains, paving the way for more reliable and context-aware AI assistants.
Summary updated