Abstract
Large language models (LLMs) are increasingly adopted for knowledge-intensive tasks and contexts. Existing approaches improve the knowledge capabilities of general-purpose LLMs through retrieval or generated knowledge prompting, but they fall short of reflecting two key properties of knowledge-rich models: knowledge should be modular, ever-growing, sourced from diverse domains; knowledge acquisition and production should be a collaborative process, where diverse stakeholders contribute new information. To this end, we propose CooK, a novel framework to empower general-purpose large language models with modular and collaboratively sourced knowledge. We first introduce specialized language models, autoregressive models trained on corpora from a wide range of domains and sources. These specialized LMs serve as parametric knowledge repositories that are later prompted to generate background knowledge for general-purpose LLMs. We then propose three knowledge filters to dynamically select and retain information in generated documents by controlling for relevance, brevity, and factuality. Finally, we propose bottom-up and top-down knowledge integration approaches to augment general-purpose LLMs with the curated (relevant, factual) knowledge from community-driven specialized LMs that enable multi-domain knowledge synthesis and on-demand knowledge requests. Through extensive experiments, we demonstrate that CooK achieves state-of-the-art performance on six benchmark datasets. Our results highlight the potential of enriching general-purpose LLMs with evolving and modular knowledge -- relevant knowledge that can be continuously updated through the collective efforts of the research community.
Introduction
Large Language Models (LLMs) like GPT-4 or Llama face significant challenges due to their static nature. Once training is complete, these models are "frozen" in time, leading to three major issues: hallucinations when specific data is missing, poor performance on "long-tail" or niche knowledge, and temporal obsolescence regarding events occurring after the training cutoff.
The CooK framework (also known as KNOWLEDGE CARD) addresses these issues by treating knowledge as modular and collaborative. It allows for the "plug-and-play" integration of specialized, small language models into a large, general-purpose LLM, enabling the system to stay current and factually accurate without the prohibitive costs of full model retraining.
Methodology
The CooK framework consists of three primary components designed to bridge knowledge gaps effectively:
- Knowledge Cards: These are specialized, smaller LMs (e.g., OPT-1.3B) trained on specific domains such as biomedical literature, news, or legal documents. They serve as parametric repositories that generate relevant background information on demand.
- Knowledge Selectors: To ensure quality, three filters process the generated information:
- Relevance Selector: Filters documents based on their semantic relationship to the user's query.
- Pruning Selector: Summarizes content to fit within the LLM's context window.
- Factuality Selector: A dual-check mechanism that verifies internal consistency and external factual support.
- Integration Strategies:
- Bottom-Up: Prompts all available cards simultaneously, filtering and synthesizing the best information for the LLM. This is ideal for complex, multi-domain queries.
- Top-Down: The LLM autonomously determines if it needs more information and selects the most appropriate specialized card to consult, mimicking human research behavior.
Experimental Evaluation
The framework was tested across several benchmarks, including MMLU (multitask knowledge), LUN (misinformation detection), and a newly curated MidtermQA dataset. MidtermQA specifically targets the 2022 U.S. midterm elections to test the model's ability to incorporate information released after the typical 2021 training cutoff of major LLMs.
Key Results
- Performance Gains: On MMLU, CooK improved Codex's performance by 6.6%, outperforming larger models like Flan-PaLM.
- Misinformation Detection: In multi-domain settings, the framework outperformed baselines by over 15.8% in balanced accuracy.
- Temporal Updates: On MidtermQA, CooK achieved a 55.6% improvement in exact match scores compared to baselines, demonstrating the power of updating a 175B parameter model with a single 1.3B parameter "card."
Discussion and Insights
Ablation studies highlight the critical role of the selector components. Specifically, the Factuality Selector was identified as the most vital for maintaining performance, as even specialized models are prone to hallucinations. Removing this component leads to the most significant drop in accuracy across benchmarks.
The research suggests that modularity is more efficient than building monolithic models. Adding a small specialized card is significantly more cost-effective than retraining a massive LLM. Furthermore, the "Top-Down" approach indicates that LLMs possess a nascent ability to recognize their own knowledge boundaries and proactively seek external information.
Limitations
While effective, Knowledge Cards can still suffer from typical LM issues like topic drift. Additionally, the Factuality Selector currently performs best in domains with extensive existing documentation, making it less robust for entirely new, emerging knowledge where ground truth is not yet established.
Conclusion
CooK demonstrates that a collaborative, modular approach to knowledge integration can significantly enhance the capabilities of general-purpose LLMs. By leveraging community-driven specialized models, LLMs can remain accurate, specialized, and up-to-date without the need for continuous, large-scale retraining.
Summary updated