Multi-span question and answer cognitive matching method and system based on thinking chain prompt
By adopting the cascaded multi-granularity cognitive matching method based on thought chain prompts (SIGMA-CoT), the problems of reliance on manual annotation and insufficient model generalization ability in multi-span question answering tasks are solved. It achieves high-precision multi-answer generation and semantic consistency, and is suitable for multi-span question answering tasks.
Patent Information
- Application Number
- CN202510867524.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-26
- Publication Date
- 2025-11-07
AI Technical Summary
Existing multi-span question answering methods rely on manually labeled data, have weak generalization ability, and are difficult to adapt to new domains. Furthermore, large language models have shortcomings in multi-target matching and multi-layer semantic modeling, resulting in poor performance in multi-span question answering tasks.
We employ a cascaded multi-granularity cognitive matching method based on thought chain cues (SIGMA-CoT), which achieves structured modeling of question intent and control over multiple answer generation through cognitive cue-driven evidence information extraction, logical reasoning chain modeling, sentence-level filtering, and span-level matching.
It improves the accuracy and stability of multi-span question answering tasks, has good generalization and transferability, is suitable for real-world application scenarios with complex contexts and discrete semantic distributions, and reduces system deployment costs.
Smart Images

Figure CN120911591A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of computers, and relates to a natural language processing technology, in particular to a multi-span question answering cognitive matching method and system based on thought chain prompts, which is suitable for multi-span question answering tasks. BACKGROUND
[0002] With the wide application of pre-training language models (such as BERT, RoBERTa) in natural language processing tasks, question answering systems, especially extractive question answering tasks, have made significant progress. Traditional question answering systems usually focus on the extraction of single answer fragments, but in practical applications, the questions raised by users often involve multiple non-continuous information fragments, which require the integration of multiple answer regions to form a complete answer. Such tasks are usually defined as multi-span question answering tasks.
[0003] Most of the current mainstream multi-span question answering methods are based on the supervised learning paradigm, that is, by fine-tuning the pre-training language model to adapt to the multi-span question answering task. Although such methods have certain advantages in performance, they generally have high dependence on artificial annotation data, weak generalization ability, and difficulty in adapting to new domains or new tasks. In addition, existing pre-training language models lack the ability to model human cognitive processes, making it difficult to effectively understand the multi-intention structure implied in the question and its complex logical associations in the context, thus having insufficient reasoning depth and semantic matching ability when dealing with multi-span question answering tasks.
[0004] In recent years, with the improvement of large language models (such as GPT-4, DeepSeek, etc.) in knowledge memory and language reasoning ability, the few-shot learning paradigm based on context learning has gradually become a mainstream trend. Despite this, the existing methods still have obvious limitations in multi-span question answering tasks, mainly in that they fail to fully stimulate the potential cognitive ability of large language models, and have difficulties in understanding and executing complex task instructions, resulting in significant defects in modeling for multi-answer requirements.
[0005] As a prompt strategy to enhance the reasoning ability of large language models, thought chain prompts have shown good results in tasks such as arithmetic calculation and complex reasoning. However, their application in multi-span question answering tasks is still in the initial exploration stage. Existing thought chain prompt methods mostly focus on linear single-step reasoning processes, and have not established a hierarchical and systematic modeling mechanism for question cognitive structures, making it difficult to bridge the semantic level between questions and multiple answer fragments.
[0006] Therefore, there is an urgent need to provide a reasoning method that can guide large language models to perform cognitive level division, structured reasoning, and multi-granularity matching, in order to improve their adaptability and answer generation quality in multi-span question answering tasks. SUMMARY
[0007] The existing method relies on a large amount of manually annotated data for supervised training, and although high accuracy can be obtained in a specific field, it performs poorly in cross-domain migration and low-resource environment. At the same time, although the existing large language model has certain reasoning ability in few-shot question answering, it still has significant shortcomings in multi-target matching, multi-layer semantic modeling and cross-sentence information integration. In view of the demand problem of multi-span question answering task in practical application, the present application proposes a multi-span question answering cognitive matching method and system based on thought chain prompt, which has strong generalization ability and cognitive matching ability.
[0008] The present application proposes a cascade multi-granularity cognitive matching method (SIGMA-CoT) based on thought chain prompt, which guides the large language model to simulate the multi-stage cognitive reasoning process of analogy type based on the thought chain prompt mechanism, and models the problem intent recognition, evidence mining, logical chain construction and answer positioning in stages, to improve the accuracy and stability of the multi-span question answering task.
[0009] In order to achieve the above object, the present application adopts the following technical scheme:
[0010] The multi-span question answering cognitive matching method based on thought chain prompt is as follows:
[0011] S1: Based on the evidence information extraction mechanism driven by cognitive clues, the problem intent and cognitive clues are identified and the key evidence information is extracted from the context, realizing the structured semantic modeling of problem intent in multi-span question answering;
[0012] S2: Introducing a quantity-constrained logical reasoning chain modeling method, a semantic chain of problem-evidence-answer is constructed to improve the structure control ability of multi-answer generation;
[0013] S3: A cascade extraction mechanism of sentence-level screening and span-level matching is adopted to realize high-precision multi-span answer positioning and extract the target answer.
[0014] Preferably, the present application constructs a problem clarification and knowledge exploration mechanism for guiding the language model to extract structured evidence information corresponding to multi-intent problems from unstructured text.
[0015] Preferably, in step S1, the evidence information extraction mechanism driven by cognitive clues is constructed in the following steps:
[0016] S1.1: Identify the cognitive clue phrase to summarize the main information requirement in the question;
[0017] S1.2: Determine the core inquiry type of the question, such as entity type question, factual question or attribute question, to clearly define the semantic category of the target information;
[0018] S1.3: Analyzing the background constraints related to the query target, including time range, spatial location, semantic qualifiers, etc.
[0019] S1.4: Constructing the information requirement set, extracting the output expectations implied by the question, including the structure format, quantity, granularity, or dimension requirements of the answer.
[0020] S1.5: Using the information requirements obtained in step S1.4, extracting semantic support units that match each sub-information requirement from the context, and constructing a global evidence information set;
[0021] S1.6: Filtering background information, retaining events, entities, or actions that are strongly related to the question.
[0022] Further preferably, in step S1.1, by identifying cognitive clue phrases, the main sub-information requirements contained in the question are extracted and summarized, thereby enhancing the granularity of the question semantics and the degree of structuring.
[0023] Further preferably, in step S1.4, by determining the core query target of the question, the semantic type of the required information (such as person, event, time, etc.) is determined; further decompose the key concepts and constraints, including event background, time range or specific entity category, etc.; and extract the answer intention implied by the question, to determine the expected output format or information dimension; wherein the information requirement set is represented as follows:
[0024] O={o1,o2,…,o n},
[0025] In the formula, o n represents the information requirement abstracted from the question semantic structure, which is the intermediate semantic target driving subsequent evidence extraction and reasoning generation.
[0026] Further preferably, in step S1.5, according to the sub-information requirements obtained in S1.4, construct the corresponding sub-evidence information to support multi-element information reasoning and answer generation. From the context, extract semantic units that can independently support the corresponding sub-information requirement o i , i.e. identify text fragments that are highly related to o i in semantics and have explanatory or supporting power in logic, which should be able to provide partial or complete answer basis for this sub-information requirement independently without other context information; wherein the sub-evidence information set is constructed as follows:
[0027]
[0028] The global evidence information set is constructed as follows:
[0029]
[0030] wherein o i represents the sub-information requirement, represents the number of sub-information requirements matched with o i represents the first sub-information requirement o i matched with the sub-evidence information, K(o i ) represents the corresponding sub-evidence information set of o i represents the global evidence information set.
[0031] The above mechanism explicitly models the cognitive chain of "question-intention-evidence", improves the understanding ability of the large language model for complex semantic structures, and avoids the semantic jump problem existing in the traditional method.
[0032] The above problem modeling method based on cognitive clue decomposition and context alignment has the following three advantages:
[0033] 1) Through the structured clarification process, the model can identify multiple question intentions and fine-grained sub-tasks, improving the accuracy of question understanding;
[0034] 2) The context alignment strategy based on cognitive clues enhances the extraction ability of key information, especially suitable for complex scenarios with multiple entities and multiple sentence dependencies;
[0035] 3) It has good migration and can be seamlessly integrated into the reasoning process of the large language model without task-specific fine-tuning, reducing the deployment cost of the system.
[0036] The present application also proposes a logic chain construction and quantity guidance method for multi-answer generation control, which aims to guide the large language model to explicitly construct the semantic reasoning path of "question-evidence-answer" in the generative question answering process, and to fuse the structural control of the number of answers, in order to solve the problems of unclear number of answers, non-uniform structure of output results, and incomplete content coverage in existing generative question answering systems. The method constructs a semantic consistent reasoning chain by combining question intention, context information and quantity prompt, enhances the controllability and systematicness of answer generation, and thus improves the response completeness and precision in multi-span question answering scenarios.
[0037] Preferably, in step S2, the logic reasoning chain construction method is as follows:
[0038] S2.1: Guide the large language model to identify the original question as a multi-answer generation task through a prompt strategy, and extract all possible candidate answer items in combination with the parallel structure in the context;
[0039] S2.2: Construct the semantic mapping relationship between the question and the context according to the information requirement set and the global evidence information set obtained in step S1;
[0040] S2.3: Determine whether the original question contains an explicit quantity prompt. If yes, extract the quantity information as a constraint condition for the generation process. If the original question does not contain explicit quantity prompt information, infer the most likely answer quantity based on the semantic clues in the context as a reference for answer generation;
[0041] S2.4: Finally, generate a set of logically consistent semantic reasoning chains through a large language model, and jointly predict the answer quantity based on the context.
[0042] Further preferably, in step S2.3, if the original question contains explicit prompt information related to the answer quantity, such as "list three singers" or "write two components", the quantity information is prioritized for analysis and used as a hard constraint condition for the answer generation stage to limit the quantity range of the generation result, thereby improving the structural consistency and control accuracy of the answer set.
[0043] Further preferably, in step S2.4, by analyzing the syntactic and semantic structure of the context, all entities or phrases that can constitute candidate answers are identified, with a focus on parallel structures separated by conjunctions (such as "and", "or") or punctuation marks (such as "and", "or"). Unless there is an explicit semantic indication in the context that the parallel structure should be considered as a single whole concept item, each component in the structure is considered as an independent candidate answer to ensure that the answer generation covers potential multiple content requirements. The set of logical reasoning chains is represented as follows:
[0044] L={l1,l2,…,l m}
[0045] The answer quantity prediction and logical reasoning chain construction method is as follows:
[0046]
[0047] where l m represents the mth reasoning chain, LLM(·) represents the large language model, Q represents the initial question, C represents the initial context, O represents the information requirement set, which consists of multiple sub-information requirements, reflecting the multi-level semantic structure of the question, o i represents the ith sub-information requirement, which is a fine-grained query target parsed from the question, K(o i ) represents the global evidence information set, and K(o iA corresponding sub-evidence information set, containing a related semantic fragment that can support the sub-information requirement in the context, is used to construct a reasoning chain and assist in answer generation, and N represents the number of expected answers.
[0048] Based on the logical reasoning chain obtained in step S2, the application proposes a cascading answer extraction mechanism based on sentence-level screening and span-level matching, which is constructed as shown in Figure 1 to improve the accuracy of multi-answer generation. Specifically, the following steps are included:
[0049] First, the semantic analysis of the context is performed by a large language model to identify key sentences containing potential answers, thereby constructing high-quality candidate contexts to provide semantic range constraints for subsequent answer extraction; then, fine-grained text matching operations are performed in the positioned candidate sentences, combined with the problem intent and reasoning path, to accurately extract multiple semantic complete and boundary clear answer fragments, ensuring that the generated answers have high relevance and logical consistency.
[0050] Further preferably, in step S3, based on the problem intent, information requirement set, and extracted unit evidence information, the context semantic association and logical chain reasoning relationship are comprehensively considered by a large language model to screen out key sentences containing potential answers, and construct a candidate context set, which has the following representation form:
[0051] S={s1,s2,…,s t}
[0052] In the formula, s t represents a unit context, and usually t≤N, where N represents the number of expected answers.
[0053] The candidate sentence set is constructed as follows:
[0054]
[0055] In the formula, Q represents the initial question, C represents the initial context, O represents the information requirement set, o i represents a sub-information requirement, K(o i ) represents a corresponding sub-evidence information set of o i , and L represents a logical reasoning chain. N represents the number of expected answers.
[0056] Further preferably, in step S3, after the candidate context set is constructed, combined with the original question, the logical reasoning chain, and the expected answer quantity, etc. Prompt information, perform fragment-level semantic matching operations on the candidate context set, guide the large language model to identify and extract answer fragments that meet the semantic completeness, boundary clarity, and pragmatic consistency in the sentence-level range, to form the final answer set, which has the following representation form:
[0057] A = {a1, a2, …, aN} N}
[0058] The final answer set is constructed as follows:
[0059] A = LLM(Q, L, S, N),
[0060] wherein aN represents the Nth answer, Q represents the initial question, L represents the logical reasoning chain, N represents the expected number of answers, S represents the candidate context set, A represents the answer set, and each a N is derived from the original context C and meets the structural consistency requirement. i
[0061] The application also discloses a multi-span question answering cognitive matching system based on thought chain prompts, which is used for executing the above method and comprises the following modules:
[0062] A question analysis and evidence extraction module: a cognitive clue driven evidence information extraction mechanism is used to identify the question intention and cognitive clues and extract key evidence information from the context, so as to realize the structured semantic modeling of the question intention in the multi-span question answering;
[0063] A logical reasoning module: a logical reasoning chain modeling method for introducing quantity constraints is used to construct a semantic chain of question-evidence-answer;
[0064] An answer positioning module: used for executing sentence-level screening and span-level matching to extract the target answer.
[0065] Compared with the prior art, the application has multiple advantages, including the following three key points:
[0066] 1) The application explicitly models the analogical cognitive path through a three-stage cognitive driven process, thereby enhancing the reasoning consistency and interpretability of the language model;
[0067] 2) The application has good universality and migratability, is suitable for different types of multi-span question answering tasks, and has low engineering deployment cost;
[0068] 3) The application uses a multi-granularity collaborative mechanism to improve the robustness, and is especially suitable for practical application scenarios with complex context and discrete semantic distribution. BRIEF DESCRIPTION OF DRAWINGS
[0069] Figure 1 is the overall process architecture diagram of the multi-span question answering cognitive matching method based on thought chain prompts according to the preferred embodiment of the application.
[0070] Figure 2 is a specific case analysis diagram of the multi-span question answering cognitive matching method based on thought chain prompts according to the preferred embodiment of the application in the MultiSpanQA dataset.
[0071] Figure 3 is a performance comparison chart of the multi-span question and answer cognitive matching method based on thought chain prompt and the standard thought chain method in the multi-span question and answer task proposed by the preferred embodiment of the present application.
[0072] Figure 4 is a block diagram of the multi-span question and answer cognitive matching system based on thought chain prompt proposed by the preferred embodiment of the present application. DETAILED DESCRIPTION
[0073] The implementation method of the present application is described below through specific specific embodiments. Those skilled in the art can easily understand the present application from the disclosure in the specification. The present application can also be implemented or applied by different specific implementation methods, and various modifications or changes can be made based on different views and applications without departing from the spirit of the present application. It should be noted that the features in the following embodiments can be combined with each other without conflict.
[0074] The present application proposes a cascade multi-granularity cognitive matching method (SIGMA-CoT) based on thought chain prompt for the cognitive matching difficulty problem existing in the multi-span question and answer task. The method realizes structured and high-precision multi-answer information extraction through three key stages of cognitive clue driven evidence information exploration, logical chain construction and multi-granularity answer extraction.
[0075] As shown in Figure 2 , the present embodiment provides a multi-span question and answer cognitive matching method based on thought chain prompt, which comprises the following steps:
[0076] S1: Based on the cognitive clue driven evidence information extraction mechanism, the problem intention and cognitive clue are identified and the key evidence information is extracted from the context, realizing the structured semantic modeling of the problem intention in the multi-span question and answer;
[0077] S2: Introducing a quantity constraint logical reasoning chain modeling method, constructing a semantic chain of question-evidence-answer, and improving the structure control ability of multi-answer generation;
[0078] S3: Adopting a cascade extraction mechanism of sentence level screening and span level matching, realizing high-precision multi-span answer positioning.
[0079] Referring to Figures 1-2 , the present application proposes a multi-level question clarification and knowledge exploration mechanism, which aims to gradually analyze the complex semantic structure in natural language questioning, from cognitive feature clue identification, question semantic structure extraction, detail information completion, to answer intention modeling, and finally realizes high-quality knowledge point positioning.
[0080] The following describes each step of the embodiment in more detail.
[0081] In step S1, in the specific implementation, first, high saliency key word groups (such as attribute words and entity qualifier words) are extracted as semantic entry points, which are used to guide the subsequent reasoning direction. For example, for the question “What engine displacement is equipped in the 2000 Chevrolet Silverado?”, two key phrases “engine displacement” and “2000 Chevrolet Silverado” can be identified, which correspond to the query attribute and the limited entity range, respectively. On this basis, the core information requirement of the question is further determined, that is, the type of answer that the user expects to obtain. For example, the question belongs to “attribute query”, and the goal is to obtain the engine specifications equipped in the specified vehicle model, rather than auxiliary attribute content such as performance description, use scenario or market distribution, etc.
[0082] Further, the limiting details constituting the query context boundary are extracted, such as “2000” and “Chevrolet Silverado” representing time and vehicle model information, respectively, which can be used to limit the context range of answer extraction. Around the above key information, multiple information requirement paths are constructed to express the structural expectation of the answer set, that is, to form a structured information requirement set covering multiple sub-query goals that the question may involve. The information requirement set is specifically expressed as:
[0083] O={o1,o2,…,o n}
[0084] In the embodiment, the set information requirement points include:
[0085] o1: list all standard engines supported by the 2000 Chevrolet Silverado;
[0086] o2: identify the main engines used by different vehicle models or configurations;
[0087] o3: identify and exclude non-standard or non-same period engines (such as engines for heavy use or subsequent new models, etc.).
[0088] For each sub-information requirement o i , the corresponding supporting evidence information K(o i ) is extracted from the context. The global evidence information set is constructed as follows:
[0089]
[0090] In this embodiment, k1: 2000 Chevrolet Silverado provides three standard engine options: Vortec 4300 V6, Vortec 4800 V8 and Vortec 5300 V8, mainly configured for light truck applications; k2: In 2000, the 5.3-liter Vortec 5300 V8 engine achieved significant improvement in output performance, with a maximum output of 285 horsepower (213 kW) and 325 pound-feet (441 Nm) of torque.
[0091] In step S2, the logical correspondence between the question, evidence and answer is established by analyzing the entity relationship, parallel structure and quantity expression in the natural language text, so as to ensure that the generated answer set is consistent in semantics and reasonable in quantity. The specific steps are as follows:
[0092] 1) First, in the process of constructing the logical reasoning chain, the attribute information around the target entity in the context is identified, and the semantic structure between the information points and the evidence information is organized in combination with the parallel structure or the causal relationship, so as to form an explanatory reasoning path. For example, for the statement "2000 Chevrolet Silverado provides three standard engine models: Vortec 4300 V6, Vortec 4800 V8, Vortec 5300 V8", a logical reasoning chain l1 can be constructed to support multi-answer generation. At the same time, although the text also mentions the "5.3 liter" engine, this expression is mainly used to illustrate the improvement of output performance, and does not represent a new option, so a logical reasoning chain l2 can be formed to exclude it from the final answer. Through this logical induction process, the semantic boundary between the question and the answer can be clearly defined, and the composition of the valid answer set can be limited.
[0093] 2) Secondly, in the process of answer quantity control, it is preferred to identify whether the original question contains explicit quantity prompts, such as "list three", "write two categories" and the like; if there is no clear quantity indication, the quantity language existing in the context is further modeled as a constraint basis. For example, in the sentence "provide three engine options", the quantity word "three" can be used as a guide signal to limit the number of candidate answers to 3. The answer quantity prediction and the logical reasoning chain construction method are as follows:
[0094]
[0095] In the formula, Q represents the initial question, C represents the initial context, O represents the information demand set, which is composed of multiple sub-information demands, reflecting the multi-level semantic structure of the question, o i represents the i-th sub-information demand, which is a fine-grained query target parsed from the question, K(o i ) represents the i-th sub-information demand, which is a fine-grained query target parsed from the question, K(oi The corresponding set of sub-evidence information contains relevant semantic fragments in the context that can support the sub-information requirement, which are used to construct the reasoning chain and assist in answer generation. N represents the expected number of answers.
[0096] In step S3, sentence-level filtering and span-level matching are used to achieve refined identification of target entities. The specific steps are as follows:
[0097] 1) First, in the sentence-level semantic matching stage, sentences containing key information are selected from the original context based on the constructed reasoning path. The candidate sentence set is constructed as follows:
[0098]
[0099] In the formula, Q represents the initial problem, C represents the initial context, O represents the information requirement set, and o i Representing sub-information requirements, K(o) i ) indicates the relationship with o i The corresponding set of sub-evidence information, where L represents the logical reasoning chain and N represents the expected number of answers.
[0100] In this embodiment, candidate sentence s1 is: "In the 2000 Silverado 1500 series, the three selectable engines are: Vortec 4300V6, Vortec 4800V8, and Vortec 5300V8." This sentence explicitly lists the three standard engines equipped in the 2000 Silverado 1500 series, possessing the semantic elements needed to directly answer the question, and is therefore included in the candidate sentence set for subsequent span-level matching operations.
[0101] 2) Subsequently, fine-grained entity extraction is performed on the candidate sentences. This can be achieved using rule-based methods or sequence labeling models, etc., to split the phrases based on the enumeration structure, forming a set of candidate answers. The construction method is as follows:
[0102] A = LLM(Q,L,S,N),
[0103] In the formula, a N Let a represent the Nth answer, Q represent the initial question, L represent the logical reasoning chain, N represent the expected number of answers, S represent the candidate context set, and A represent the answer set, where each a i It originates from the original context C and satisfies the structural consistency requirement.
[0104] In this embodiment, the following three answer fragments can be identified: a1: Vortec 4300V6; a2: Vortec 4800V8; and a3: Vortec 5300V8. By locating the potential answer sentence first and then performing accurate extraction in the local fragment, the accuracy of answer boundary identification is effectively improved, avoiding the interference of redundant information and false matching caused by global search in the traditional method.
[0105] As Figure 3 shown is a comparison result diagram of the method proposed in the application relative to the existing standard thinking chain framework under different example number settings. By expanding the number of examples provided in the context from 1 to 3, it can be observed that the performance is significantly improved with the increase of the number of examples. It is worth noting that in various evaluation indicators, the structured multi-granularity thinking chain method proposed in the application always maintains a stable performance advantage over the standard thinking chain method, reflecting good effectiveness and robustness. In addition, in multiple multi-span question answering benchmark tests, the results generally show a positive correlation trend between the number of context examples and the evaluation performance, and no obvious performance saturation or decay signs are observed. This phenomenon shows that, without considering the computing resources and inference cost, further increasing the number of context examples still has the potential to continuously improve the model performance. Based on the above analysis, it can be known that the method of the application has achieved leading performance on public datasets such as MultiSpanQA, DROP, and QUOREF, verifying the effectiveness and practical value of the technical scheme.
[0106] As Figure 4 shown, the embodiment discloses a multi-span question answering cognitive matching system based on thinking chain prompts, which is used to execute the above method and comprises the following modules:
[0107] Question analysis and evidence extraction module: based on the evidence information extraction mechanism driven by cognitive clues, the question intention and cognitive clues are identified and the key evidence information is extracted from the context, realizing the structured semantic modeling of the question intention in the multi-span question answering;
[0108] Logical reasoning module: a logical reasoning chain modeling method for introducing quantity constraints is used to construct the semantic chain of question-evidence-answer;
[0109] Answer positioning module: used to perform sentence-level screening and span-level matching to extract the target answer.
[0110] Other contents of the embodiment can refer to the above method embodiment.
[0111] In conclusion, the application provides a cognitive-driven processing method and system for multi-span question answering tasks, and a cascade multi-stage cognitive matching method (SIGMA-CoT) including question clarification, evidence extraction, logic construction and multi-granularity answer recognition is constructed. The method identifies cognitive clues in the question, clarifies information requirements, constructs a logic chain, and uses a multi-level semantic matching mechanism to achieve high-precision and multi-entity answer extraction under the synergistic effect of the sentence level and the span level. Experiments show that the application can effectively solve the cognitive matching difficulty under the complex semantic structure, significantly improve the answer integrity and accuracy in the multi-span question answering scene, and has good expansibility and practical value.
[0112] The above embodiments are only preferred and feasible embodiments of the present application and the technical principles applied. Those skilled in the art of the present application can make other supplements or modifications to the described specific embodiments, or use other ways instead. Therefore, although the above embodiments make the purpose and advantages of the present application clearer, the present application is not limited to the above embodiments. Therefore, the present specification should not be understood as limiting the present application.
Claims
1. A multi-span question-answering cognitive matching method based on thought chain prompts, characterized by: Follow these steps: S1: Based on a cognitive cue-driven evidence information extraction mechanism, it identifies question intent and cognitive cues and extracts key evidence information from the context, realizing structured semantic modeling of question intent in multi-span question answering; S2: A logical reasoning chain modeling method that introduces quantitative constraints to construct a semantic chain of question-evidence-answer; S3: Employs a cascade extraction mechanism combining sentence-level filtering and span-level matching to achieve multi-span answer location.
2. The multi-span question-answering cognitive matching method based on thought chain prompts as described in claim 1, characterized in that: In step S1, the specific steps for extracting evidence information are as follows: S1.1: Identify cognitive cue phrases to summarize the information needs in the problem; S1.2: Determine the core query type of the question and clarify the semantic category of the target information; S1.3: Analyze and inquire about the background constraints related to the target; S1.4: Construct a set of information requirements and extract the expected outputs implied by the problem. S1.5: Using the information requirements obtained in step S1.4, extract semantic support units that match each sub-information requirement from the context to construct a global evidence information set; S1.6: Filter background information and retain events, entities, or actions that are strongly relevant to the problem.
3. The multi-span question-answering cognitive matching method based on thought chain prompts as described in claim 2, characterized in that: step In S1.4, the information demand set is represented as follows: O={o1,o2,…,o n } In the formula, o n This represents the information requirement abstracted from the semantic structure of the problem, serving as an intermediate semantic goal to drive subsequent evidence extraction and reasoning generation.
4. The multi-span question-answering cognitive matching method based on thought chain prompts as described in claim 2, characterized in that: In step S1.5, the method for constructing the set of sub-evidence information corresponding to the sub-information is as follows: The global evidence information set is constructed as follows: In the formula, o i Indicates sub-information requirements, Indicates with o i The number of sub-information requirements for matching. Indicates the first Individual information needs i Matched sub-evidence information, K(o i ) represents o i The corresponding set of sub-evidence information, This represents the global set of evidence information.
5. The multi-span question-answering cognitive matching method based on thought chain prompts as described in any one of claims 2-4, characterized in that: In step S2, the logical reasoning chain is constructed as follows: S2.1: Guide the large language model to identify the original question as a multi-span answer generation task through prompting strategies, and extract all possible candidate answer items by combining the parallel structure in the context; S2.2: Using the information requirement set and global evidence information set obtained in step S1, construct a semantic mapping relationship between the problem and the context; S2.3: Determine whether the original question contains explicit quantity hints. If so, extract the quantity information as a constraint in the generation process; if not, infer the number of answers by combining semantic clues in the context as a reference for answer generation. S2.4: Generate a set of semantically consistent logical reasoning chains using the large language model from step S2.1, and predict the number of answers in conjunction with the context.
6. The multi-span question-answering cognitive matching method based on thought chain prompts as described in claim 5, characterized in that: In step S2.3, if the original question explicitly contains hints related to the number of answers, then the information related to the number of answers is parsed first and used as a hard constraint in the answer generation stage.
7. The multi-span question-answering cognitive matching method based on thought chain prompts as described in claim 5, characterized in that: Step S2 In section 4, by analyzing the syntactic and semantic structure of the context, entities or phrases constituting candidate answers are identified, with a focus on parallel structures separated by conjunctions or punctuation marks. Unless there is an explicit semantic indication in the context that the parallel structure should be considered a single, unified concept, the constituent units of the structure are assumed to be independent candidate answers. The set of logical reasoning chains is represented as follows: L={l1,l2,…,l m} The methods for predicting the number of answers and constructing logical reasoning chains are as follows: In the formula, l m Let m be the inference chain, LLM(·) denote the large language model, Q denote the initial question, C denote the initial context, and O denote the information requirement set, which consists of multiple sub-information requirements. i K(o) represents the i-th sub-information requirement, which is a fine-grained query target obtained from parsing the problem. i ) indicates the relationship with o i The corresponding set of sub-evidence information contains relevant semantic fragments in the context that can support the sub-information requirement, which are used to construct the reasoning chain and assist in answer generation. N represents the expected number of answers.
8. The multi-span question-answering cognitive matching method based on thought chain prompts as described in claim 7, characterized in that: In step S3, based on the question intent, the information demand set, and the extracted unit evidence information, the large language model comprehensively considers the semantic relevance of the context and the logical chain reasoning relationship to select key sentences containing potential answers and construct a candidate context set, represented as follows: S={s1,s2,…,s t } In the formula, s t Indicates the unit context, t≤N; The candidate sentence set is constructed as follows:
9. The multi-span question-answering cognitive matching method based on thought chain prompts as described in claim 8, characterized in that: In step S3, a fragment-level semantic matching operation is performed on the candidate context set to guide the large language model to identify and extract answer fragments that satisfy semantic integrity, clear boundaries, and pragmatic consistency at the sentence level, forming the final answer set, represented as follows: A={a1,a2,…,a N } The final candidate answer set is constructed as follows: A = LLM(Q,L,S,N), In the formula, a N Let a represent the Nth answer, S represent the set of candidate contexts, and A represent the set of answers, where each a... i It originates from the original context C and satisfies the structural consistency requirement.
10. A multi-span question-answering cognitive matching system based on thought chain prompts, used to perform the method as described in any one of claims 1-9, characterized in that... It includes the following modules: The question parsing and evidence extraction module: Based on a cognitive cue-driven evidence information extraction mechanism, it identifies question intent and cognitive cues and extracts key evidence information from the context, realizing structured semantic modeling of question intent in multi-span question answering; Logical Reasoning Module: A modeling method for logical reasoning chains that introduces quantitative constraints, constructing a semantic chain of question-evidence-answer; Answer locator module: Used to perform sentence-level filtering and span-level matching to extract the target answer.
Citation Information
Cited By
Answer evidence matching method and system in question and answer scene
CN122114194A