Next Article in Journal
Comparative Evaluation of Two Dynamic Navigation Systems vs. Freehand Approach and Different Operator Skills in Endodontic Microsurgery: A Cadaver Study
Previous Article in Journal
Site and Formation Selection for CO2 Geological Sequestration: Research Progress and Case Analyses
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Training a Team of Language Models as Options to Build an SQL-Based Memory

1
College of Informatics, Korea University, Seoul 02841, Republic of Korea
2
School of Electrical Engineering, Korea University, Seoul 02841, Republic of Korea
3
Department of Electrical and Computer Engineering, Catholic University of America, Washington, DC 20064, USA
*
Author to whom correspondence should be addressed.
Appl. Sci. 2025, 15(21), 11399; https://doi.org/10.3390/app152111399
Submission received: 19 September 2025 / Revised: 18 October 2025 / Accepted: 22 October 2025 / Published: 24 October 2025
(This article belongs to the Topic Challenges and Solutions in Large Language Models)

Abstract

Despite the rapid progress in the capabilities of large language models, they still lack a reliable and efficient method of storing and retrieving new information conveyed over the course of their interaction with users upon deployment. In this paper, we use reinforcement learning methods to train a team of smaller language models, which we frame as options, on reward-respecting subtasks, to learn to use SQL commands to store and retrieve relevant information to and from an external SQL database. In particular, we train a storage language model on a subtask for distinguishing between user and assistant in the dialogue history, to learn to store any relevant facts that may be required to answer future user queries. We then train a retrieval language model on a subtask for querying a sufficient number of fields, to learn to retrieve information from the SQL database that could be useful in answering the current user query. We find that training our models on their respective subtasks results in much higher performance than training them to directly optimize the reward signal and that the resulting team of language models is able to achieve performance on memory tasks comparable to existing methods that rely on language models orders of magnitude larger in size. In particular, we were able to able to achieve a 36% gain in accuracy over a prompt engineering baseline and a 13% gain over a strong baseline that uses the much larger GPT-3.5 Turbo on the MSC-Self-Instruct dataset.
Keywords: language models; options; memory; SQL language models; options; memory; SQL

Share and Cite

MDPI and ACS Style

Lee, S.; Ko, H. Training a Team of Language Models as Options to Build an SQL-Based Memory. Appl. Sci. 2025, 15, 11399. https://doi.org/10.3390/app152111399

AMA Style

Lee S, Ko H. Training a Team of Language Models as Options to Build an SQL-Based Memory. Applied Sciences. 2025; 15(21):11399. https://doi.org/10.3390/app152111399

Chicago/Turabian Style

Lee, Seokhan, and Hanseok Ko. 2025. "Training a Team of Language Models as Options to Build an SQL-Based Memory" Applied Sciences 15, no. 21: 11399. https://doi.org/10.3390/app152111399

APA Style

Lee, S., & Ko, H. (2025). Training a Team of Language Models as Options to Build an SQL-Based Memory. Applied Sciences, 15(21), 11399. https://doi.org/10.3390/app152111399

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop