## 1 Introduction  
With the rapid development of artificial intelligence technology, large language models (LLMs) have gradually become a research hotspot in the field of natural language processing (NLP). With their excellent abilities in understanding and their reasoning capabilities, LLMs have shown great application potential in many fields, such as text generation, machine translations, and intelligent question-answering [1]. When using an LLM, users are faced with problems such as information extraction from large-scale data, the low efficiency of professional information capture, inconsistent responses with facts, etc. Improving the services of LLMs to increase their efficiency and accuracy has become a severe challenge [2, 3]. Therefore, determining how to improve the efficiency and response quality of LLMs is an important direction of research in NLP and artificial intelligence. Data on this topic would provide more interpretable answers and save time during the performance of this task.  
Currently, intelligent Q&A systems based on LLMs have been successfully applied in fields such as science [4], medicine [5], and finance [6]. While LLMs perform well with simple questions, they often struggle with more complex, domain-specific queries, leading to responses that can be inaccurate or even harmful. This phenomenon is referred to as hallucinations within LLMs or generative AI [7], which provide erroneous information and mislead end users. As LLMs become more widely adopted, especially in sensitive domains, it is highly likely that their deployment will pose potential ethical implications and risks. These situations must be considered to remove or attenuate the hallucination problem of LLMs. [PERSON] et al. proposed an LLM training method that introduced factually enhanced training objectives to improve the factual accuracy of model-generated texts [8]. [PERSON] et al. proposed the chain verification (CoVe) method, which first provides an initial answer, verifies the initial answer by employing logical and systematic verification processes to avoid other influences, and finally generates a verified answer [9].  
This study addressed the problem of hallucinations and the lack of interpretability in domain-specific LLMs by proposing the BM-RAGAM (BM25 retrieval-augmented generation attention mechanism), a novel retrieval-enhanced generation approach. The BM-RAGAM applies a hybrid joint retrieval strategy that assigns weights to mid-term results obtained from different search methods using attention mechanisms, combining keyword matching and semantic association to focus on highly relevant information in the text-generation process. The proposed method could significantly improve the quality and relevance of responses in specialized domains. The main contributions of this research are as follows:  
1. The development of a vectorized knowledge management framework: Taking mesoscale oceanographic features (e.g., fronts and eddies) as an example, this framework was used to construct a vectorized knowledge base to support efficient querying and management. By integrating the base with foundational LLMs, this enabled the generation of more interpretable, domain-specific answers.
2. The proposal of the BM-RAGAM hybrid retrieval scheme: After obtaining query instructions, the system retrieves information through hybrid keyword matching and a semantic association at the same time and relies on attention mechanisms to assign different weights to the mid-term search results. This ensures that the generation model is more focused on the search results with a higher relevance, so as to improve the quality of the answer.