IP Library › Granted Patent US 12,724,810
Granted Patent B2
US 12,724,810 · App. 18/979,343 · Granted Sep 1, 2026

Question answering method based on large model, electronic device, and storage medium

Inventor: Bolei He (Bejing, CN)
Assignee: BAIDU ONLINE NETWORK TECHNOLOGY (BEIJING) CO., LTD.
G06F16/338G06F16/3344G06F16/383
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,724,810
App. No.
18/979,343
Granted
Sep 1, 2026
Kind
B2
Abstract

A question answering method based on a large model is performed by an electronic device. The method includes: determining a first result corresponding to a query statement based on a first large model, in which the first result includes a first response corresponding to the query statement, a first response logic corresponding to the first response, and first context knowledge corresponding to the first response; determining a retrieval result corresponding to the query statement by retrieving in a database based on the query statement; determining a type of a knowledge conflict between the first result and the retrieval result; and determining a target response corresponding to the query statement based on the first result, the retrieval result, and the type of the knowledge conflict.

Claims (83)

1 . A computer-implemented question answering method based on a large model, applied in an intelligent question answering system or a personalized recommendation system, performed by an electronic device, the method comprising:

determining a first result corresponding to a query statement based on a first large model, wherein the first result comprises a first response corresponding to the query statement, a first response logic corresponding to the first response, and first context knowledge corresponding to the first response;

determining a retrieval result corresponding to the query statement by retrieving in a database based on the query statement;

determining a type of a knowledge conflict between the first result and the retrieval result; and

determining a target response corresponding to the query statement based on the first result, the retrieval result, and the type of the knowledge conflict;

wherein determining the target response corresponding to the query statement, comprises:

determining a first weight corresponding to the first result and a second weight corresponding to the retrieval result; and

in response to the type of the knowledge conflict being a semantic error, determining the target response by inputting the first result, the retrieval result, the type of the knowledge conflict, the definition and the reference example corresponding to the semantic error, the first weight corresponding to the first result, and the second weight corresponding to the retrieval result into a third large model;

wherein determining the first weight corresponding to the first result and the second weight corresponding to the retrieval result, comprises:

determining the first weight corresponding to the first result based on a parameter amount corresponding to the first large model, wherein the parameter amount is proportional to the first weight; and

determining the second weight based on the first weight;

wherein determining the first result corresponding to the query statement based on the first large model, comprises:

obtaining a preset number of output results by inputting the query statement into the first large model for a preset number of times, wherein each of the output results comprises a second response corresponding to the query statement, a second response logic corresponding to the second response, and second context knowledge corresponding to the second response;

determining the first response by processing a preset number of second responses;

determining the first response logic by processing a preset number of second response logics; and

determining the first context knowledge by processing a preset number of pieces of second context knowledge.

2 . The method according to claim 1 , wherein the type of the knowledge conflict comprises at least one of a fact error or a semantic error.

3 . The method according to claim 2 , wherein determining the type of the knowledge conflict between the first result and the retrieval result, comprises:

obtaining a definition and a reference example corresponding to the fact error, or a definition and a reference example corresponding to the semantic error; and

determining the type of the knowledge conflict by inputting the first result, the retrieval result, the definition and the reference example corresponding to the fact error, and the definition and the reference example corresponding to the semantic error into a second large model.

4 . The method according to claim 1 , wherein determining the target response corresponding to the query statement, comprises:

in response to the type of the knowledge conflict being a semantic error, determining the target response by inputting the first result, the retrieval result, the type of the knowledge conflict, and the definition and the reference example corresponding to the semantic error into a third large model.

5 . The method according to claim 1 , wherein after obtaining the preset number of output results by inputting the query statement into the first large model for the preset number of times, the method further comprises:

determining the first response corresponding to the query statement, the first response logic, and the first context knowledge by inputting the preset number of second responses, the preset number of second response logics and the preset number of pieces of second context knowledge into a fourth large model.

6 . The method according to claim 1 , wherein the output result comprises a confidence level corresponding to the second response, and determining the target response corresponding to the query statement, comprises:

determining a first weight corresponding to the first result based on a preset number of confidence levels;

obtaining a second weight corresponding to the retrieval result; and

in response to the type of the knowledge conflict being a semantic error, determining the target response by inputting the retrieval result, the first result, the type of the knowledge conflict, the definition and the reference example corresponding to the semantic error, the first weight corresponding to the first result, and the second weight corresponding to the retrieval result into a third large model.

