Knowledge Space reduction via Sequential Language Model Integration
Dimitrios P. Panagoulias, Maria K. Virvou, George A. Tsihrintzis · Procedia Computer Science · 2024
In Large Language Models (LLMs), such as GPT, BERT, Mistral or others, “reducing the domain space” for text generation involves limiting the range of content that can be utilized for generating responses. This approach aims at enhancing the relevance and precision of the text produced. While various strategies exist to achieve this, this work explores Sequential Language Model Integration (SLMI), which mirrors the organization and distribution of knowledge across different fields of expertise. More specifically, SLMI is the technique of linking multiple LLMs (LLM-Chains) in a systematic manner. In this paper, we refer to a process of choosing, linking and connecting LLMs with other services (often to complete a generative task, invoke external functions and machine learning services, or tackle problems) as “Large Language Models as a Service”. We outline the development and evaluation process of an SLMI methodology to refine response accuracy. Focusing on the medical field, we also establish a framework for knowledge reduction based on “knowledge paths”, analogous to the distinct specializations within medicine. We apply this framework to a dermatology case study and utilize our evaluation pipeline to assess the results. Reducing the knowledge domain from medicine in general down to dermatology, we tested our methodology and found gains regarding accuracy and diagnostic improvement, as well as a reduction in costs regarding total tokens generated.