A method for enhancing the reliability of teaching and Q&A in large-scale models based on knowledge graph validation
Patent Information
- Application Number
- CN202610988415.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-03
- Publication Date
- 2026-09-01
AI Technical Summary
[0003]第一,事实性错误问题
[0027]本发明的有益效果包括。(1)通过将事实正确性校验与教学知识边界约束校验解耦并在评分中加权耦合,在降低大模型事实性错误率的同时,抑制了超纲、跨阶、跨版本等教学场景特有的不一致问题,该效果为现有仅做事实一致性比对的方案所不能取得。(2)通过边界约束函数对学段、课标编码、教材版本三个维度进行量化合规度计算,使答疑内容与具体教学场景对齐,降低人工复核工作量。(3)通过将整体评分分解为事实子评分与边界子评分,并以差异化策略处理两类错误——边界错误经课标层级树锚定搜索做本地替换、仅事实子评分低于阈值时才触发大模型二次生成——显著减少了不必要的大模型推理调用次数,降低了推理开销与响应时延;该评分机制以大模型生成内容的事实单元为评估对象并直接驱动自动纠错,区别于仅对学生作答输出分数的评分方案。(4)通过将结构中心性、难度等级与核心考点耦合的权重函数,使整体可靠性评分对核心知识点的错误更敏感,提升评分对最终错误率的区分度。(5)通过错误模式与人工反馈的闭环回流,使系统在持续使用中不断提升精度。(6)本发明对底层大模型架构无强约束,具有良好的通用性与工程可落地性。
Smart Images