7 . The method according to claim 1 , further comprising:

in response to the type of the knowledge conflict being a fact error, determining a third result corresponding to the query statement based on the first large model again;

determining a new retrieval result corresponding to the query statement by retrieving in a database based on the query statement again; and

determining a type of a knowledge conflict between the third result and the new retrieval result until the type of the knowledge conflict between the third result and the new retrieval result is no longer the fact error.

8 . An electronic device, applied in an intelligent question answering system or a personalized recommendation system, comprising a processor; and a memory communicatively coupled to the processor and storing instructions executable by the processor, wherein the processor is configured to:

determine a first result corresponding to a query statement based on a first large model, wherein the first result comprises a first response corresponding to the query statement, a first response logic corresponding to the first response, and first context knowledge corresponding to the first response;

determine a retrieval result corresponding to the query statement by retrieving in a database based on the query statement;

determine a type of a knowledge conflict between the first result and the retrieval result; and

determine a target response corresponding to the query statement based on the first result, the retrieval result, and the type of the knowledge conflict;

wherein the processor is further configured to perform one of:

determining a first weight corresponding to the first result and a second weight corresponding to the retrieval result; and

in response to the type of the knowledge conflict being a semantic error, determining the target response by inputting the first result, the retrieval result, the type of the knowledge conflict, the definition and the reference example corresponding to the semantic error, the first weight corresponding to the first result, and the second weight corresponding to the retrieval result into a third large model; or

in response to the type of the knowledge conflict being a semantic error, determining the target response by inputting the first result, the retrieval result, the type of the knowledge conflict, and the definition and the reference example corresponding to the semantic error into a third large model;

wherein the processor is further configured to:

determine the first weight corresponding to the first result based on a parameter amount corresponding to the first large model, wherein the parameter amount is proportional to the first weight; and

determine the second weight based on the first weight;

wherein determining the first result corresponding to the query statement based on the first large model, comprises:

obtaining a preset number of output results by inputting the query statement into the first large model for a preset number of times, wherein each of the output results comprises a second response corresponding to the query statement, a second response logic corresponding to the second response, and second context knowledge corresponding to the second response;

determining the first response by processing a preset number of second responses;

determining the first response logic by processing a preset number of second response logics; and

determining the first context knowledge by processing a preset number of pieces of second context knowledge.

9 . The electronic device according to claim 8 , wherein the type of the knowledge conflict comprises at least one of a fact error or a semantic error.

10 . The electronic device according to claim 9 , wherein the processor is further configured to:

obtain a definition and a reference example corresponding to the fact error, and a definition and a reference example corresponding to the semantic error; and

determine the type of the knowledge conflict by inputting the first result, the retrieval result, the definition and the reference example corresponding to the fact error, and the definition and the reference example corresponding to the semantic error into a second large model.

11 . The electronic device according to claim 8 , wherein the processor is further configured to:

obtain a preset number of output results by inputting the query statement into the first large model for a preset number of times, wherein each of the output results comprises a second response corresponding to the query statement, a second response logic corresponding to the second response, and second context knowledge corresponding to the second response;

determine the first response by processing a preset number of second responses;

determine the first response logic by processing a preset number of second response logics; and

determine the first context knowledge by processing a preset number of pieces of second context knowledge.

12 . The electronic device according to claim 11 , wherein the processor is further configured to:

determine the first response corresponding to the query statement, the first response logic, and the first context knowledge by inputting the preset number of second responses, the preset number of second response logics and the preset number of pieces of second context knowledge into a fourth large model.

13 . The electronic device according to claim 11 , wherein the processor is further configured to:

determine a first weight corresponding to the first result based on a preset number of confidence levels;

obtain a second weight corresponding to the retrieval result; and

in response to the type of the knowledge conflict being a semantic error, determine the target response by inputting the retrieval result, the first result, the type of the knowledge conflict, the definition and the reference example corresponding to the semantic error, the first weight corresponding to the first result, and the second weight corresponding to the retrieval result into a third large model.

14 . The electronic device according to claim 8 , wherein the processor is further configured to: in response to the type of the knowledge conflict being a fact error, determine a third result corresponding to the query statement based on the first large model again;

determine a new retrieval result corresponding to the query statement by retrieving in a database based on the query statement again; and

determine a type of a knowledge conflict between the third result and the new retrieval result until the type of the knowledge conflict between the third result and the new retrieval result is no longer the fact error.

