# US 2025/0094460 A1 · Query answering method based on large model, electronic device, storage medium, and intelligent agent

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2025/0094460 A1
- Document ID: US20250094460A1
- Status: Published application
- Kind: A1
- Application number: 18/969,597
- Filed: 2024-12-05
- Published: 2025-03-20
- Earliest claimed: 2024-08-16
- Assignees: Beijing Baidu Netcom Science Technology Co., Ltd.
- Applicants: Beijing Baidu Netcom Science Technology Co., Ltd.
- Inventors: Haifeng WANG; Hua WU; Hao TIAN; Jing LIU; Ruiqing ZHANG; Yan CHEN; Yu RAN
- Web page: https://patentgrep.com/patent/US20250094460A1

## CPC

- G06F 16/3329: Natural language query formulation
- G06F 16/3332: Query translation
- G06F 16/334: Query execution (filtering based on additional data G06F16/335)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A query answering method, an electronic device, a storage medium, and an intelligent agent are provided, which relate to a field of artificial intelligence technology, and in particular to fields of large model, intelligent search and information processing technology. The method includes: inputting, in response to a retrieval content set retrieved based on a query, the query, the retrieval content set and prompt information for answer generation into the large model, so that the large model performs operations of: processing, based on a current task in the prompt information and the query, a current text corresponding to the retrieval content set to obtain a processed text, where the current task is determined based on a task execution order in the prompt information; and obtaining, in a case of determining that the processed text meets a preset condition, an answer to the query based on the processed text.

## Claims

### Claim 1

A query answering method based on a large model, comprising:
inputting, in response to a retrieval content set retrieved based on a query, the query, the retrieval content set and prompt information for answer generation into the large model, so that the large model performs operations of:
processing, based on a current task to be executed in the prompt information for answer generation and the query, a current text corresponding to the retrieval content set to obtain a processed text, wherein the current task to be executed is determined based on a task execution order in the prompt information for answer generation; and
obtaining, in a case of determining that the processed text meets a preset condition, an answer to the query based on the processed text.

### Claim 2 (depends on 1)

The method of claim 1, wherein the current task to be executed comprises a content arrangement task; and
processing, based on the current task to be executed for answer generation in the prompt information for answer generation, the current text corresponding to the retrieval content set to obtain the processed text, comprises:
performing, based on the content arrangement task, content processing on the current text to obtain a content-augmented processed text.

### Claim 3 (depends on 2)

The method of claim 2, wherein the content arrangement task comprises a content filtering task; and
performing, based on the content arrangement task, content processing on the current text corresponding to the retrieval content set to obtain the content-augmented processed text, comprises:
determining, based on a content matching degree of each of a plurality of sub-texts in the current text and an attribute matching degree of each of the plurality of sub-texts in the current text, a predetermined number of target sub-texts from the current text as the content-augmented processed text, wherein the content matching degree is determined based on a similarity between the sub-text and the query, the attribute matching degree is determined based on traceability information of the sub-text, the traceability information of the sub-text is determined based on the retrieval content set, and the predetermined number is determined based on the content filtering task.

### Claim 4 (depends on 2)

The method of claim 2, wherein the content arrangement task comprises a content extraction task; and
performing, based on the content arrangement task, content processing on the current text to obtain the content-augmented processed text, comprises:
performing, based on the content extraction task, noise reduction on the current text to obtain a noise reduced text; and
performing content extraction on the noise reduced text to obtain a plurality of hierarchically augmented text segments as the content-augmented processed text.

### Claim 5 (depends on 4)

The method of claim 4, wherein performing content extraction on the noise reduced text to obtain the plurality of hierarchically augmented text segments as the content-augmented processed text, comprises:
rearranging, based on contextual relationships among a plurality of text segments in the noise reduced text, the plurality of text segments, and generating identification information configured to identify respective contextual relationships of the plurality of text segments, so as to obtain a processed text with paragraph-level hierarchical augmentation; and
rearranging a plurality of sentences based on contextual relationships among the plurality of sentences, and generating identification information configured to identify respective contextual relationships of the plurality of sentences, so as to obtain a hierarchically augmented processed text, wherein the plurality of sentences are obtained by splitting text segments in the processed text with paragraph-level hierarchical augmentation.

### Claim 6 (depends on 4)

The method of claim 4, wherein performing content extraction on the noise reduced text to obtain the plurality of hierarchically augmented text segments as the content-augmented processed text, comprises:
rearranging, based on contextual relationships among a plurality of sentences obtained by splitting the noise reduced text, the plurality of sentences, and generating identification information configured to identify respective contextual relationships of the plurality of sentences, so as to obtain the hierarchically augmented processed text.

### Claim 7 (depends on 1)

The method of claim 1, further comprising:
performing, based on a summary generation task in the prompt information for answer generation, summary generation processing on the retrieval content set to obtain a summary set as the current text.

