Augmenting Large Language Models via Vector Embeddings to Improve Domain-specific Responsiveness.

Journal: Journal of visualized experiments : JoVE
Published Date:

Abstract

Large language models (LLMs) have emerged as a popular resource for generating information relevant to a user query. Such models are created through a resource-intensive training process utilizing an extensive, static corpus of textual data. This static nature results in limitations for adoption in domains with rapidly changing knowledge, proprietary information, and sensitive data. In this work, methods are outlined for augmenting general-purpose LLMs, known as foundation models, with domain-specific information using an embeddings-based approach for incorporating up-to-date, peer-reviewed scientific manuscripts. This is achieved through open-source tools such as Llama-Index and publicly available models such as Llama-2 to maximize transparency, user privacy and control, and replicability. While scientific manuscripts are used as an example use case, this approach can be extended to any text data source. Additionally, methods for evaluating model performance following this enhancement are discussed. These methods enable the rapid development of LLM systems for highly specialized domains regardless of the comprehensiveness of information in the training corpus.

Authors

  • Nathan M Wolfrath
    Department of Surgery, Division of Surgical Oncology, Medical College of Wisconsin; Inception Health Labs, Medical College of Wisconsin.
  • Nathaniel B Verhagen
    Department of Surgery, Division of Surgical Oncology, Medical College of Wisconsin.
  • Bradley H Crotty
    Inception Health Labs, Medical College of Wisconsin.
  • Melek Somai
    b Neuro-Epidemiology and Ageing Research Unit, School of Public Health, Imperial College London , London , UK.
  • Anai N Kothari
    Department of Surgery, Division of Surgical Oncology, Medical College of Wisconsin, Milwaukee, Wisconsin, USA.