15 . A non-transitory computer readable storage medium storing computer instructions, applied in an intelligent question answering system or a personalized recommendation system, wherein the computer instructions are caused to enable a computer to perform a computer-implemented question answering method based on a large model, the method comprising:

determining a first result corresponding to a query statement based on a first large model, wherein the first result comprises a first response corresponding to the query statement, a first response logic corresponding to the first response, and first context knowledge corresponding to the first response;

determining a retrieval result corresponding to the query statement by retrieving in a database based on the query statement;

determining a type of a knowledge conflict between the first result and the retrieval result; and

determining a target response corresponding to the query statement based on the first result, the retrieval result, and the type of the knowledge conflict;

wherein determining the target response corresponding to the query statement, comprises:

determining a first weight corresponding to the first result and a second weight corresponding to the retrieval result; and

in response to the type of the knowledge conflict being a semantic error, determining the target response by inputting the first result, the retrieval result, the type of the knowledge conflict, the definition and the reference example corresponding to the semantic error, the first weight corresponding to the first result, and the second weight corresponding to the retrieval result into a third large model;

wherein determining the first weight corresponding to the first result and the second weight corresponding to the retrieval result, comprises:

determining the first weight corresponding to the first result based on a parameter amount corresponding to the first large model, wherein the parameter amount is proportional to the first weight; and

determining the second weight based on the first weight;

wherein determining the first result corresponding to the query statement based on the first large model, comprises:

obtaining a preset number of output results by inputting the query statement into the first large model for a preset number of times, wherein each of the output results comprises a second response corresponding to the query statement, a second response logic corresponding to the second response, and second context knowledge corresponding to the second response;

determining the first response by processing a preset number of second responses;

determining the first response logic by processing a preset number of second response logics; and

determining the first context knowledge by processing a preset number of pieces of second context knowledge.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 27, 2024
From: HE, BOLEI
To: BAIDU ONLINE NETWORK TECHNOLOGY (BEIJING) CO., LTD.
Reel/Frame 069686/0579 →
Priority Claims (1)
CN 202411329259.0 · Sep 23, 2024 · national
Continuity (1)
Related Publication 20260087055A1 · Mar 26, 2026
References Cited (29)
US 9208223B1 · Patil · 2015 [cited by examiner]
US 12596867B2 · Ghoneim · 2026 [cited by examiner]
US 20120066167A1 · Fokoue · 2012 [cited by examiner]
US 20150081657A1 · Yi · 2015 [cited by examiner]
US 20220164643A1 · Charnock · 2022 [cited by examiner]
US 20240095468A1 · Tunstall-Pedoe · 2024 [cited by examiner]
US 20240289395A1 · Zhou · 2024 [cited by examiner]
US 20240330342A1 · Chhatpar · 2024 [cited by examiner]
US 20240338361A1 · Hazel · 2024 [cited by examiner]
US 20240362423A1 · Agrawal · 2024 [cited by examiner]
US 20240386207A1 · Emrey · 2024 [cited by examiner]
US 20240419912A1 · Somech · 2024 [cited by examiner]
US 20250045256A1 · Gottlob · 2025 [cited by examiner]
US 20250086211A1 · Bolcer · 2025 [cited by examiner]
US 20250094025A1 · Maschmeyer · 2025 [cited by examiner]
US 20250097171A1 · Hu · 2025 [cited by examiner]
US 20250103800A1 · Ghoneim · 2025 [cited by examiner]
US 20250111169A1 · Srinivasan · 2025 [cited by examiner]
US 20250111220A1 · Jones · 2025 [cited by examiner]
US 20250181435A1 · Thain · 2025 [cited by examiner]
US 20250225337A1 · Yim · 2025 [cited by examiner]
US 20250307572A1 · Shtar · 2025 [cited by examiner]
CN 116737908A · 2023 [cited by applicant]
CN 117591654A · 2024 [cited by applicant]
CN 118277522A · 2024 [cited by applicant]
CN 118606348A · 2024 [cited by applicant]
Thain et al. U.S. Appl. No. 63/605,446 provisional application of US 20250181435, Dec. 1, 2023 (Year: 2023). [cited by examiner]
Thain et al. Appendix A, Dec. 1, 2023 (Year: 2023). [cited by examiner]
Ziwei Ji et al. “Survey of Hallucination in Natural Language Generation”, Mar. 2023, ACM Computing Surveys, vol. 55, No. 12, Article 248. (Year: 2023). [cited by examiner]