Skip to main content
QUICK REVIEW

[Paper Review] ChatDB: Augmenting LLMs with Databases as Their Symbolic Memory

Chenxu Hu, Jie Fu|arXiv (Cornell University)|Jun 6, 2023
Topic ModelingComputer Science13 citations
TL;DR

ChatDB uses a relational database as external symbolic memory for LLMs, employing a chain-of-memory to perform multi-hop reasoning via SQL, and significantly outperforms ChatGPT on a synthetic fruit shop dataset.

ABSTRACT

Large language models (LLMs) with memory are computationally universal. However, mainstream LLMs are not taking full advantage of memory, and the designs are heavily influenced by biological brains. Due to their approximate nature and proneness to the accumulation of errors, conventional neural memory mechanisms cannot support LLMs to simulate complex reasoning. In this paper, we seek inspiration from modern computer architectures to augment LLMs with symbolic memory for complex multi-hop reasoning. Such a symbolic memory framework is instantiated as an LLM and a set of SQL databases, where the LLM generates SQL instructions to manipulate the SQL databases. We validate the effectiveness of the proposed memory framework on a synthetic dataset requiring complex reasoning. The project website is available at https://chatdatabase.github.io/ .

Motivation & Objective

  • Motivate memory-augmented LLMs to leverage structured symbolic memory for precise historical data manipulation.
  • Propose a framework where an LLM controller issues SQL operations to an external database to store and query history.
  • Introduce chain-of-memory to decompose complex reasoning into memory operation steps.
  • Demonstrate improved multi-hop reasoning and reduced error accumulation on a synthetic dataset.

Proposed method

  • Framework consisting of an LLM controller and a MySQL-based external symbolic memory (database).
  • Generation of intermediate memory operation steps (SQL) by the LLM to manipulate the memory.
  • Execution of SQL operations on the database with results feeding back to the model.
  • Chain-of-memory: iterative updating of memory operations based on intermediate results, followed by a final response summary.
  • Use of in-context exemplars and chain-of-thought prompting to strengthen the memory manipulation process.
  • Evaluation on a synthetic Fruit Shop Dataset with a 50-question benchmark comparing ChatDB to ChatGPT.

Experimental results

Research questions

  • RQ1Does introducing an external symbolic memory via a database improve LLM multi-hop reasoning?
  • RQ2How does symbolic memory enable precise data operations (insert/update/delete/select) compared to neural memory?
  • RQ3Can chain-of-memory decomposition reduce error accumulation in long-horizon reasoning tasks?
  • RQ4How does ChatDB perform versus a strong baseline on easy vs. hard questions demanding memory and calculation?

Key findings

  • ChatDB substantially outperforms the baseline ChatGPT on the Fruit Shop dataset (All: 41/50 vs. 11/50; accuracy 82% vs. 22%).
  • ChatDB handles hard multi-hop questions with much higher accuracy (Hard: 28/35) than ChatGPT (1/35).
  • Memory operations are performed symbolically via SQL, enabling precise data manipulation (insert/update/delete/select).
  • Chain-of-memory decomposes tasks into intermediate steps, improving reasoning stability and reducing error accumulation.
  • The approach preserves interpretability and state tracking through structured database memory and timestamped operations.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.