Tibetan medicine bilingual inquiry-oriented term anchoring retrieval enhanced generation method and system
Patent Information
- Application Number
- CN202611246314.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-17
- Publication Date
- 2026-10-27
AI Technical Summary
[0007]为了解决现有技术中的上述技术问题,即实现适配藏医双语场景的完整可信问答的问题,本申请实施例提供了一种面向藏医双语问诊的术语锚定检索增强生成方法及系统
[0038]构建了结构化、可溯源的藏医双语知识底座,通过对藏医文献及藏汉双语资料的解析与结构化处理,形成包含藏汉平行语料、双语问答数据、藏医专业术语及对应来源证据的一体化知识资源,解决了藏医文献数字化质量不足、专业语料稀缺、数据场景适配性弱的问题,可为模型训练、知识检索与文献溯源提供统一的数据支撑;
Smart Images

Figure CN122986001A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a terminology anchoring retrieval enhancement generation method and system for bilingual Tibetan medicine consultation. Background Technology
[0002] Current large-scale medical models are mainly based on modern medical systems and high-resource languages, with insufficient coverage of Tibetan medicine and other low-resource ethnic medicines. Core concepts in Tibetan medicine such as "Lung," "Tripa," and "Peigen" have independent theoretical connotations. General models are prone to problems such as misunderstanding of terminology, conceptual confusion, and cross-language semantic drift. Moreover, the generated content often lacks documentary evidence, posing risks such as overdiagnosis and inappropriate health advice, and failing to meet the professionalism and safety requirements of Tibetan medicine health consultation.
[0003] In terms of the digitization of Tibetan medical literature, a large amount of Tibetan medical knowledge is still preserved in unstructured forms such as scanned documents and images of ancient books, which have problems such as page noise, character degradation, and complex layout. At the same time, high-quality annotated data and Tibetan-Chinese parallel corpora are scarce in the field of Tibetan medicine, and general translation models are prone to mistranslation of terms and inconsistent translations. Existing digitization results are also difficult to support model training, knowledge retrieval, and literature evidence tracing at the same time.
[0004] Search-enhanced generation techniques can improve the credibility of question-and-answer sessions by leveraging external knowledge bases. However, existing solutions often use fixed-length paragraphs or text blocks as retrieval units, focusing only on overall semantic similarity and lacking fine-grained constraints on specialized terminology. In Tibetan medicine question-and-answer scenarios, situations often arise where the overall search paragraphs are relevant but the core terms do not match. Furthermore, it is impossible to establish a precise mapping between specific terms and their definitions and sources in the answers, resulting in insufficient interpretability and traceability of the question-and-answer results.
[0005] Multi-agent collaborative reasoning technology can realize modular division of labor in question-answering tasks, but existing medical multi-agent systems are mostly designed for modern medicine and high-resource languages, and have not adapted to Tibetan medicine bilingual consultation, Tibetan-Chinese terminology alignment, ancient book evidence retrieval and other capabilities; there is a lack of unified professional knowledge anchors among the agents, which can easily lead to information inconsistencies, and a complete control chain from input risk identification and evidence constraint to output security verification has not been formed, resulting in insufficient risk prevention and control capabilities.
[0006] In summary, existing technologies have not yet formed a complete and reliable question-answering technology adapted to the bilingual scenario of Tibetan medicine, and cannot simultaneously meet the requirements of professionalism, bilingual adaptability, traceability and security. Summary of the Invention
[0007] To address the aforementioned technical problems in the prior art, namely, to achieve complete and reliable question-and-answer functionality adapted to Tibetan medicine bilingual scenarios, this application provides a terminology anchoring retrieval enhancement generation method and system for Tibetan medicine bilingual consultation.
[0008] In a first aspect of this application, a terminology anchoring retrieval enhancement generation method for bilingual Tibetan medicine consultation is provided, the method comprising:
[0009] A bilingual knowledge base for Tibetan medicine is constructed, which includes structured text data of Tibetan and Tibetan medicine, parallel corpus data of Tibetan and Chinese Tibetan medicine, question and answer data of Chinese Tibetan medicine, question and answer data of Tibetan and Tibetan medicine, and a database of Tibetan medicine professional terms.
[0010] Receive user input and current dialogue state, and generate a structured consultation state based on the user input and current dialogue state. The consultation state includes user question, language type, intent category and symptom elements.
[0011] Based on the Tibetan medicine terminology database, candidate Tibetan medicine terms in the user's question are identified, and candidate term entries corresponding to the candidate Tibetan medicine terms in the Tibetan medicine terminology database are obtained.
[0012] For each candidate Tibetan medicine term, a corresponding term anchor point is constructed based on the corresponding candidate term entry. The terminology anchor points corresponding to each candidate Tibetan medicine professional term ,in, Indicates Tibetan terminology, This refers to Chinese terminology. This indicates the definition of the term. This refers to synonyms or alternative names for the Tibetan medical terms mentioned above. This indicates the source data corresponding to the Tibetan medicine professional terms mentioned above;
[0013] Based on the user question and the terminology anchor, multiple candidate pieces of evidence are retrieved from the Tibetan Medicine bilingual knowledge base, and a comprehensive score is calculated for each candidate piece of evidence. , The vector representation of candidate evidence, based on the aforementioned comprehensive score. Each candidate piece of evidence is sorted in descending order, and the top N candidate pieces of evidence are retained to form the target evidence set, where N is a preset value.
[0014] The user's question, the consultation status, the terminology anchors, and the target evidence set are input into the question-answering language model to generate a consultation answer.
[0015] Optionally, the construction of the bilingual knowledge base for Tibetan medicine includes:
[0016] The multimodal Tibetan language and Tibetan medicine literature is subjected to structured parsing to generate structured text data of Tibetan language and Tibetan medicine.
[0017] Structured parsing was performed on Tibetan-Chinese bilingual medical literature to generate parallel Tibetan-Chinese corpus data of Tibetan medicine. Based on the parallel Tibetan-Chinese corpus data of Tibetan medicine, the first language model was trained to obtain a translation model in the field of Tibetan medicine.
[0018] The multimodal Chinese-Tibetan medicine literature is subjected to structured parsing to generate structured Chinese-Tibetan medicine text data. A second language model is used to generate Chinese-Tibetan medicine question-and-answer data based on the structured Chinese-Tibetan medicine text data. The Tibetan medicine domain translation model is used to translate the Chinese-Tibetan medicine question-and-answer data to generate Tibetan-Tibetan medicine question-and-answer data.
[0019] Tibetan medical terminology is extracted from the Tibetan-language structured text data, the Tibetan-Chinese parallel corpus data, the Chinese-Tibetan medical question-and-answer data, and the Tibetan-language question-and-answer data. A corresponding terminology entry is created for each Tibetan medical term, and a Tibetan medical terminology database is constructed. The Tibetan-language structured text data, the Tibetan-Chinese parallel corpus data, the Chinese-Tibetan medical question-and-answer data, the Tibetan-language question-and-answer data, and the Tibetan medical terminology database constitute the bilingual knowledge base of Tibetan medicine.
[0020] Optionally, the overall score ,in, Let be the vector representation of the candidate evidence. The vector representation of the user's question. Cosine similarity, representing and Semantic relevance between them , Indicates candidate evidence for the current term set The degree of coverage, , This indicates the number of terms that the candidate evidence matches at present. Represents the current set of terms The total number of terms in the text , This indicates the preset reliability weight corresponding to the source type of the candidate evidence. The first preset weighting coefficient, This is the second preset weighting coefficient. The third preset weighting coefficient, and .
[0021] Optionally, based on the user question and the terminology anchor, multiple candidate pieces of evidence are retrieved from the Tibetan medicine bilingual knowledge base, including:
[0022] Vector semantic retrieval is performed in Tibetan-language Tibetan medicine structured text data, Tibetan-Chinese Tibetan medicine parallel corpus data, Chinese Tibetan medicine question-and-answer data, and Tibetan-language Tibetan medicine question-and-answer data based on the vector representation of the user question; keyword retrieval is performed in Tibetan-language Tibetan medicine structured text data, Tibetan-Chinese Tibetan medicine parallel corpus data, Chinese Tibetan medicine question-and-answer data, and Tibetan-language Tibetan medicine question-and-answer data based on the keywords in the user question; and retrieval is performed in the Tibetan medicine professional terminology database based on the terminology anchor points, thereby obtaining the multiple candidate pieces of evidence.
[0023] Optionally, the terminology anchoring retrieval enhancement generation method for bilingual Tibetan medicine consultations further includes, after generating the consultation answer:
[0024] Identify Tibetan medicine professional terms in the consultation response, associate the Tibetan medicine professional terms in the consultation response with the corresponding Tibetan term names, Chinese term names, term definitions and sources in the Tibetan medicine professional term database, and output the corresponding Tibetan term names, Chinese term names, term definitions and sources.
[0025] Optionally, the terminology anchoring retrieval enhancement generation method for bilingual Tibetan medicine consultation further includes:
[0026] The consultation response is validated using rule templates, evidence consistency checks, and a lightweight discriminant model. If the validation passes, the consultation response is output; if the validation fails, the consultation response is regenerated and / or a security warning is issued.
[0027] Optionally, generating a structured consultation state based on the user question and the current dialogue state includes: using a preset prompt template to identify the user question in the user input, identifying the language type and consultation intent of the user input and the current dialogue state, extracting symptom elements from the user input and the current dialogue state, and determining the intent category based on the consultation intent; and generating a structured consultation state based on the user question, the language type, the intent category, and the symptom elements.
[0028] Optionally, the terminology anchoring retrieval enhancement generation method for bilingual Tibetan medicine consultations further includes, before identifying candidate Tibetan medicine terms in the user's question based on the Tibetan medicine terminology database: using preset risk rules and a preset lightweight discriminant model to perform a risk check on the consultation status; if the consultation status contains symptoms of acute or critical illness, dangerous medication requests, requests for treatment outside the scope of authority, or questions exceeding preset capabilities, then the consultation status is determined to be high-risk, the process of the terminology anchoring retrieval enhancement generation method for bilingual Tibetan medicine consultations is terminated, and a safety prompt is issued; otherwise, the consultation status is determined to be safe, and the process of the terminology anchoring retrieval enhancement generation method for bilingual Tibetan medicine consultations is executed.
[0029] In a second aspect of this application, a terminology anchoring retrieval enhancement generation system for bilingual Tibetan medicine consultation is provided, comprising:
[0030] The Tibetan Medicine Bilingual Knowledge Base Construction Unit is used to construct a Tibetan Medicine bilingual knowledge base, which includes Tibetan-language Tibetan medicine structured text data, Tibetan-Chinese Tibetan medicine parallel corpus data, Chinese-Tibetan medicine question and answer data, Tibetan-language Tibetan medicine question and answer data, and a Tibetan medicine professional terminology database.
[0031] The diagnostic understanding agent is used to receive user input and the current dialogue state, and generate a structured diagnostic state based on the user input and the current dialogue state. The diagnostic state includes user questions, language type, intent category and symptom elements.
[0032] A terminology anchoring agent is used to identify candidate Tibetan medicine terms in the user's question based on the Tibetan medicine terminology database, and to obtain candidate term entries in the Tibetan medicine terminology database corresponding to the candidate Tibetan medicine terms; and to construct a corresponding terminology anchor point for each candidate Tibetan medicine term based on the corresponding candidate term entry. The terminology anchor points corresponding to each candidate Tibetan medicine professional term ,in, Indicates Tibetan terminology, This refers to Chinese terminology. This indicates the definition of the term. This refers to synonyms or alternative names for the Tibetan medical terms mentioned above. This indicates the source data corresponding to the Tibetan medicine professional terms mentioned above;
[0033] An evidence retrieval agent is used to retrieve multiple candidate pieces of evidence from the Tibetan medicine bilingual knowledge base based on the user question and the terminology anchor, and to calculate a comprehensive score for each candidate piece of evidence. , The vector representation of candidate evidence, based on the aforementioned comprehensive score. Each candidate piece of evidence is sorted in descending order, and the top N candidate pieces of evidence are retained to form the target evidence set, where N is a preset value.
[0034] The Tibetan medicine knowledge interpretation intelligent agent is used to input the user's question, the consultation status, the terminology anchors, and the target evidence set into the question-answering language model to generate a consultation answer.
[0035] Optionally, the terminology anchoring retrieval enhancement generation system for bilingual Tibetan medicine consultations further includes:
[0036] The security verification agent is used to perform security verification on the consultation answer using rule templates, evidence consistency checks, and a lightweight discriminant model. If the verification passes, the consultation answer is output; if the verification fails, the consultation answer is regenerated and / or a security prompt is issued.
[0037] The terminology anchoring retrieval enhancement generation scheme for bilingual Tibetan medicine consultation provided in this application has the following beneficial effects:
[0038] A structured and traceable bilingual knowledge base for Tibetan medicine has been constructed. Through the analysis and structured processing of Tibetan medical literature and Tibetan-Chinese bilingual materials, an integrated knowledge resource has been formed, which includes Tibetan-Chinese parallel corpus, bilingual question and answer data, Tibetan medical professional terminology and corresponding source evidence. This solves the problems of insufficient digital quality of Tibetan medical literature, scarcity of professional corpus, and weak data scenario adaptability. It can provide unified data support for model training, knowledge retrieval and literature tracing.
[0039] This paper proposes a fine-grained retrieval mechanism based on terminology anchoring, which significantly improves retrieval matching accuracy and terminology consistency. Using Tibetan medicine professional terms as a unified knowledge anchor, it normalizes different translations of terms and Tibetan-Chinese expressions. It can also integrate semantic relevance, terminology coverage and source reliability in retrieval ranking, reducing the problem of overall paragraph relevance but core terminology mismatch in traditional RAG (Retrieval-Augmented Generation) schemes, reducing the probability of cross-language semantic drift and professional concept confusion, and improving the professional accuracy of question and answer content.
[0040] It improves the interpretability and traceability of question-and-answer results. While outputting natural language answers, it can simultaneously provide the Tibetan-Chinese bilingual names, definitions, and original literature sources of professional terms, achieving an improvement in accuracy from paragraph-level source tracing to term-level source tracing, making it easier for users to verify the basis of the answers and understand professional concepts.
[0041] By identifying risks such as dangerous medication use, and intercepting or rewriting out-of-bounds medical treatments and unsafe medication use, the risks in medical consultation scenarios can be reduced, ensuring the compliance and safety of Tibetan medicine health consultations.
[0042] In summary, the terminology anchoring retrieval enhancement generation scheme for bilingual Tibetan medicine consultation provided in this application provides reliable technical support for various scenarios such as bilingual Tibetan medicine knowledge query, professional terminology explanation, health science popularization consultation, literature tracing and verification, and assisted consultation, which helps to promote the digital inheritance of Tibetan medicine knowledge and the implementation of intelligent services. Attached Figure Description
[0043] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0044] Figure 1 This is a flowchart illustrating the terminology anchoring retrieval enhancement generation method for bilingual Tibetan medicine consultation provided in an embodiment of this application. Detailed Implementation
[0045] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0046] The following will describe in detail, with reference to the accompanying drawings, a terminology anchoring retrieval enhancement generation method for bilingual Tibetan medicine consultation according to an embodiment of this application. The terminology anchoring retrieval enhancement generation method for bilingual Tibetan medicine consultation according to the first embodiment of this application, as follows... Figure 1 As shown, it includes:
[0047] Step S101: Construct a bilingual Tibetan medicine knowledge base, which includes Tibetan-language structured text data, Tibetan-Chinese parallel corpus data, Chinese-Tibetan medical question-and-answer data, Tibetan-language medical question-and-answer data, and a Tibetan medicine professional terminology database.
[0048] Step S102: Receive user input and current dialogue state, and generate a structured consultation state based on the user input and the current dialogue state. The consultation state includes user question, language type, intent category and symptom elements.
[0049] Step S103: Based on the Tibetan medicine terminology database, identify candidate Tibetan medicine terms in the user's question, and obtain candidate term entries in the Tibetan medicine terminology database that correspond to the candidate Tibetan medicine terms.
[0050] Step S104: For each candidate Tibetan medicine term, construct a corresponding term anchor point based on the corresponding candidate term entry. The terminology anchor points corresponding to each candidate Tibetan medicine professional term ,in, Indicates Tibetan terminology, This refers to Chinese terminology. This indicates the definition of the term. This refers to synonyms or alternative names for the Tibetan medical terms mentioned above. This indicates the source data corresponding to the Tibetan medicine professional terms mentioned above;
[0051] Step S105: Based on the user question and the terminology anchor, retrieve multiple candidate evidences from the Tibetan Medicine bilingual knowledge base, and calculate the comprehensive score for each candidate evidence. , The vector representation of candidate evidence, based on the aforementioned comprehensive score. Each candidate piece of evidence is sorted in descending order, and the top N candidate pieces of evidence are retained to form the target evidence set, where N is a preset value.
[0052] Step S106: Input the user question, the consultation status, the terminology anchors, and the target evidence set into the question-answering language model to generate a consultation answer.
[0053] Specifically, step S101 includes:
[0054] Step S1011 involves performing structured parsing on the multimodal Tibetan-language and Tibetan medicine literature to generate structured text data. Specifically, typical Tibetan-language and Tibetan medicine literature, such as ancient Tibetan medical books, theoretical works on Tibetan medicine, and popular science materials on Tibetan medicine, can be collected from Tibetan medicine research institutions, digital libraries, and open-source resources with open licenses. The scanned files, images, video screenshots, and other multimodal original documents of the Tibetan-language and Tibetan medicine literature can be converted into editable, searchable, and structured text data. For example, during document parsing, a dual OCR engine, DotsOCR and CrossLing-OCR-Mini, can be used for collaborative recognition. First, the document page is cropped, layout regions are detected, and text blocks are located. Then, the two OCR models are used to recognize the page content. Subsequently, the recognition results obtained by the two OCR engines for the same text block are subjected to Unicode normalization, whitespace removal, punctuation standardization, and Tibetan phonetic node boundary normalization. The normalized character-level similarity is calculated. When the character-level similarity is higher than a preset threshold, the two recognition results are considered consistent, and the recognized text with higher confidence is automatically retained. When the character-level similarity is lower than the preset threshold, or when the recognition result has layout misalignment, missing characters, repeated text, or disordered line order, the corresponding text block is submitted for manual review and correction. For text blocks with high consistency, the higher-quality recognition result is retained; for text blocks with missing characters, layout misalignment, repeated text, or disordered line order, they are submitted to personnel with Tibetan language and Tibetan medicine knowledge for manual review and correction. After processing, a structured Tibetan text can be obtained, and information such as document name, source, page number, and page position can be retained, providing a foundation for subsequent question-and-answer data construction, document tracing, and evidence presentation.
[0055] Step S1012 involves performing structured parsing on Tibetan-Chinese bilingual medical literature to generate parallel Tibetan-Chinese corpus data on Tibetan medicine. Based on this parallel Tibetan-Chinese corpus data, the first language model is trained to obtain a translation model for the Tibetan medicine field. Specifically, the Tibetan-Chinese bilingual parallel corpus data mainly comes from Tibetan medical literature and translations with Tibetan-Chinese correspondences. First, based on the book's table of contents, chapter titles, and document structure, document-level alignment of Tibetan literature and its corresponding Chinese translation is performed. Then, combining title matching, paragraph length, chapter order, and the overlap of preset keywords, it is determined whether the paragraph titles (Tibetan literature paragraphs and their corresponding Chinese translation paragraphs, referred to as Tibetan paragraphs and Chinese paragraphs) correspond, whether the paragraph lengths meet preset constraints, whether the paragraph order within the chapters is consistent, and whether the paragraph keywords overlap. If all conditions are met, the paragraph pairs (Tibetan paragraphs and their corresponding Chinese paragraphs forming a paragraph pair) are selected as candidate Tibetan-Chinese paragraph pairs; otherwise, paragraph pairs that do not meet the conditions are deleted or submitted for manual review, thus completing the paragraph-level alignment of the document-level alignment results. Finally, the paragraph-level aligned data can be... Both Tibetan and Chinese paragraphs are input into DeepSeek-V3. DeepSeek-V3 matches and arranges sentences in the paragraphs based on the semantic correspondence between Tibetan and Chinese sentences, outputting candidate Tibetan-Chinese sentence pairs. The system then performs semantic consistency, length anomaly, and alignment quality checks on these candidate pairs, retaining those that meet preset conditions. This achieves sentence-level alignment of the paragraph-level Tibetan-Chinese bilingual text and quality filtering of the candidate Tibetan-Chinese sentence pairs output by DeepSeek-V3. When the semantic content of the Tibetan and Chinese sentences does not correspond, the sentence length relationship does not meet the preset length constraint, or the alignment quality output by DeepSeek-V3 is lower than the preset conditions, the corresponding sentence pair is deleted. The remaining sentence pairs are used as sentence-level Tibetan-Chinese-Tibetan medicine parallel corpus data. For example, the sentence-level Tibetan-Chinese-Tibetan medicine parallel corpus data can include approximately 150,000 Tibetan-Chinese sentence-level translation data. For example, the first major language model can be the Tibetan-LLaMA-2 model. Based on the Tibetan-Chinese parallel corpus data on Tibetan medicine (sentence level), the Tibetan-LLaMA-2 model is trained to obtain a translation model for the Tibetan medicine domain. In one possible implementation, during training and translation, the text to be translated and its corresponding text-level Tibetan original can be input into the Tibetan medicine domain translation model. This allows the model to reference the professional terminology and semantic background in the original Tibetan text, thereby improving the accuracy of Tibetan medicine terminology translation and reducing semantic biases generated during cross-language conversion.
[0056] Step S1013 involves performing structured parsing on the multimodal Chinese-Tibetan medicine literature to generate structured Chinese-Tibetan medicine text data, using a second language model to generate Chinese-Tibetan medicine question-and-answer data based on the structured Chinese-Tibetan medicine text data, and using the Tibetan medicine domain translation model to translate the Chinese-Tibetan medicine question-and-answer data to generate Tibetan-Tibetan medicine question-and-answer data. Specifically, the process begins by performing optical character recognition (OCR) and structuring on translated Tibetan medicine books, popular science articles on Tibetan medicine, and related materials (including images and video screenshots) to form chapter-level candidate texts. The second major language model can be the Qwen3 model. Taking the chapter-level candidate texts (i.e., chapter-level Tibetan medicine Chinese texts), along with document titles, chapter content, and related terminology, as input, the Qwen3 model generates questions and answers around Tibetan medicine knowledge points using preset prompt templates. The generated answers are required to have direct or indirect evidence from the original text (the input chapter-level candidate texts), avoiding deviations from the original text. Several candidate question-answer pairs are generated for each chapter-level candidate text, resulting in candidate question-answer data. Finally, the generated candidate question-answer data undergoes manual sampling inspection. The process involves rule-based filtering, which may include domain keyword matching, answer source consistency checks, question intent matching, duplicate sample removal, abnormal length filtering, and evidence missing filtering. These rule-based filtering methods can refer to existing technologies and will not be elaborated upon here. The goal is to remove candidate question-and-answer data that lacks domain relevance, fails to rigorously address the question, has insufficient evidence support, contains duplicate questions and answers, has abnormal length, inaccurate terminology explanations, or exhibits obvious signs of arbitrary generation, thus obtaining Chinese-Tibetan medicine question-and-answer data. Then, the aforementioned Tibetan medicine domain translation model is used to translate the Chinese-Tibetan medicine question-and-answer data into Tibetan-language Tibetan medicine question-and-answer data. During the translation process, the corresponding text-level Tibetan original can be input simultaneously as a contextual reference, making the Tibetan medicine domain translation model closer to the original Tibetan medicine literature in terms of terminology, word order, and semantic expression, reducing the risk of mistranslation of Tibetan medicine terminology and cross-language semantic shift. Finally, Chinese-Tibetan medicine question-and-answer data and Tibetan-language Tibetan medicine question-and-answer data are formed. These question-and-answer data can be used for fine-tuning of large language model instructions and retrieval enhancement generation.
[0057] Step S1014 involves extracting Tibetan medical terminology from the Tibetan-language structured text data, the Tibetan-Chinese parallel corpus data, the Chinese-Tibetan medical question-and-answer data, and the Tibetan-language question-and-answer data, and establishing corresponding term entries for each term to construct a Tibetan medical terminology database. Specifically, high-frequency Tibetan medical terminology can be extracted from the Tibetan-language structured text data, the Tibetan-Chinese parallel corpus data, the Chinese-Tibetan medical question-and-answer data, and the Tibetan-language question-and-answer data. This extraction can refer to existing word extraction techniques, so it will not be elaborated further. The extracted Tibetan medical terminology (which can be called candidate terms) and its original context are input into GPT (Generative Physics Platform). A pre-trained Transformer (GPT) large language model is used to generate initial candidate definitions for Tibetan medicine terms. These initial candidate definitions serve as supplementary content for terminology organization and are not directly used as the final term explanations. Then, using the candidate terms as search keywords, text retrieval, and semantic retrieval are performed on the Tibetan-language Tibetan medicine structured text data, the Tibetan-Chinese Tibetan medicine parallel corpus data, the Chinese-Tibetan medicine question-and-answer data, and the Tibetan-language Tibetan medicine question-and-answer data to recall the original literature context fragments that rank in the top n (e.g., the top 10) in relevance to the candidate terms. The initial candidate definitions are then corrected based on the recalled original literature context fragments, and those with original text support are further refined. Initial candidate definitions (which can retrieve context fragments from the original literature) are retained. Initial candidate definitions that lack original text support, are inconsistent, or are incomplete are replaced or corrected to obtain term definitions. These term definitions are then linked to the source documents, page numbers, text locations, source types, and original evidence fragments of Tibetan medicine terminology. Finally, professionals with Tibetan medicine knowledge review the extracted Tibetan medicine terminology results, term definitions, and related information. For Tibetan medicine terminology that is difficult to fully explain in Tibetan medicine books, reliable open knowledge sources can be used to supplement the initial candidate definitions. For terms that still cannot be supported by reliable data, personnel with Tibetan medicine knowledge can write and review them. Ultimately, Tibetan medicine terminology, its corresponding term definitions, and related information can be obtained. Since the same Tibetan medical term often has different Tibetan spellings, Chinese translations, transliterations, abbreviations, or synonyms, a corresponding term entry is created for each Tibetan medical term. The term entry includes the term definition, and may also include information such as the Tibetan term name, Chinese term name, synonyms (or alternative names), term category, source document, source chapter, source page number, original evidence fragments, and source type. This establishes a correspondence between the Tibetan expression, the Chinese expression, the term definition, the synonyms, and the source evidence. The Tibetan medical terminology database is composed of Tibetan medical terms and their corresponding term entries.In this way, each Tibetan medicine term can have a bilingual Tibetan-Chinese name, standard definition, and source basis. The Tibetan medicine terminology database is used for terminology lookup and as a fine-grained knowledge unit in the subsequent terminology anchoring and evidence retrieval process.
[0058] The structured text data of Tibetan medicine in Tibetan language, the parallel corpus data of Tibetan and Chinese medicine, the question-and-answer data of Tibetan medicine in Chinese language, the question-and-answer data of Tibetan medicine in Tibetan language, and the Tibetan medicine professional terminology database constitute the bilingual knowledge base of Tibetan medicine.
[0059] In one possible implementation, the terminology anchoring retrieval enhancement generation method for Tibetan medicine bilingual consultation may further include quality control of the Tibetan medicine bilingual knowledge base, including OCR engine verification, manual review, document alignment, rule filtering, and expert review. In the final confirmation stage, professionals with Tibetan medicine knowledge can review a portion of the samples in the Tibetan medicine bilingual knowledge base, focusing on question-and-answer relevance, evidence support, translation consistency, terminology accuracy, and security. To prevent data leakage, the data in the Tibetan medicine bilingual knowledge base can be divided according to document source, ensuring that data generated from the same document or chapter does not simultaneously enter the training and test sets, and the translation data and question-and-answer data are divided in an 8:2 ratio. This ultimately forms a comprehensive knowledge base covering ancient Tibetan medicine texts, Tibetan-Chinese translations, bilingual question-and-answer, and professional terminology explanations, providing support for model training, evidence retrieval, and credible question-and-answer.
[0060] Specifically, in step S102, after receiving user input and the current dialogue state, a preset prompt template can be used to perform question recognition, language recognition, consultation intent recognition, and symptom element extraction on the user input and the current dialogue state. Specifically, the user input and the current dialogue state can be filled into the preset consultation understanding prompt template and input into a pre-trained consultation understanding large language model (e.g., GPT). The consultation understanding large language model identifies the language type based on Chinese characters, Tibetan characters, and combinations thereof; determines the intent category based on the main purpose expressed by the user input; extracts the information explicitly expressed by the user from the user input and the current dialogue state according to the preset symptom element fields in the prompt template; completes the standardized mapping of synonymous symptoms and Tibetan-Chinese terms through a symptom thesaurus and a Tibetan medicine professional terminology database; and finally outputs the symptom element recognition results in a preset JSON format. The intent categories can include terminology explanations, symptom consultations, disease or syndrome knowledge consultations, etiology and pathogenesis consultations, drug or prescription knowledge consultations, dietary and lifestyle care consultations, multiple rounds of follow-up questions or information supplementation, and requests that are non-medical or beyond the system's capabilities. Symptom elements can include chief complaint, symptom name, body part, duration, frequency, severity, development process, accompanying symptoms, triggering factors, aggravating factors, relieving factors, medication history, and allergy history. The large language model for patient consultation can avoid inferring information not explicitly expressed by the user and instead record it as missing information.
[0061] The intent category is obtained based on the consultation intent, which in turn yields the user question, language type, intent category, and symptom elements. The user question, language type, intent category, and symptom elements constitute the structured consultation state.
[0062] In one possible implementation, after generating the consultation status and before step S103, the terminology anchoring retrieval enhancement generation method for Tibetan medicine bilingual consultation further includes: performing a risk check on the consultation status using preset risk rules and a preset lightweight discriminant model. If the consultation status contains acute and critical symptoms (which can be obtained based on symptom elements, such as chest pain, difficulty breathing, cold sweats, etc.), or dangerous medication requests, requests for treatment outside the scope of authority, or questions exceeding the preset capability range (which can be obtained based on the user's questions and consultation intent), then the consultation status is determined to be high-risk, the method process is terminated, the response generation is not initiated, and a safety prompt is issued; otherwise, the consultation status is determined to be safe, and the method process is executed. In one possible implementation, after performing a risk check on the consultation status, the risk check result (high-risk or safe) can also be added to the consultation status as a safe check status.
[0063] Specifically, in step S103, a preset terminology dictionary matching tool, synonym normalization tool, and fuzzy search tool can be used to identify candidate Tibetan medicine professional terms from user questions using methods such as exact matching, synonym matching, fuzzy matching, and Tibetan-Chinese cross-language matching. Candidate term entries corresponding to the candidate Tibetan medicine professional terms in the Tibetan medicine professional terminology database can then be obtained. This allows for the acquisition of the Tibetan name, Chinese name, terminology definition, synonym expression, and source evidence corresponding to the candidate Tibetan medicine professional terms.
[0064] Specifically, in step S104, a corresponding term anchor point is constructed for each candidate Tibetan medicine term based on the corresponding candidate term entry. For the first The terminology anchor points corresponding to the candidate Tibetan medicine professional terms ,in, Indicates Tibetan terminology, This refers to Chinese terminology. This indicates the definition of the term. This refers to synonyms or alternative names for the Tibetan medical terms mentioned above. This indicates the source data corresponding to the Tibetan medicine professional terms. This represents an ordered tuple. The aforementioned terminology anchors can unify the association between Tibetan medical terminology and its Tibetan-Chinese bilingual expressions, terminology definitions, and original documentary evidence (sources). They can be used not only for terminology queries but also as fine-grained evidence units in the process of enhancing retrieval.
[0065] Specifically, in step S105, vector semantic retrieval, keyword retrieval, and terminology database retrieval can be employed. Specifically, vector semantic retrieval is performed based on the vector representation of the user question in Tibetan-language Tibetan medicine structured text data, Tibetan-Chinese Tibetan medicine parallel corpus data, Chinese Tibetan medicine question-and-answer data, and Tibetan-language Tibetan medicine question-and-answer data to recall candidate evidence (e.g., knowledge fragments) related to the overall semantics of the user question; and keyword retrieval is performed based on keywords in the user question in the same Tibetan-language Tibetan medicine structured text data, Tibetan-Chinese Tibetan medicine parallel corpus data, Chinese Tibetan medicine question-and-answer data, and Tibetan-language Tibetan medicine question-and-answer data to recall candidate evidence (e.g., text fragments) containing symptom words or professional concepts. Keywords may include key symptoms, key concepts, and Tibetan medicine professional terms in the user question; and a search is performed in the Tibetan medicine professional terminology database based on the terminology anchor points to obtain terminology definitions and source evidence, thereby obtaining the multiple candidate pieces of evidence. For example, BGE-large-zh-v1.5 (an open-source Chinese general text embedding model) can be used to vectorize the user question.
[0066] Specifically, in step S105, a comprehensive score is calculated for each candidate piece of evidence. , ,in, Let be the vector representation of the candidate evidence. The vector representation of the user's question. Cosine similarity, representing and The higher the cosine similarity, the closer the candidate evidence is to the semantics of the user's question. , This represents the dot product of two vectors. and Let L2 and L2 represent the two vectors respectively. Term coverage represents the coverage of candidate evidence for the current term set. The coverage level can be compared with the number of Tibetan medicine professional terms hit by candidate evidence and the current term set. The terminology coverage is obtained by normalizing the ratio of the total number of Chinese terms to a value between 0 and 1. The more Tibetan medical terms covered, the higher the terminology coverage. , This indicates the number of terms that the candidate evidence matches at present. Represents the current set of terms The total number of terms in the text , This indicates the preset reliability weight corresponding to the source type of the candidate evidence. For example, the source types include original Tibetan medicine books, expert-reviewed content, and open-source materials. The initial reliability weight for original Tibetan medicine books can be set to the highest (e.g., 3), the initial reliability weight for expert-reviewed content can be the next highest (e.g., 2), and the initial reliability weight for open-source materials can be set to the lowest (e.g., 1). Then, the initial reliability weights of each source type are normalized to obtain the reliability weights for each source type. For example, after normalization, the reliability weight for original Tibetan medicine books is 0.5, the reliability weight for expert-reviewed content is 1 / 3, and the reliability weight for open-source materials is 1 / 6. The first preset weighting coefficient, This is the second preset weighting coefficient. The third preset weighting coefficient, and Among them, the current term set First, fuzzy matching can be performed based on a terminology dictionary and thesaurus to identify candidate Tibetan medicine terms from user questions. Then, each candidate Tibetan medicine term (different spellings, alternative names, and Tibetan-Chinese expressions) is linked to a standard term entry in the Tibetan medicine terminology database. Finally, duplicate standard term entries are removed, and the Tibetan medicine terms corresponding to the deduplicated standard term entries constitute the current terminology set. The overall score for each candidate piece of evidence is calculated. back, The vector representation of candidate evidence, based on the overall score. The candidate evidence is sorted from highest to lowest order, and then the top N candidate evidence pieces are retained. This prioritizes evidence that is semantically relevant to the user's question, covers a wide range of Tibetan medicine terminology, and has reliable sources. These N candidate evidence pieces constitute the target evidence set, where N is a preset value, for example, N = 6. By adding terminology coverage and source reliability to semantic relevance, the problem of overall relevance but mismatched key terms in ordinary paragraph-level searches can be reduced.
[0067] Specifically, in step S106, the user question, the consultation status, the terminology anchors, and the target evidence set are input into a question-answering large language model (e.g., a finely trained medical-specific model). Based on a preset answer prompt template, a consultation answer is generated. This answer may include knowledge-based responses, explanations of Tibetan medicine terminology, general health advice, and necessary medical reminders, while avoiding absolute diagnoses or prescription suggestions. During the generation process, if multiple rounds of dialogue exceed a preset length, the consultation status can be summarized and compressed to improve the continuity of interaction and reasoning efficiency of the large language model. The addition of terminology anchors in the consultation answer generation refines the paragraph-level evidence associations of traditional RAGs to the terminology level, helping to improve the comprehensibility, credibility, and verifiability of the Tibetan medicine bilingual question-answering results.
[0068] In one possible implementation, after generating the consultation answer, the terminology anchoring retrieval enhancement generation method for bilingual Tibetan medicine consultation may further include: re-identifying Tibetan medicine professional terms in the consultation answer, associating the Tibetan medicine professional terms in the consultation answer with the corresponding Tibetan term names, Chinese term names, term definitions, and sources in the Tibetan medicine professional terminology database, and outputting the corresponding Tibetan term names, Chinese term names, term definitions, and sources, allowing users to view the meaning of the terms and trace the basis of the answer. In another possible implementation, after generating the consultation answer, the terminology anchoring retrieval enhancement generation method for bilingual Tibetan medicine consultation may further include: using a preset rule template and a preset lightweight discriminant model, as well as evidence consistency checks, to perform security verification on the consultation answer, to check for issues such as medical assertion support, overdiagnosis, dangerous medication recommendations, evidence inconsistency, and lack of risk warnings. If the verification passes, the consultation answer is output; if the verification fails, the consultation answer is regenerated and / or a security warning is issued according to a security warning template. This can achieve a credible question-and-answer closed loop combining backend evidence constraints and frontend terminology explanations.
[0069] A second aspect of this application, corresponding to the terminology anchoring retrieval enhancement generation method for bilingual Tibetan medicine consultation provided in the embodiments of this application, provides a terminology anchoring retrieval enhancement generation system for bilingual Tibetan medicine consultation. The terminology anchoring retrieval enhancement generation system for bilingual Tibetan medicine consultation according to the second embodiment of this application includes:
[0070] The Tibetan Medicine Bilingual Knowledge Base Construction Unit is used to construct a Tibetan Medicine bilingual knowledge base, which includes Tibetan-language Tibetan medicine structured text data, Tibetan-Chinese Tibetan medicine parallel corpus data, Chinese-Tibetan medicine question and answer data, Tibetan-language Tibetan medicine question and answer data, and a Tibetan medicine professional terminology database.
[0071] The diagnostic understanding agent is used to receive user input and the current dialogue state, and generate a structured diagnostic state based on the user input and the current dialogue state. The diagnostic state includes user questions, language type, intent category and symptom elements.
[0072] A terminology anchoring agent is used to identify candidate Tibetan medicine terms in the user's question based on the Tibetan medicine terminology database, and to obtain candidate term entries in the Tibetan medicine terminology database corresponding to the candidate Tibetan medicine terms; and to construct a corresponding terminology anchor point for each candidate Tibetan medicine term based on the corresponding candidate term entry. The terminology anchor points corresponding to each candidate Tibetan medicine professional term ,in, Indicates Tibetan terminology, This refers to Chinese terminology. This indicates the definition of the term. This refers to synonyms or alternative names for the Tibetan medical terms mentioned above. This indicates the source data corresponding to the Tibetan medicine professional terms mentioned above;
[0073] An evidence retrieval agent is used to retrieve multiple candidate pieces of evidence from the Tibetan medicine bilingual knowledge base based on the user question and the terminology anchor, and to calculate a comprehensive score for each candidate piece of evidence. , The vector representation of candidate evidence, based on the aforementioned comprehensive score. Each candidate piece of evidence is sorted in descending order, and the top N candidate pieces of evidence are retained to form the target evidence set, where N is a preset value.
[0074] The Tibetan medicine knowledge interpretation intelligent agent is used to input the user's question, the consultation status, the terminology anchors, and the target evidence set into the question-answering language model to generate a consultation answer.
[0075] Specifically, each agent can consist of a dedicated prompt template, a toolset, and a shared state. The shared state stores user questions, language type, intent category, symptom elements, terminology anchors, retrieval evidence, generated diagnostic answers, and security check status. In one possible implementation, the system can use a scheduler to determine the next agent to be invoked based on the current state, preventing all agents from entering a fixed process.
[0076] Specifically, the Tibetan medicine bilingual knowledge base construction unit is used for:
[0077] The multimodal Tibetan language and Tibetan medicine literature is subjected to structured parsing to generate structured text data of Tibetan language and Tibetan medicine.
[0078] Structured parsing was performed on Tibetan-Chinese bilingual medical literature to generate parallel Tibetan-Chinese corpus data of Tibetan medicine. Based on the parallel Tibetan-Chinese corpus data of Tibetan medicine, the first language model was trained to obtain a translation model in the field of Tibetan medicine.
[0079] The multimodal Chinese-Tibetan medicine literature is subjected to structured parsing to generate structured Chinese-Tibetan medicine text data. A second language model is used to generate Chinese-Tibetan medicine question-and-answer data based on the structured Chinese-Tibetan medicine text data. The Tibetan medicine domain translation model is used to translate the Chinese-Tibetan medicine question-and-answer data to generate Tibetan-Tibetan medicine question-and-answer data.
[0080] Tibetan medical terminology is extracted from the Tibetan-language structured text data, the Tibetan-Chinese parallel corpus data, the Chinese-Tibetan medical question-and-answer data, and the Tibetan-language question-and-answer data. A corresponding terminology entry is created for each Tibetan medical term, and a Tibetan medical terminology database is constructed. The Tibetan-language structured text data, the Tibetan-Chinese parallel corpus data, the Chinese-Tibetan medical question-and-answer data, the Tibetan-language question-and-answer data, and the Tibetan medical terminology database constitute the bilingual knowledge base of Tibetan medicine.
[0081] Specifically, the consultation understanding agent is used to: identify user questions in the user input using a preset prompt template; identify the language type and consultation intent of the user input and the current dialogue state; extract symptom elements from the user input and the current dialogue state; and determine the intent category based on the consultation intent; and generate a structured consultation state based on the user questions, the language type, the intent category, and the symptom elements. In one possible implementation, the terminology anchoring retrieval enhancement generation system for Tibetan medicine bilingual consultation further includes a risk check module. The risk check module is used to: perform a risk check on the consultation state using preset risk rules and a preset lightweight discriminant model after generating the consultation state and before the terminology anchoring agent runs; if the consultation state contains symptoms of acute or critical illness, dangerous medication requests, requests for treatment outside the scope of the treatment, or questions exceeding a preset capability range, then the consultation state is determined to be high-risk, the execution of subsequent agents of the consultation understanding agent is terminated, and a safety prompt is given; otherwise, the consultation state is determined to be safe, and subsequent agents are executed.
[0082] Specifically, the terminology anchoring agent can use preset terminology dictionary matching tools, synonym normalization tools, and fuzzy search tools to identify candidate Tibetan medicine professional terms from user questions using methods such as exact matching, synonym matching, fuzzy matching, and Tibetan-Chinese cross-language matching, and obtain candidate term entries in the Tibetan medicine professional terminology database that correspond to the candidate Tibetan medicine professional terms.
[0083] Specifically, the evidence retrieval agent can retrieve candidate evidence from the Tibetan medicine bilingual knowledge base using vector semantic retrieval, keyword retrieval, and terminology database retrieval. The overall score for each candidate piece of evidence... ,in, Let be the vector representation of the candidate evidence. The vector representation of the user's question. Cosine similarity, representing and Semantic relevance between them , Indicates candidate evidence for the current term set The degree of coverage, , This indicates the number of terms that the candidate evidence matches at present. Represents the current set of terms The total number of terms in the text , This indicates the preset reliability weight corresponding to the source type of the candidate evidence. , and For the preset weighting coefficients, and The evidence retrieval agent is ranked according to a comprehensive score. The candidate evidence is sorted in descending order, and the top N candidate evidences are retained to form the target evidence set, where N is a preset value.
[0084] Specifically, the Tibetan medicine knowledge interpretation intelligent agent takes the user's question, the consultation status, the terminology anchors, and the target evidence set as common inputs. Through a question-and-answer large language model and preset answer prompt templates, it generates a consultation answer. The consultation answer can include knowledge-based answers, explanations of Tibetan medicine terminology, general health advice, and necessary medical reminders, while avoiding absolute diagnoses or prescription suggestions. In one possible implementation, after generating the consultation answer, the Tibetan medicine knowledge interpretation intelligent agent is further used to: re-identify the Tibetan medicine terminology in the consultation answer, associate the Tibetan medicine terminology in the consultation answer with the corresponding Tibetan terminology name, Chinese terminology name, terminology definition, and source in the Tibetan medicine terminology database, and output the corresponding Tibetan terminology name, Chinese terminology name, terminology definition, and source.
[0085] In one possible implementation, the terminology anchoring retrieval enhancement generation system for bilingual Tibetan medicine consultations may further include a security verification agent. This agent uses rule templates, evidence consistency checks, and a lightweight discriminant model to perform security verification on the consultation response. If the verification passes, the consultation response is output; if it fails, the consultation response is regenerated and / or a security warning is issued. In another possible implementation, the security verification agent may be merged with the aforementioned risk checking module, implementing the functions of the risk checking module. Thus, the security verification agent can perform both pre-emptive governance (risk checking) and post-emptive verification. Pre-emptive governance may further include input format checks and privacy information anonymization.
[0086] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process and related descriptions of the system described above can be referred to the corresponding processes in the foregoing method embodiments, and therefore will not be repeated here.
[0087] It should be noted that the terminology anchoring retrieval enhancement generation system for bilingual Tibetan medicine consultation provided in the above embodiments is only an example of the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the modules or steps in the embodiments of this application can be further decomposed or combined. For example, the modules in the above embodiments can be merged into one module, or further divided into multiple sub-modules to complete all or part of the functions described above. The names of the modules and steps involved in the embodiments of this application are only for distinguishing the various modules or steps and are not considered as an improper limitation of this application.
[0088] The terminology-anchored retrieval enhancement method and system for bilingual Tibetan medicine consultation provided in this application constructs a structured and traceable bilingual Tibetan medicine knowledge foundation. Through parsing and processing Tibetan medicine literature and bilingual materials, it forms an integrated knowledge resource encompassing Tibetan-Chinese parallel corpora, bilingual question-and-answer data, professional terminology, and source evidence. This addresses the problems of insufficient digitization quality and scarcity of professional corpora, providing unified data support for model training, knowledge retrieval, and literature tracing. A fine-grained terminology-anchored retrieval mechanism is proposed, using Tibetan medicine professional terminology as a unified knowledge anchor point, normalizing different translations and Tibetan-Chinese expressions, and integrating semantic relevance, terminology coverage, and other factors into the retrieval ranking. This approach leverages three dimensions of source reliability to address the issue of mismatched core terms in traditional RAG (Rapid Information Group) texts, reducing the risk of cross-language semantic drift and conceptual confusion, and enhancing the professional accuracy of question-and-answer sessions. It strengthens the interpretability and traceability of the results, simultaneously displaying the Tibetan and Chinese names, definitions, and original literature sources of professional terms when outputting answers, achieving a precision improvement from paragraph-level to terminology-level tracing, facilitating user verification of evidence and understanding of professional concepts. Furthermore, it possesses end-to-end risk management capabilities, identifying dangerous medication risks, intercepting or rewriting content related to out-of-bounds diagnosis and unsafe medication use, reducing medical consultation risks, and ensuring the compliance and safety of Tibetan medicine health consultations. In summary, the solution provided in this application provides reliable technical support for scenarios such as Tibetan medicine bilingual knowledge query, terminology explanation, health education, literature tracing, and assisted consultation.
[0089] Those skilled in the art will recognize that the modules and method steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. The programs corresponding to the software modules and method steps can be placed in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, or any other form of storage medium known in the art. To clearly illustrate the interchangeability of electronic hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in electronic hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0090] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of devices, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0091] The terms “first”, “second”, etc., are used to distinguish similar objects, not to describe or indicate a specific order or sequence.
[0092] The term "comprising" or any other similar term is intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus / device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent in such process, method, article, or apparatus / device.
[0093] All of the above-mentioned optional technical solutions can be combined in any way to form the optional embodiments of this application, and will not be described in detail here.
[0094] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A terminology anchoring retrieval enhancement generation method for bilingual Tibetan medicine consultation, characterized in that, A bilingual knowledge base for Tibetan medicine is constructed, which includes structured text data of Tibetan and Tibetan medicine, parallel corpus data of Tibetan and Chinese Tibetan medicine, question and answer data of Chinese Tibetan medicine, question and answer data of Tibetan and Tibetan medicine, and a database of Tibetan medicine professional terms. Receive user input and current dialogue state, and generate a structured consultation state based on the user input and current dialogue state. The consultation state includes user question, language type, intent category and symptom elements. Based on the Tibetan medicine terminology database, candidate Tibetan medicine terms in the user's question are identified, and candidate term entries corresponding to the candidate Tibetan medicine terms in the Tibetan medicine terminology database are obtained. For each candidate Tibetan medicine term, a corresponding term anchor point is constructed based on the corresponding candidate term entry. The terminology anchor points corresponding to each candidate Tibetan medicine professional term ,in, Indicates Tibetan terminology, This refers to Chinese terminology. This indicates the definition of the term. This refers to synonyms or alternative names for the Tibetan medical terms mentioned above. This indicates the source data corresponding to the Tibetan medicine professional terms. Represents an ordered tuple; Based on the user question and the terminology anchor, multiple candidate pieces of evidence are retrieved from the Tibetan Medicine bilingual knowledge base, and a comprehensive score is calculated for each candidate piece of evidence. , The vector representation of candidate evidence, based on the aforementioned comprehensive score. Each candidate piece of evidence is sorted in descending order, and the top N candidate pieces of evidence are retained to form the target evidence set, where N is a preset value. The user's question, the consultation status, the terminology anchors, and the target evidence set are input into the question-answering language model to generate a consultation answer.
2. The terminology anchoring retrieval enhancement generation method for bilingual Tibetan medicine consultation according to claim 1, characterized in that, The construction of a bilingual knowledge base for Tibetan medicine includes: The multimodal Tibetan language and Tibetan medicine literature is subjected to structured parsing to generate structured text data of Tibetan language and Tibetan medicine. Structured parsing was performed on Tibetan-Chinese bilingual medical literature to generate parallel Tibetan-Chinese corpus data of Tibetan medicine. Based on the parallel Tibetan-Chinese corpus data of Tibetan medicine, the first language model was trained to obtain a translation model in the field of Tibetan medicine. The multimodal Chinese-Tibetan medicine literature is subjected to structured parsing to generate structured Chinese-Tibetan medicine text data. A second language model is used to generate Chinese-Tibetan medicine question-and-answer data based on the structured Chinese-Tibetan medicine text data. The Tibetan medicine domain translation model is used to translate the Chinese-Tibetan medicine question-and-answer data to generate Tibetan-Tibetan medicine question-and-answer data. Tibetan medical terminology is extracted from the Tibetan-language structured text data, the Tibetan-Chinese parallel corpus data, the Chinese-Tibetan medical question-and-answer data, and the Tibetan-language question-and-answer data. A corresponding terminology entry is created for each Tibetan medical term, and a Tibetan medical terminology database is constructed. The Tibetan-language structured text data, the Tibetan-Chinese parallel corpus data, the Chinese-Tibetan medical question-and-answer data, the Tibetan-language question-and-answer data, and the Tibetan medical terminology database constitute the bilingual knowledge base of Tibetan medicine.
3. The terminology anchoring retrieval enhancement generation method for bilingual Tibetan medicine consultation according to claim 1, characterized in that, The overall score ,in, Let be the vector representation of the candidate evidence. The vector representation of the user's question. Cosine similarity, representing and Semantic relevance between them , Indicates candidate evidence for the current term set The degree of coverage, , This indicates the number of terms that the candidate evidence matches at present. Represents the current set of terms The total number of terms in the text , This indicates the preset reliability weight corresponding to the source type of the candidate evidence. The first preset weighting coefficient, This is the second preset weighting coefficient. The third preset weighting coefficient, and .
4. The terminology anchoring retrieval enhancement generation method for bilingual Tibetan medicine consultation according to claim 3, characterized in that, Based on the user question and the terminology anchor, multiple candidate pieces of evidence are retrieved from the Tibetan medicine bilingual knowledge base, including: Vector semantic retrieval is performed in Tibetan-language Tibetan medicine structured text data, Tibetan-Chinese Tibetan medicine parallel corpus data, Chinese Tibetan medicine question-and-answer data, and Tibetan-language Tibetan medicine question-and-answer data based on the vector representation of the user question; keyword retrieval is performed in Tibetan-language Tibetan medicine structured text data, Tibetan-Chinese Tibetan medicine parallel corpus data, Chinese Tibetan medicine question-and-answer data, and Tibetan-language Tibetan medicine question-and-answer data based on the keywords in the user question; and retrieval is performed in the Tibetan medicine professional terminology database based on the terminology anchor points, thereby obtaining the multiple candidate pieces of evidence.
5. The terminology anchoring retrieval enhancement generation method for bilingual Tibetan medicine consultation according to claim 1, characterized in that, After generating the consultation answer, it also includes: Identify Tibetan medicine professional terms in the consultation response, associate the Tibetan medicine professional terms in the consultation response with the corresponding Tibetan term names, Chinese term names, term definitions and sources in the Tibetan medicine professional term database, and output the corresponding Tibetan term names, Chinese term names, term definitions and sources.
6. The terminology anchoring retrieval enhancement generation method for bilingual Tibetan medicine consultation according to claim 1 or 5, characterized in that, Also includes: The consultation response is validated using rule templates, evidence consistency checks, and a lightweight discriminant model. If the validation passes, the consultation response is output; if the validation fails, the consultation response is regenerated and / or a security warning is issued.
7. The terminology anchoring retrieval enhancement generation method for bilingual Tibetan medicine consultation according to claim 1, characterized in that, The step of generating a structured consultation state based on the user question and the current dialogue state includes: using a preset prompt template to identify the user question in the user input, identifying the language type and consultation intent of the user input and the current dialogue state, extracting symptom elements from the user input and the current dialogue state, and determining the intent category based on the consultation intent; and generating a structured consultation state based on the user question, the language type, the intent category, and the symptom elements.
8. The terminology anchoring retrieval enhancement generation method for bilingual Tibetan medicine consultation according to claim 7, characterized in that, Before identifying candidate Tibetan medicine terms in the user's question based on the Tibetan medicine terminology database, the process further includes: using preset risk rules and a preset lightweight discriminant model to perform a risk check on the consultation status. If the consultation status contains symptoms of acute or critical illness, requests for dangerous medication, requests for treatment outside the scope of the consultation, or questions exceeding the preset capability range, the consultation status is determined to be high-risk, the process of the terminology anchoring retrieval enhancement generation method for Tibetan medicine bilingual consultation is terminated, and a safety prompt is issued; otherwise, the consultation status is determined to be safe, and the process of the terminology anchoring retrieval enhancement generation method for Tibetan medicine bilingual consultation is executed.
9. A terminology anchoring retrieval enhancement generation system for bilingual Tibetan medicine consultation, characterized in that, include: The Tibetan Medicine Bilingual Knowledge Base Construction Unit is used to construct a Tibetan Medicine bilingual knowledge base, which includes Tibetan-language Tibetan medicine structured text data, Tibetan-Chinese Tibetan medicine parallel corpus data, Chinese-Tibetan medicine question and answer data, Tibetan-language Tibetan medicine question and answer data, and a Tibetan medicine professional terminology database. The diagnostic understanding agent is used to receive user input and the current dialogue state, and generate a structured diagnostic state based on the user input and the current dialogue state. The diagnostic state includes user questions, language type, intent category and symptom elements. A terminology anchoring agent is used to identify candidate Tibetan medicine terms in the user's question based on the Tibetan medicine terminology database, and to obtain candidate term entries in the Tibetan medicine terminology database corresponding to the candidate Tibetan medicine terms; and to construct a corresponding terminology anchor point for each candidate Tibetan medicine term based on the corresponding candidate term entry. The terminology anchor points corresponding to each candidate Tibetan medicine professional term ,in, Indicates Tibetan terminology, This refers to Chinese terminology. This indicates the definition of the term. This refers to synonyms or alternative names for the Tibetan medical terms mentioned above. This indicates the source data corresponding to the Tibetan medicine professional terms mentioned above; An evidence retrieval agent is used to retrieve multiple candidate pieces of evidence from the Tibetan medicine bilingual knowledge base based on the user question and the terminology anchor, and to calculate a comprehensive score for each candidate piece of evidence. , The vector representation of candidate evidence, based on the aforementioned comprehensive score. Each candidate piece of evidence is sorted in descending order, and the top N candidate pieces of evidence are retained to form the target evidence set, where N is a preset value. The Tibetan medicine knowledge interpretation intelligent agent is used to input the user's question, the consultation status, the terminology anchors, and the target evidence set into the question-answering language model to generate a consultation answer.
10. The terminology anchoring retrieval enhancement generation system for bilingual Tibetan medicine consultation according to claim 9, characterized in that, Also includes: A security verification agent is used to perform security verification on the consultation response using rule templates, evidence consistency checks, and a lightweight discriminant model. If the verification passes, the consultation response is output; if the verification fails, the consultation response is regenerated and / or a security prompt is issued.