Figure CN122674875A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the intersection of artificial intelligence and educational information technology, specifically to a method for enhancing the reliability of large-scale teaching Q&A based on knowledge graph verification. This method can be applied to intelligent Q&A services in online education platforms, intelligent teaching assistants, smart classrooms, intelligent tutoring systems, and adaptive learning systems. Background Technology
[0002] With the rapid development of Large Language Model (MLM) technology, introducing MLM into teaching and Q&A scenarios has become an important trend in the field of smart education. MLM can provide fluent answers to conceptual and principle-based questions raised by students, but the following technical problems have been exposed in actual teaching applications.
[0003] First, there is the issue of factual errors. Large models rely on statistical patterns in the training corpus to generate content, and may fabricate or confuse factual information such as definitions, theorems, formulas, and constants, resulting in factual errors.
[0004] Second, there is the issue of inconsistent knowledge boundaries. Different grade levels and different textbook versions differ in the scope, depth, and expression of the same knowledge point. Even if the content provided by the large model is objectively correct, it may still cite concepts beyond the scope allowed for the current grade level (out of syllabus) or use expressions inconsistent with the current textbook version (cross-version), thus making it incompatible with the teaching scenario.
[0005] Third, there is a lack of quantifiable reliability assessment. Existing systems typically return large model text directly, lacking mechanisms for tracing the source of specific factual statements in the answers, quantifying confidence, and correcting errors.
[0006] There are three main types of existing improvement methods. The first is Retrieval Enhancement Generation (RAG), which introduces external knowledge as input prompts before generation. However, this is "pre-emptive enhancement" and cannot detect or correct errors in the content already generated by the large model. While knowledge graph-based retrieval enhancement schemes improve retrieval quality by replacing unstructured text fragments with structured relationships, they also remain at the level of "providing a reference beforehand" and do not perform post-output verification. The second is knowledge graph-based fact verification schemes, which extract fact triples from the content generated by the large model and compare them line by line with the knowledge graph, correcting any inconsistencies. However, these schemes only focus on whether the facts are objectively correct, without distinguishing whether the facts fall within the knowledge boundaries allowed by a specific grade level or textbook version. Therefore, they cannot solve the inconsistencies specific to teaching scenarios, such as exceeding syllabus limits, crossing grade levels, or crossing versions. Furthermore, these schemes often use the consistency of triples as a binary judgment, lacking a quantitative reliability assessment method that decouples factual correctness from compliance with teaching boundaries before weighted integration. The third approach is a multi-dimensional weighted scoring scheme based on the content of the answers submitted. This involves assigning weighted scores to student-submitted answers based on dimensions such as knowledge point coverage and text similarity, and then outputting the scoring criteria. The evaluation object of this type of scheme is the student's answers, not the content generated by a large model. Its scoring is only used to provide a score; it does not pinpoint specific erroneous units within the generated content, nor does it drive automatic error correction or regeneration of the generated content, and it also does not involve compliance judgments regarding the boundaries of pedagogical knowledge.
[0007] In summary, there is an urgent need for a method that is geared towards teaching and Q&A scenarios, capable of verifying the factual accuracy of content generated by large models, verifying the compliance of teaching knowledge boundaries, and outputting quantifiable reliability assessments based on these findings, and achieving automatic error correction through differentiated strategies. Summary of the Invention
[0008] To address the aforementioned technical problems, this invention provides a method for enhancing the reliability of large-scale teaching Q&A based on knowledge graph verification. Its core lies in: decomposing the answers generated by the large model into fact units, and simultaneously performing two independent verifications on each fact unit: factual correctness verification and teaching knowledge boundary constraint verification. The boundary constraint function quantifies the boundary compliance of the fact unit relative to the current teaching scenario, and the factual correctness confidence and boundary compliance are weighted and coupled in the reliability score. Simultaneously, the overall score is decomposed into fact sub-scores and boundary sub-scores, thereby applying differentiated error correction strategies to the two types of errors. This reduces the factual error rate, suppresses out-of-syllabus and cross-version inconsistencies, and reduces unnecessary secondary inference calls to the large model.
[0009] To achieve the above objectives, the present invention adopts the following technical solution: A method for enhancing the reliability of large-scale teaching and Q&A based on knowledge graph verification, comprising the following steps.
[0010] Step S1: Construct a multi-layered subject knowledge graph oriented towards teaching scenarios. The knowledge graph uses curriculum standards, authoritative textbooks, and teacher-approved question banks as data sources, and includes entities such as concepts, theorems, formulas, people, and events, as well as their structured relationships; each knowledge node is attached with a grade level label, textbook version label, difficulty level label, and credibility level label, and records the hierarchical curriculum standard code of the node in the curriculum standard.
[0011] Step S2: Receive students' natural language questions, perform intent recognition, subject classification, and knowledge point location to obtain a structured question representation; at the same time, determine the current teaching scenario constraint C=(g0,v0,K0), where g0 is the target grade level, v0 is the target textbook version, and K0 is the curriculum standard code set of the target knowledge points; and retrieve relevant subgraphs in the knowledge graph based on the question representation as reference knowledge context.
[0012] Step S3: Input the reference knowledge context and the prompt words constructed from the original question into the pre-trained large language model to generate preliminary answer text.
[0013] Step S4: Fine-grained fact extraction is performed on the preliminary answer text, distinguishing between declarative facts, inferential conclusions and illustrative examples. Only declarative facts are tripleted to obtain several fact units. Each fact unit (300) is represented as <subject, predicate, object> or <subject, attribute, attribute value>.
[0014] Step S5: Perform two independent checks on each fact unit, with the dual-path check process as follows: Figure 3 As shown.
[0015] (I) Fact correctness verification (301): Entity alignment (311), relation matching (312) and attribute verification (313) are executed in sequence to map the fact unit to the standard node of the knowledge graph and compare its predicate or attribute value to obtain and output the fact correctness confidence ci∈[0,1](314);.
[0016] (ii) Boundary constraint verification (302): The grade segment label, curriculum standard code, and textbook version label of the node ni aligned with the fact unit are compared with the teaching scenario constraint C. Each item is obtained by grade segment comparison (321), curriculum standard code comparison (322), and textbook version comparison (323). The boundary compliance B(fi|C) is calculated according to the boundary constraint function (324). B(fi|C) = α·δ_grade(ni,g0) + β·δ_code(ni,K0) + γ·δ_version(ni,v0)
[0017] In the formula, α, β, and γ are non-negative weights and α+β+γ=1; δ_grade is the grade level compliance item, which is 1 when the grade level L(ni) of the node does not exceed the target grade level L(g0), otherwise it is exp(-λ(L(ni)-L(g0))), where λ is the attenuation coefficient; δ_code is the curriculum standard code reachability item, which is 1 / (1+d), where d is the minimum path distance between the curriculum standard code of node ni and K0 in the curriculum standard hierarchy tree; δ_version is the textbook version consistency item, which is 1 when the textbook version label of ni contains or is compatible with v0, otherwise it is the preset discount value. Since the above sub-items of B only depend on the label of the node aligned to the fact unit, the boundary compliance B(fi|C) is equivalent to the node-level boundary compliance B(ni|C); when calculating the boundary compliance B directly for a certain node in the following text, it has the same meaning as calculating B(fi|C) for the fact unit aligned to that node.
[0018] Step S6: Calculate the overall reliability score of the answer (303). R = Σ[ wi · ci · B(fi|C) ] / Σ wi
[0019] In the formula, wi is the weight of the i-th fact unit, which is determined by the structural centrality Cen(ni), difficulty level Diff(ni), and core test point identifier Core(ni) of the node aligned to the fact unit in the reference subgraph, wi = Cen(ni)^a · Diff(ni)^b · Core(ni), where a and b are adjustable indices, and Core takes an increase of more than 1 for core test points and 1 for non-core test points. At the same time, in the scoring module (303), the overall score is decomposed into fact sub-scores R_fact=Σ(wi·ci) / Σwi and boundary sub-scores R_boundary=Σ(wi·B(fi|C)) / Σwi. In the error judgment (304), fact units whose ci is lower than the fact confidence threshold τc are marked as fact errors (341); fact units whose B(fi|C) is lower than the boundary compliance threshold τB are marked as out-of-syllabus or cross-version errors (342). It should be noted that the fact confidence threshold τc is applied to the confidence ci of a single fact unit to determine whether the unit is a fact error, while the fact score threshold τf, which is described later, is applied to the aggregated fact sub-score R_fact to determine whether to trigger the secondary generation of the large model. The two have different levels of application and are set independently.
[0020] Step S7: Based on the verification results, perform reliability enhancement processing on the preliminary answer using a differentiated strategy: add citation sources to the fact units that pass verification; replace fact units marked as factual errors with the corresponding correct facts in the knowledge graph; for fact units marked as out-of-syllabus or cross-version errors, determine the replacement node that meets constraint C through curriculum standard hierarchical tree anchor search, and perform local replacement with the equivalent expression corresponding to the replacement node without triggering the large model re-inference; only when the fact sub-score R_fact is lower than the fact score threshold τf, the large model secondary generation process is triggered, thereby reducing unnecessary large model inference calls. The secondary generation process re-executes steps S4 to S6 after generating a new answer; when the fact sub-score R_fact reaches the fact score threshold τf, or the cumulative number of secondary generation reaches the preset upper limit N_max, the regeneration is terminated; if the upper limit is reached but the standard is still not met, while outputting the version with the highest current fact sub-score, the overall answer is marked with a "required for review" prompt.
[0021] Step S8: Output the final answer with enhanced reliability, and grade and label each factual statement according to its factual correctness confidence and boundary compliance; and output the overall boundary fit indicator of the answer relative to the current teaching scenario constraint C based on the boundary sub-score R_boundary, so that teachers and students can judge the degree of fit of the answer with the current grade level and textbook version. At the same time, provide a knowledge graph subgraph supporting each factual statement as a traceable basis.
[0022] Step S9: The error patterns, missing knowledge graph information, and manual feedback identified during the verification process are fed back into the knowledge graph construction and large model optimization process to form a closed loop; among them, if the mean value of the boundary sub-score R_boundary obtained from multiple Q&A sessions for the same target knowledge point within a preset statistical period is lower than the set level, it is determined that the knowledge graph coverage of the target knowledge point under the current learning stage or textbook version is insufficient, and it is sorted as a priority object for knowledge graph completion.
[0023] Furthermore, the multi-layered subject knowledge graph described in step S1 adopts a hierarchical architecture, such as... Figure 2 As shown, from top to bottom, it includes the subject top-level ontology layer (10), curriculum standard layer (20), textbook knowledge layer (30), and exercise and typical example layer (40), and the layers are connected by alignment relationship (50).
[0024] Furthermore, in the factual correctness verification of step S5, the relation matching (312) adopts the semantic equivalence discrimination module: the embedded vectors e(p) and e(r) of the answer predicate p and the candidate edge type r of the knowledge graph are obtained by the relation encoder respectively, and the cosine similarity sim=cos(e(p),e(r)) is calculated; at the same time, the predefined synonym relation dictionary D is queried, and the synonym flag syn is 1 when (p,r) belongs to D, otherwise it is 0; the discrimination score s=max(sim,syn) is taken, and the relation matching is determined to be valid when s is not less than the matching threshold θ.
[0025] Further, the curriculum standard hierarchical tree anchoring search in step S7 includes: starting from the node aligned with the fact unit marked as out of syllabus or cross-version error, traversing along the superior and sibling relationships in the curriculum standard hierarchical tree, and screening candidate nodes that meet the following conditions: first, the boundary compliance degree B of the candidate node is not lower than the boundary compliance threshold τB; second, there is a semantic implication relationship, superior-subordinate relationship or boundary complementarity relationship between the candidate node and the original fact unit in the knowledge graph, wherein the boundary complementarity relationship refers to the candidate node being used to define the applicable conditions or scope boundaries of the concept involved in the original fact unit under the current grade level or textbook version; selecting replacement nodes in the candidate nodes in the order of the highest boundary compliance degree and the smallest distance from the graph path of the original fact unit; if there are no candidate nodes that meet the conditions, the fact unit is deleted and marked with a prompt.
[0026] Furthermore, the secondary generation process described in step S7 will first verify the error type label of the erroneous fact unit and the corresponding correct fact in the knowledge graph, and inject prompt words in a negative-positive pairing manner to guide the large language model to actively avoid the discovered errors when regenerating.
[0027] The beneficial effects of this invention include: (1) By decoupling factual correctness verification from teaching knowledge boundary constraint verification and weighting the coupling in scoring, the factual error rate of the large model is reduced while the inconsistency problems unique to teaching scenarios such as exceeding the syllabus, crossing levels, and crossing versions are suppressed. This effect cannot be achieved by existing schemes that only perform factual consistency comparison. (2) By using boundary constraint functions to quantify compliance calculations for three dimensions—grade level, curriculum standard coding, and textbook version—the Q&A content is aligned with the specific teaching scenario, reducing the workload of manual review. (3) By decomposing the overall score into factual sub-scores and boundary sub-scores, and using a differentiated strategy to handle two types of errors—boundary errors are replaced locally by anchoring search in the curriculum standard hierarchy tree, and the large model is only triggered to generate a second time when the factual sub-score is below the threshold—the number of unnecessary large model inference calls is significantly reduced, and the inference overhead and response latency are reduced. This scoring mechanism uses the factual units of the content generated by the large model as the evaluation object and directly drives automatic error correction, which is different from the scoring scheme that only outputs scores for student answers. (4) By coupling the weight function of structural centrality, difficulty level and core test points, the overall reliability score is made more sensitive to errors in core knowledge points, and the score's ability to distinguish the final error rate is improved. (5) Through the closed-loop feedback of error patterns and human feedback, the system continuously improves its accuracy during continuous use. (6) This invention has no strong constraints on the underlying large model architecture and has good versatility and engineering feasibility. Attached Figure Description
[0028] Figure 1 A schematic diagram of the overall flow of the method provided in the embodiments of the present invention;
[0029] Figure 2 This is a schematic diagram of the hierarchical architecture of the multi-level subject knowledge graph in an embodiment of the present invention;
[0030] Figure 3 This is a schematic diagram of the dual-path verification process for factual correctness verification and boundary constraint verification in an embodiment of the present invention;
[0031] Figure 4 This is a schematic diagram illustrating the calculation of each component of the boundary constraint function in an embodiment of the present invention;
[0032] Figure 5 This is a schematic diagram illustrating the hierarchical labeling and source tracing of reliability-enhancing answers in this embodiment of the invention;
[0033] Figure 6 This is a schematic diagram of the system structure corresponding to the method provided in the embodiment of the present invention. Detailed Implementation
[0034] The present invention will be further described below with reference to the accompanying drawings and specific embodiments. The specific embodiments described herein are only for explaining the present invention and are not intended to limit the present invention.
[0035] Example 1. This example uses a high school physics intelligent Q&A scenario. Figure 1 As shown, the method includes the following steps.
[0036] Step S1: Using the "General High School Physics Curriculum Standards" as the top-level ontology and mainstream textbooks such as those published by People's Education Press as the data source for the textbook knowledge layer, a knowledge graph is constructed through semi-automatic extraction and teacher review. For example, the "Newton's Second Law" node has attributes including the mathematical expression (F=ma), applicable conditions, etc., with the grade level tag being high school, the textbook version tag being People's Education Press compulsory first volume, and the curriculum standard code being 1.2.3.
[0037] Step S2: A student asks, "Why does an object with a larger mass have a smaller acceleration?" The system identifies this as a question about explaining a principle, with the subject being physics and the knowledge point being "Newton's Second Law." The system then determines the teaching scenario constraints: C = (g0 = high school, v0 = People's Education Press compulsory textbook, Book 1, K0 = {1, 2, 3}). A reference subgraph is formed by expanding two hops of neighbors around this node. In this embodiment, the educational level values are defined as L=2 for junior high school, L=3 for senior high school, and L=4 for university.
[0038] Step S3: Serialize the reference subgraph, inject the prompt word template, and concatenate the original question. Input the original question into the large language model to generate a preliminary answer.
[0039] Step S4: Fine-grained fact extraction is performed on the preliminary answer to obtain five declarative fact units f1 to f5: f1 <Newton's Second Law, mathematical expression, F=ma>; f2 <Acceleration, inversely proportional to mass>; f3 <Acceleration, direction, same as the direction of the net external force>; f4 <Acceleration, direction, same as the direction of velocity>; f5 <Relativistic effect, influence, acceleration>. Explanatory statements are not included in the validation.
[0040] Step S5: Perform on each fact unit Figure 3 The dual-path verification is shown. α=0.4, β=0.4, γ=0.2, λ=1. Fact correctness verification (301) results: f1, f2, f3, and f5 are consistent after entity alignment, relation matching, and attribute verification, with a confidence level c=1.0; f4's "acceleration direction is the same as velocity direction" is inconsistent with the direction attribute of the "acceleration" node in the graph, "same as the direction of the resultant external force," c=0, and is marked as factually incorrect. Boundary constraint verification (302) results are listed in the table below.
[0041] Fact Unit | L(ni) | Code Distance d | Version Consistency | δ_grade | δ_code | δ_version | B(fi|C) f1 | 3 | 0 | Yes | 1.000 | 1.000 | 1 | 1.000 f2 | 3 | 1 | Yes | 1.000 | 0.500 | 1 | 0.800 f3 | 3 | 1 | Yes | 1.000 | 0.500 | 1 | 0.800 f4 | 3 | 1 | Yes | 1.000 | 0.500 | 1 | 0.800 f5 | 4 | 5 | No | 0.368 | 0.167 | 0 | 0.214
[0042] The calculation of each term of the boundary constraint function is as follows: Figure 4 As shown. Taking f5 as an example, δ_grade=exp(-1×(4-3))=0.368, δ_code=1 / (1+5)=0.167, δ_version=0, so B(f5|C)=0.4×0.368+0.4×0.167+0.2×0=0.214. Taking the boundary compliance threshold τB=0.6, f5 is marked as an out-of-scope error (342).
[0043] Step S6: Calculate the weight of each fact unit wi = Cen(ni)^a·Diff(ni)^b·Core(ni), taking a=b=1. In this embodiment: f1 is the core test point, Cen=0.8, Diff=0.6, Core=1.5, w1=0.72; f2, f3, and f4 are all Cen=0.5, Diff=0.5, Core=1.0, w2=w3=w4=0.25; f5 is Cen=0.3, Diff=0.6, Core=1.0, w5=0.18, Σwi=1.65. Substitute into the overall reliability scoring formula (303): R = (0.72×1.0×1.000 + 0.25×1.0×0.800 + 0.25×1.0×0.800 + 0.25×0×0.800 + 0.18×1.0×0.214) / 1.65 = (0.720 + 0.200 + 0.200 + 0 + 0.0385) / 1.65 = 1.1585 / 1.65 ≈0.70.
[0044] Simultaneously calculate the sub-scores: Fact sub-score R_fact=Σ(wi·ci) / Σwi=(0.72+0.25+0.25+0+0.18) / 1.65=1.40 / 1.65≈0.85; Boundary sub-score R_boundary=Σ(wi·B) / Σwi=(0.720+0.200+0.200+0.200+0.0385) / 1.65=1.3585 / 1.65≈0.82.
[0045] Step S7: Set the fact score threshold τf = 0.7. In this example, R_fact ≈ 0.85 is higher than τf, so the secondary generation of the large model is not triggered, and only local error correction is performed: f4 (fact error 341) is directly replaced with the correct fact in the graph, "The direction of acceleration is the same as the direction of the net external force"; f5 (out-of-syllabus error 342) is subjected to curriculum standard hierarchical tree anchoring search - starting from the node "relativistic effect" aligned with f5, it traverses along the superior relationship, and the candidate node "Newton's laws of motion applicable conditions" (high school, under curriculum standard code 1.2.3, with a pre-marked boundary complementary relationship with the original fact, that is, it defines the applicable scope boundary of the relativistic effect relative to this stage) satisfies B = 1.0 ≥ τB and the graph path distance is the smallest, so it is replaced with its equivalent expression "This stage is discussed under macroscopic low-speed conditions, and high-speed cases are beyond the scope of this stage". After error correction, each fact unit c = 1.0, B = 1.0, and the overall reliability score R is updated to 1.0. This example only calls the large model once throughout the entire process. Compared with the method of not decomposing the score and regenerating the whole system whenever there is an error, it reduces one call to the large model inference. If the R_fact of the other answer is lower than τf, a secondary generation is triggered and S4 to S6 are re-executed after regeneration until R_fact reaches the target or the maximum number of times N_max is reached.
[0046] Step S8: Output the final answer, such as Figure 5 As shown, each fact statement is labeled according to its confidence level c and boundary compliance level B: those that pass the verification are labeled as credible and accompanied by a source (510); those that are replaced are labeled as corrected and the comparison before and after the correction is displayed (520, 530); those without a corresponding node are labeled as pending review (540); each fact statement provides an entry point for viewing the basis (550) to display a traceable knowledge graph subgraph (560).
[0047] Step S9: Record the factual errors "acceleration direction is the same as velocity direction" and the out-of-scope pattern of "relativistic effect" identified in this study into the error pattern library for early avoidance in subsequent prompting stages; the teacher's feedback on the correction results is fed back into the map maintenance and model fine-tuning process.
[0048] Example 2. This example applies the method to a junior high school math Q&A scenario, where the teaching scenario constraint C is set to junior high school as the target grade level. When a student asks a question involving concepts beyond the junior high school scope, the boundary constraint check identifies and reduces the boundary compliance level B using δ_grade and δ_code, thereby marking it as an out-of-syllabus error. The error is then replaced with an equivalent expression within the reach of the junior high school curriculum standards through a curriculum standard hierarchy tree anchor search. The remaining steps are the same as in Example 1.
[0049] Example 3. This example provides a system corresponding to the above method, the structure of which is as follows: Figure 6 As shown, the system includes: a knowledge graph construction and maintenance module (601), a problem understanding and constraint determination module (602), a large model answer generation module (603), a fact extraction module (604), and a dual-path verification module (605). The dual-path verification module (605) includes a fact correctness verification unit (6051) and a boundary constraint verification unit (6052). It also includes a reliability scoring and correction module (606), a hierarchical annotation and tracing module (607), and a feedback and closed-loop optimization module (608). Each module can be deployed in the cloud or using a cloud-edge hybrid deployment. This invention does not limit the specific programming language, deep learning framework, or database type.
[0050] Example 4. This example provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method.
[0051] Example 5. This example provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps of the above-described method. The electronic device may be a server, a personal computer, an educational all-in-one machine, or a smart terminal.
[0052] The above embodiments are merely preferred embodiments of the present invention and should not be construed as limiting the scope of protection of the claims. Modifications and improvements made by those skilled in the art without departing from the concept of the present invention, such as applying the method to other educational levels or subjects, replacing the fact extraction or semantic matching algorithms, or adjusting the specific forms of the boundary constraint functions, should all be considered within the scope of protection of the present invention. The scope of protection of the present invention is defined by the appended claims.
Claims
1. A method for enhancing the reliability of teaching and Q&A in large-scale models based on knowledge graph validation, characterized in that... ,include: S1. Construct a multi-layered subject knowledge graph oriented towards teaching scenarios. The knowledge graph includes entities and their structured relationships. Each knowledge node is labeled with a learning stage tag, textbook version tag, difficulty level tag, and credibility level tag, and records the hierarchical curriculum standard code of the node in the curriculum standard. S2. Receive students' natural language questions, perform intent recognition, subject classification, and knowledge point localization to obtain a structured question representation, and determine the current teaching scenario constraint C=(g0,v0,K0), where g0 is the target grade level, v0 is the target textbook version, and K0 is the curriculum standard code set for the target knowledge points; based on the question representation, retrieve relevant subgraphs in the knowledge graph as reference knowledge context; S3. Input the reference knowledge context and prompt words constructed from the original question into the pre-trained large language model to generate preliminary answer text; S4. Fine-grained fact extraction is performed on the preliminary answer text to obtain several fact units, each of which is represented as a triple or key-value pair; S5. Perform two independent checks on each fact unit: the first is fact correctness check, which sequentially performs entity alignment, relation matching, and attribute verification to obtain the fact correctness confidence score ci; the second is boundary constraint check, which compares the grade level label, curriculum standard code, and textbook version label of the node ni aligned to the fact unit with the teaching scenario constraint C, and calculates the boundary compliance score according to the boundary constraint function B(fi|C)=α·δ_grade(ni,g0)+β·δ_code(ni,K0)+γ·δ_version(ni,v0), where α, β, and γ are non-negative weights, δ_grade is the grade level compliance item, δ_code is the curriculum standard code reachable item, and δ_version is the textbook version consistent item; S6. Calculate the overall reliability score of the answer according to R=Σ[wi·ci·B(fi|C)] / Σwi, where wi is the weight of the i-th fact unit, and decompose the overall score into fact sub-scores R_fact=Σ(wi·ci) / Σwi and boundary sub-scores R_boundary=Σ(wi·B(fi|C)) / Σwi; fact units with ci below the fact confidence threshold are marked as fact errors, and fact units with B(fi|C) below the boundary compliance threshold are marked as out-of-scope or cross-version errors; S7. Based on the verification results, perform reliability enhancement processing on the preliminary answer using a differentiated strategy: replace fact units marked as factual errors with the corresponding correct facts in the knowledge graph; for fact units marked as out-of-syllabus or cross-version errors, determine the replacement node that meets constraint C through curriculum standard hierarchical tree anchor search and perform local replacement with its equivalent expression without triggering the large model to re-infer; only when the fact sub-score R_fact is lower than the fact score threshold, trigger the large model secondary generation process. The secondary generation process re-executes steps S4 to S6 after generating a new answer, and terminates when the fact sub-score reaches the fact score threshold or the cumulative number of secondary generation times reaches the preset upper limit. S8. Output the final answer with enhanced reliability. Classify and label each factual statement according to its factual correctness confidence and boundary compliance. Based on the boundary sub-score, output the overall boundary fit of the answer relative to the teaching scenario constraint C, and provide a knowledge graph subgraph supporting the factual statement as a traceable basis. S9. Error patterns identified during the verification process, missing information in the knowledge graph, and human feedback are fed back into the knowledge graph construction and large model optimization process to form a closed loop.
2. The method according to claim 1, characterized in that... The multi-layered subject knowledge graph described in step S1 adopts a hierarchical architecture, which includes, from top to bottom, a subject top-level ontology layer, a curriculum standard layer, a textbook knowledge layer, and an exercise and typical example layer. The layers are interconnected through alignment relationships. The structured question representation described in step S2 includes at least a question type field, a target learning stage field, a target subject field, a target knowledge point curriculum standard code field, and a set of entities mentioned in the question. The reference knowledge context is injected into the prompt words in the form of subgraph serialized text.
3. The method according to claim 1, characterized in that... In step S4, the fine-grained fact extraction is completed by a fact extraction model fine-tuned for teaching texts. The fact extraction model distinguishes between three types of semantic fragments: declarative facts, inferential conclusions, and illustrative examples, and only extracts declarative facts using triplet extraction. In the fact correctness verification in step S5, the relation matching uses a semantic equivalence discrimination module: the answer predicate p and the knowledge graph candidate edge type r are respectively used with a relation encoder to obtain the embedding vectors, and the cosine similarity sim between the two is calculated; at the same time, the predefined synonym relation dictionary D is queried. When the predicate p and the edge type r belong to the dictionary D, the synonym flag syn is set to 1, otherwise it is set to 0; the discrimination score s = max(sim, syn) is taken, and the relation matching is determined to be valid when s is not less than the matching threshold θ.
4. The method according to claim 1, characterized in that... In the boundary constraint verification of step S5, α, β, and γ satisfy α+β+γ=1; δ_grade is 1 when the grade level L(ni) of node ni does not exceed the target grade level L(g0), otherwise it is exp(-λ(L(ni)-L(g0))), where λ is the attenuation coefficient; δ_code is 1 / (1+d), where d is the minimum path distance between the curriculum standard code of node ni and K0 in the curriculum standard hierarchy tree; δ_version is 1 when the textbook version tag of node ni contains or is compatible with v0, otherwise it is a preset discount value.
5. The method according to claim 1, characterized in that... In step S6, the weight wi = Cen(ni)^a·Diff(ni)^b·Core(ni) is given by Cen(ni), where Cen(ni) is the structural centrality of node ni in the reference subgraph, Diff(ni) is the normalized value of the difficulty level of node ni, Core(ni) is the core test point identifier with an increase of greater than 1 for core test points and 1 for non-core test points, and a and b are adjustable exponents.
6. The method according to claim 1, characterized in that... The curriculum standard hierarchical tree anchoring search in step S7 includes: starting from the node aligned with the fact unit marked as out of syllabus or cross-version error, traversing along the superior and sibling relationships in the curriculum standard hierarchical tree, and screening candidate nodes whose boundary compliance B is not lower than the boundary compliance threshold and which have a semantic implication relationship, superior-subordinate relationship or boundary complementarity relationship pre-marked in the knowledge graph with the original fact unit. The boundary complementarity relationship refers to the candidate node being used to define the applicable conditions or scope boundaries of the concept involved in the original fact unit under the current grade level or textbook version; selecting replacement nodes in the candidate nodes in the order of the highest boundary compliance and the smallest distance from the graph path of the original fact unit; if there are no candidate nodes that meet the conditions, the fact unit is deleted and marked with a prompt.
7. The method according to claim 1, characterized in that... In step S7, the secondary generation process injects prompt words into the error type labels of the erroneous fact units identified in the first verification and the corresponding correct facts in the knowledge graph, using a negative-positive example pairing method, to guide the large language model to actively avoid the discovered errors during regeneration. In step S8, the hierarchical labeling classifies factual statements into three categories—verified, pending review, and corrected—based on the confidence level of factual correctness and boundary compliance, and identifies them separately. Each factual statement is associated with the source entry of its supporting subgraph. In step S9, if the mean value of the boundary sub-score R_boundary obtained from multiple Q&A sessions for the same target knowledge point within a preset statistical period is lower than the set level, it is determined that the knowledge graph coverage of the target knowledge point under the current learning stage or textbook version is insufficient, and the target knowledge point is prioritized as a knowledge graph completion object.
8. A large-scale model teaching and Q&A reliability enhancement system based on knowledge graph verification, characterized in that... ,include: The knowledge graph construction and maintenance module is used to perform step S1 as described in claim 1; The problem understanding and constraint determination module is used to perform step S2 as described in claim 1; A large model answer generation module is used to perform step S3 as described in claim 1; The fact extraction module is used to perform step S4 as described in claim 1; The dual-path verification module includes a fact correctness verification unit and a boundary constraint verification unit, and is used to perform step S5 as described in claim 1. The reliability scoring and correction module is used to perform steps S6 and S7 as described in claim 1; The hierarchical labeling and traceability module is used to perform step S8 as described in claim 1; The feedback and closed-loop optimization module is used to perform step S9 as described in claim 1.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that... When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 7.
10. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that... When the processor executes the computer program, it implements the steps of the method as described in any one of claims 1 to 7.