# US 2026/0093933 A1 · Method, apparatus, device, and medium for processing a user request

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

- Number: US 2026/0093933 A1
- Document ID: US20260093933A1
- Status: Published application
- Kind: A1
- Application number: 19/103,395
- Filed: 2024-03-27
- Published: 2026-04-02
- Earliest claimed: 2024-03-27
- Applicants: Lemon Inc.; Beijing Youzhuju Network Technology Co., Ltd.
- Inventors: Yukun Ma; Yingtong Bu; Huan Liang
- Web page: https://patentgrep.com/patent/US20260093933A1

## CPC

- G06F 40/40: Processing or translation of natural language (natural language analysis G06F40/20; semantic analysis G06F40/30)
- G06F 40/166: Editing, e.g. inserting or deleting
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method, an apparatus, a device, and a medium for processing a user request are provided. In the method, in response to receiving the user request, a reference prompt matching the user request is determined; a set of reference samples matching the user request is determined, wherein a reference sample in the set of reference samples comprises a reference user request and a reference response for the reference user request, and a task type specified by the user request is the same as a reference task type specified by the reference user request; and a prompt for executing the user request is generated based on the user request, the reference prompt, and the set of reference samples.

## Claims

### Claim 1

A method for processing a user request, comprising:
in response to receiving the user request, determining a reference prompt matching the user request;
determining a set of reference samples matching the user request, wherein a reference sample in the set of reference samples comprises a reference user request and a reference response for the reference user request, and a task type specified by the user request is the same as a reference task type specified by the reference user request; and
generating a prompt for executing the user request based on the user request, the reference prompt, and the set of reference samples.

### Claim 2 (depends on 1)

The method of claim 1, further comprising: in response to determining that the number of samples associated with the task type is less than a predetermined threshold, performing the method.

### Claim 3 (depends on 1)

The method of claim 1, wherein determining the reference prompt comprises:
selecting the reference prompt from a reference prompt library comprising a plurality of sample prompts, the reference prompt library generated based on a prompt associated with the task type; and
wherein determining the set of reference samples comprises: determining the set of reference samples from a reference sample library comprising a plurality of reference samples, the reference sample library generated based on samples associated with the task type.

### Claim 4 (depends on 3)

The method of claim 3, wherein determining the set of reference samples comprises:
obtaining a feature representation of the user request; and
searching, using the feature representation, the reference sample library for the set of reference samples matching the feature representation.

### Claim 5 (depends on 4)

The method of claim 4, wherein searching the reference sample library for the set of reference samples comprises: determining the set of reference samples using an index of the reference sample library, the index created based on the plurality of reference samples in the reference sample library.

### Claim 6 (depends on 1)

The method of claim 1, wherein generating the prompt comprises:
updating the reference prompt using the set of reference samples; and
combining the updated reference prompt and the user request to generate the prompt.

### Claim 7 (depends on 5)

The method of claim 5, further comprising: generating, using a language processing model, a response to the user request based on the prompt.

### Claim 8 (depends on 7)

The method of claim 7, further comprising:
creating a sample based on the user request and the response, the sample comprising the user request and the response; and
adding the sample to the reference sample library.

### Claim 9 (depends on 8)

The method of claim 8, further comprising: updating, using the sample, the index of the reference sample library.

### Claim 10 (depends on 7)

The method of claim 7, wherein the language processing model supports multimodal processing and in-context learning, and the multimodal processing comprises processing for at least one of: text, image, audio, or video.

### Claim 11

(canceled)

### Claim 12

An electronic device, comprising:
at least one processing unit; and
at least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions, when executed by the at least one processing unit, causing the electronic device to perform acts comprising:
in response to receiving the user request, determining a reference prompt matching the user request;
determining a set of reference samples matching the user request, wherein a reference sample in the set of reference samples comprises a reference user request and a reference response for the reference user request, and a task type specified by the user request is the same as a reference task type specified by the reference user request; and
generating a prompt for executing the user request based on the user request, the reference prompt, and the set of reference samples.

### Claim 13

A non-transitory computer-readable storage medium having stored thereon a computer program which, when executed by a processor, causes the processor to perform acts comprising:
in response to receiving the user request, determining a reference prompt matching the user request;
determining a set of reference samples matching the user request, wherein a reference sample in the set of reference samples comprises a reference user request and a reference response for the reference user request, and a task type specified by the user request is the same as a reference task type specified by the reference user request; and
generating a prompt for executing the user request based on the user request, the reference prompt, and the set of reference samples.

### Claim 14 (depends on 12)

The electronic device of claim 12, the acts further comprising: in response to determining that the number of samples associated with the task type is less than a predetermined threshold, performing the acts.

### Claim 15 (depends on 12)

The electronic device of claim 12, wherein determining the reference prompt comprises: selecting the reference prompt from a reference prompt library comprising a plurality of sample prompts, the reference prompt library generated based on a prompt associated with the task type; and
wherein determining the set of reference samples comprises: determining the set of reference samples from a reference sample library comprising a plurality of reference samples, the reference sample library generated based on samples associated with the task type.

### Claim 16 (depends on 15)

The electronic device of claim 15, wherein determining the set of reference samples comprises:
obtaining a feature representation of the user request; and
searching, using the feature representation, the reference sample library for the set of reference samples matching the feature representation.

### Claim 17 (depends on 16)

The electronic device of claim 16, wherein searching the reference sample library for the set of reference samples comprises: determining the set of reference samples using an index of the reference sample library, the index created based on the plurality of reference samples in the reference sample library.

### Claim 18 (depends on 12)

The electronic device of claim 12, wherein generating the prompt comprises:
updating the reference prompt using the set of reference samples; and
combining the updated reference prompt and the user request to generate the prompt.

### Claim 19 (depends on 17)

The electronic device of claim 17, the acts further comprising: generating, using a language processing model, a response to the user request based on the prompt.

### Claim 20 (depends on 19)

The electronic device of claim 19, the acts further comprising:
creating a sample based on the user request and the response, the sample comprising the user request and the response; and
adding the sample to the reference sample library.

### Claim 21 (depends on 20)

The electronic device of claim 20, the acts further comprising: updating, using the sample, the index of the reference sample library.
