KBLaM: Knowledge Base augmented Language Model

Xi Wang, Liana Mikaelyan, Taketomo Isazawa, James Hensman
2/12/2026

No official code found. Best implementation: microsoft/KBLaM (1,450 stars, MIT, last commit 2026-04-20).

Abstract

In this paper, we propose Knowledge Base augmented Language Model (KBLaM), a new method for augmenting Large Language Models (LLMs) with external knowledge. KBLaM works with a knowledge base (KB) constructed from a corpus of documents, transforming each piece of knowledge in the KB into continuous key-value vector pairs via pre-trained sentence encoders with linear adapters and integrating them into pre-trained LLMs via a specialized rectangular attention mechanism. Unlike Retrieval-Augmented Generation, KBLaM eliminates external retrieval modules, and unlike in-context learning, its computational overhead scales linearly with KB size rather than quadratically. Our approach enables integrating a large KB of more than 10K triples into an 8B pre-trained LLM of only 8K context window on one single A100 80GB GPU and allows for dynamic updates without model fine-tuning or retraining. Experiments demonstrate KBLaM's effectiveness in various tasks, including question-answering and open-ended reasoning, while providing interpretable insights into its use of the augmented knowledge. Code and datasets are available at https://github.com/microsoft/KBLaM/

View on arXivView PDF

Code Implementations(1)

microsoft/KBLaMCommunity100%
MIT

Official Implementation of "KBLaM: Knowledge Base augmented Language Model"

1,450121Python, MakefileAug 1, 20246 months agoMIT

Similar Papers

Cite this paper

@article{wang2026kblam,
  title  = {KBLaM: Knowledge Base augmented Language Model},
  author = {Xi Wang and Liana Mikaelyan and Taketomo Isazawa and James Hensman},
  year   = {2026},
  eprint = {2410.10450},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2410.10450},
  journal = {ICLR 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2410.10450.svg)](https://codeofpaper.com/paper/2410.10450)

Discussion