### Claim 8 (depends on 1)

The method of claim 1, wherein the current task to be executed comprises a structural arrangement task; and
processing, based on the current task to be executed, the current text corresponding to the retrieval content set to obtain the processed text, comprises:
performing, based on the structural arrangement task, structuring processing on the current text to obtain a structurally augmented processed text.

### Claim 9 (depends on 8)

The method of claim 8, wherein performing, based on the structural arrangement task, structuring processing on the current text to obtain the structurally augmented processed text, comprises:
performing structured recognition on the current text to obtain structural recognition information for a plurality of text segments in the current text; and
performing, based on a structural format in the structural arrangement task and the structural recognition information for the plurality of text segments, format update on the current text to obtain the structurally augmented processed text.

### Claim 10 (depends on 1)

The method of claim 1, further comprising:
evaluating, based on evaluation information in the prompt information for answer generation, the processed text to obtain an evaluation result configured to indicate whether the processed text meets the preset condition.

### Claim 11 (depends on 10)

The method of claim 10, wherein the evaluation information comprises at least one of an evaluation indicator and reference information.

### Claim 12 (depends on 1)

The method of claim 1, wherein inputting the query, the retrieval content set and the prompt information for answer generation into the large model comprises:
filling the query and the retrieval content set into preset positions in the prompt information for answer generation respectively, and inputting the prompt information for answer generation into the large model, wherein the prompt information comprises a plurality of tasks added with order identifiers configured to indicate an order in which tasks are executed.

### Claim 13 (depends on 1)

The method of claim 1, further comprising:
inputting, in response to the query received, the query and prompt information for query analysis into the large model, so that the large model performs operations of:
performing, based on a retrieval trigger recognition task in the prompt information for query analysis, retrieval trigger analysis on the query to obtain a retrieval trigger analysis result; and
rephrasing, in a case that the retrieval trigger analysis result represents that a retrieval operation needs to be triggered, the query to obtain a plurality of rephrased queries based on a query rephrasing task in the prompt information for query analysis, so as to obtain the retrieval content set based on the plurality of rephrased queries.

### Claim 14 (depends on 13)

The method of claim 13, further comprising:
generating, in a case that the retrieval trigger analysis result represents that the retrieval operation does not need to be triggered, the answer to the query based on the query.

### Claim 15 (depends on 13)

The method of claim 13, wherein rephrasing the query to obtain the plurality of rephrased queries based on the query rephrasing task in the prompt information for query analysis, comprises:
rephrasing, based on a rephrasing rule that matches with a query type of the query in the query rephrasing task, the query to obtain the plurality of rephrased queries.

### Claim 16 (depends on 13)

The method of claim 13, wherein rephrasing the query to obtain the plurality of rephrased queries based on the query rephrasing task in the prompt information for query analysis, comprises:
rephrasing, based on the query rephrasing task, the query to obtain a plurality of initial rephrased queries; and
obtaining, in a case that a correlation between each of the plurality of initial rephrased queries and the query meets a correlation threshold in the query rephrasing task, the plurality of rephrased queries based on the plurality of initial rephrased queries.

### Claim 17 (depends on 13)

The method of claim 13, wherein inputting the query and the prompt information for query analysis into the large model, comprises:
filling the query into a preset position in the prompt information for query analysis, and inputting the prompt information for query analysis into the large model, wherein the retrieval trigger recognition task and the query rephrasing task in the prompt information for query analysis are respectively added with an order identifier configured to indicate an order in which tasks are executed.

### Claim 18

An electronic device, comprising:
at least one processor; and
a memory communicatively coupled with the at least one processor,
wherein the memory stores instructions executable by the at least one processor, and the instructions, when executed by the at least one processor, cause the at least one processor to:
input, in response to a retrieval content set retrieved based on a query, the query, the retrieval content set and prompt information for answer generation into the large model, so that the large model performs operations of:
process, based on a current task to be executed in the prompt information for answer generation and the query, a current text corresponding to the retrieval content set to obtain a processed text, wherein the current task to be executed is determined based on a task execution order in the prompt information for answer generation; and
obtain, in a case of determining that the processed text meets a preset condition, an answer to the query based on the processed text.

### Claim 19

A non-transitory computer readable storage medium storing computer instructions, wherein the computer instructions are configured to cause the computer to:
input, in response to a retrieval content set retrieved based on a query, the query, the retrieval content set and prompt information for answer generation into the large model, so that the large model performs operations of:
process, based on a current task to be executed in the prompt information for answer generation and the query, a current text corresponding to the retrieval content set to obtain a processed text, wherein the current task to be executed is determined based on a task execution order in the prompt information for answer generation; and
obtain, in a case of determining that the processed text meets a preset condition, an answer to the query based on the processed text.

### Claim 20 (depends on 1)

An intelligent agent configured to implement the method of claim 1.
