Language Models that Seek for Knowledge: Modular Search & Generation for Dialogue and Prompt Completion

Kurt Shuster, Mojtaba Komeili, Leonard Adolphs, Stephen Roller, Arthur Szlam, Jason Weston

TL;DR

SeeKeR (Search-engine $\rightarrow$ Knowledge $\rightarrow$ Response) is a modular architecture that uses a single transformer model iteratively to search the internet, extract relevant information, and generate a final response. By grounding its output in real-time search results, SeeKeR significantly reduces hallucinations and outperforms models 500x its size, like GPT-3, on tasks requiring up-to-date factual knowledge.

What Problem Does This Paper Address?

Standard Large Language Models (LLMs) suffer from two major flaws:

  1. Hallucinations: They often generate fluent but factually incorrect statements.
  2. Temporal Frozenness: Their knowledge is limited to their training data cutoff. They cannot "know" about events that happened after they were trained.

While retrieval-augmented models exist, they often struggle to aggregate information from multiple documents or are limited to fixed, static corpora. The authors aim to create a system that can actively seek out the most current information from the open internet and integrate it into both dialogue and general language modeling.

Methods

The core innovation is the SeeKeR pipeline, which decomposes the generation process into three modular steps performed by a single transformer architecture:

  1. Search Module: Given the input context, the model generates a search query. This query is sent to an internet search engine (like Bing or Mojeek).
  2. Knowledge Module: The model is fed the retrieved documents and extracts the most relevant sentence or phrase. This acts as a "copy" task, simplifying the information bottleneck.
  3. Response Module: The model takes the original context plus the extracted knowledge to generate a final, fluent response.
The SeeKeR modular pipeline

The authors use special control tokens to signal which module the transformer should invoke. This allows a single set of parameters to learn three distinct tasks. They tested both encoder-decoder versions (for dialogue) and decoder-only versions (based on GPT-2 for language modeling).

Datasets

The authors utilized a massive array of datasets for multi-task fine-tuning:

  • Dialogue: Wizard of Internet (WizInt) for search queries, Wizard of Wikipedia (WoW), PersonaChat, and Multi-Session Chat.
  • Question Answering: SQuAD, TriviaQA, Natural Questions, and MS MARCO (modified to focus on knowledge extraction).
  • Language Modeling: A subset of Common Crawl was used to create a self-supervised "title prediction" task to train the search module for general LM tasks.
  • Topical Prompts (New): To test up-to-date knowledge, the authors created a benchmark of 100 prompts based on Wikipedia current events from January 2022—data that none of the models had seen during pre-training.

Key Insights and Ideas

  • Modularity via Iteration: Instead of building three separate models, using one model three times is parameter-efficient and effective. The "shared parameter" version performed similarly to or better than using three independent models (the "x3" variants).
  • Search as a Factuality Anchor: By forcing the model to first "find" knowledge before "speaking," the difficulty of the generation task is reduced from "recall and synthesize" to "extract and synthesize."
  • Small Models, Big Knowledge: The most striking finding is that a 345M parameter SeeKeR model can outperform the 175B parameter GPT-3 on topicality and hallucination metrics. This suggests that for factual tasks, access to a search engine is more important than raw parameter count.
  • The "Copy" Task Advantage: The Knowledge Module essentially performs a selection/copy task. This prevents the model from trying to merge conflicting facts from multiple documents into a single hallucinated sentence.

Key Results

SeeKeR demonstrated significant gains across both dialogue and prompt completion:

  • Dialogue Performance: In human evaluations, SeeKeR outperformed BlenderBot 2 (the previous state-of-the-art) in consistency, knowledgeability, and engagingness.
  • Factuality: SeeKeR reduced "Factually Incorrect" ratings in dialogue to 3.94%, compared to 9.14% for BlenderBot 1.
Table 1: Comparison of SeeKeR with state-of-the-art models on open-domain dialogue, as judged by human evaluators during short conversations. ∗indicates statistically significant improvements over the next closest model (independent two-sample t-test, p < 0.001).
  • Topical Prompt Completion: On the January 2022 news benchmark, SeeKeR XL (1.5B parameters) achieved a 19% topicality score, while GPT-3 (175B) managed only 4%. Furthermore, SeeKeR had fewer hallucinations (51% vs 62% for GPT-3).
Table 3: Comparison of SeeKeR with GPT2 of vari- ous sizes, measured on Common Crawl (valid set). x3 means using three separate models (for 3x the num- ber of parameters). Training a single model to perform search, knowledge and response performs similarly to separate models, and provides better performance on the Gold Docs as the models increase in size.

Limitations and Future Work

  • Conversational Flow: While knowledgeable, the model sometimes recites facts rather than engaging in natural discourse (the "Wikipedia-copying" feel).
  • Ignoring the Partner: The model can occasionally become "fixated" on a search result and ignore the user's attempt to change the subject.
  • Search Engine Dependency: The system relies on an external, black-box search engine. The authors suggest that moving toward vector-encoded queries (like FAISS-based systems) might be more powerful, though less interpretable.
  • Multi-tasking Friction: Training a single model to excel at both dialogue and general language modeling simultaneously resulted in a slight performance drop compared to specialized versions, indicating a need for better multi-tasking strategies.
Figure 2: Cherry picked example of a SeeKeR model chatting with a human crowdworker, with the conversation starting in the upper left. White boxes on the left are the user messages, while we show model search queries in red boxes, generated knowledge in green boxes, and dialogue responses in blue boxes. Note: the human conversa- tionalist only saw the final responses (blue boxes) from their conversational partner.

Summary updated

BibTeX
@inproceedings{shuster2022language,
  author = {Kurt Shuster and Mojtaba Komeili and Leonard Adolphs and Stephen Roller and Arthur Szlam and Jason Weston},
  title = {{Language Models that Seek for Knowledge: Modular Search \& Generation for Dialogue and Prompt Completion}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2022},
  doi = {10.18653/v1/2022.findings-emnlp.27},
}
Figure