LLM Enhancer: Merged Approach using Vector Embedding for Reducing Large Language Model Hallucinations with External Knowledge
Naheed Rayhan, Md. Ashrafuzzaman
TL;DR
This work tackles hallucinations in large language models by grounding responses in external knowledge. It introduces LLM-ENHANCER, a parallel, merged-tool architecture that ingests data from multiple web sources, encodes it with vector embeddings, and retrieves relevant chunks to inform open-source LLMs (notably Mistral 7B). The approach demonstrates substantial performance gains over sequential tool use, particularly on recent data, with higher precision and F1-scores on WikiQA and Dataset2023-24. A key contribution is showing how merging external sources via vector embeddings can reduce hallucinations without extensive fine-tuning, using openly available models and tooling to achieve reliable information retrieval and assembly.
Abstract
Large Language Models (LLMs), such as ChatGPT, have demonstrated the capability to generate human like, natural responses across a range of tasks, including task oriented dialogue and question answering. However, their application in real world, critical scenarios is often hindered by a tendency to produce inaccurate information and a limited ability to leverage external knowledge sources. This paper introduces the LLM ENHANCER system, designed to integrate multiple online sources such as Google, Wikipedia, and DuckDuckGo to enhance data accuracy. The LLMs employed within this system are open source. The data acquisition process for the LLM ENHANCER system operates in parallel, utilizing custom agent tools to manage the flow of information. Vector embeddings are used to identify the most pertinent information, which is subsequently supplied to the LLM for user interaction. The LLM ENHANCER system mitigates hallucinations in chat based LLMs while preserving response naturalness and accuracy.
