# US 2026/0093734 A1 · Systems and methods for natural language based coding assistance with enterprise context

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

- Number: US 2026/0093734 A1
- Document ID: US20260093734A1
- Status: Published application
- Kind: A1
- Application number: 18/899,446
- Filed: 2024-09-27
- Published: 2026-04-02
- Earliest claimed: 2024-09-27
- Assignees: Amazon Technologies, Inc.
- Applicants: Amazon Technologies, Inc.
- Inventors: Rajdeep MUKHERJEE; Ajay MISHRA; Qing SUN; Mehdi SHOJAIE; Dejiao ZHANG; Arash MASHHADI FARAHANI; Xiaofei MA; Anoop DEORAS
- Web page: https://patentgrep.com/patent/US20260093734A1

## CPC

- G06F 16/3329: Natural language query formulation
- G06F 16/3344: {using natural language analysis}
- G06F 8/33: Intelligent editors
- G06F 8/75: Structural analysis for program understanding
- G06F 16/3338: {Query expansion}
- G06F 16/3347: {using vector based model}
- G06F 16/335: Filtering based on additional data, e.g. user or group profiles (filtering in web context G06F16/9535, G06F16/9536)
- G06F 16/338: Presentation of query results
- G06F 40/30: Semantic analysis
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Techniques for natural language based chat are described. In some examples, a chat service receive a request to answer a natural language query (NLQ), generate one or more embedding vectors for the NLQ, performs a search of a vector database having information regarding one or more of enterprise context, natural language summaries of enterprise context, embedding vectors for the enterprise context, and embedding vectors for natural language summaries of the enterprise context according to the request to generate a search result, augmenting the NLQ using the search result, predicts a response for the NLQ using the search result augmented NLQ, and provides the predicted response in the chat.

## Claims

### Claim 1

A computer-implemented method comprising:
generating an index of a codebase by at least (i) chunking source code of the codebase to extract function-level and class-level code chunks, (ii) generating respective natural language summaries of the code chunks, (iii) creating respective semantic vector embeddings of the code chunks and the natural language summaries, and (iv) storing the code chunks and the respective natural language summaries and respective semantic vector embeddings in a search index;
receiving, from a user, a natural language query (NLQ) about the codebase in a chat interface an integrated development environment;
generating one or more embedding vectors for the NLQ;
performing multi-strategy retrieval on the index of the codebase using the one or more embedding vectors for the NLQ, wherein the multi-strategy retrieval includes performing lexical search on the code chunks and natural language summaries and semantic search on the vector embeddings, and combining results from the lexical and semantic searches using hybrid scoring;
retrieving particular ones of the code chunks and their respective natural language summaries based on the hybrid scoring;
generating a response to the NLQ using a prompt to a language model that has been augmented with the retrieved code chunks and their respective natural language summaries; and
providing the response to the user via the chat interface.

### Claim 2 (depends on 1)

The computer-implemented method of claim 1, further comprising:
using contextual information to re-write the received natural language query.

### Claim 3 (depends on 1)

The computer-implemented method of claim 1, wherein the NLQ is a request to perform one or more of providing explanation of a segment of code using contextual information, performing code refactoring, performing knowledge gathering, performing code analysis, generating code using contextual information, and/or performing code debugging.

### Claim 4

A computer-implemented method comprising:
receiving a request to answer a natural language query (NLQ);
generating one or more embedding vectors for the NLQ;
performing a search of a vector database having information regarding one or more of enterprise context, natural language summaries of enterprise context, embedding vectors for the enterprise context, and embedding vectors for natural language summaries of the enterprise context according to the request to generate a search result;
augmenting the NLQ using the search result;
predicting a response for the NLQ using the search result augmented NLQ; and
providing the predicted response.

### Claim 5 (depends on 4)

The computer-implemented method of claim 4, further comprising:
using contextual information to re-write the received natural language query.

### Claim 6 (depends on 4)

The computer-implemented method of claim 4, wherein the performing a search of a vector database having information regarding one or more of enterprise context, natural language summaries of the enterprise context, embedding vectors for the enterprise context, and embedding vectors for natural language summaries of the enterprise context according to the request to generate a search result comprises performing a lexical search on the code and related documents of the enterprise context and natural language summaries of the enterprise context.

### Claim 7 (depends on 4)

The computer-implemented method of claim 4, wherein the performing a search of a vector database having information regarding one or more of enterprise context, natural language summaries of the enterprise context, embedding vectors for the enterprise context, and embedding vectors for natural language summaries of the enterprise context according to the request to generate a search result comprises performing a semantic search on the embedding vectors for the enterprise context and embedding vectors for natural language summaries of the enterprise context.

### Claim 8 (depends on 4)

The computer-implemented method of claim 4, wherein the performing a search of a vector database having information regarding one or more of enterprise context, natural language summaries of the enterprise context, embedding vectors for the enterprise context, and embedding vectors for natural language summaries of the enterprise context according to the request to generate a search result comprises performing a lexical search and a semantic search.

### Claim 9 (depends on 4)

The computer-implemented method of claim 4, wherein the NLQ is a request to generate code using contextual information.

### Claim 10 (depends on 4)

The computer-implemented method of claim 4, wherein the NLQ is a request to explain a segment of code using contextual information.

### Claim 11 (depends on 4)

The computer-implemented method of claim 4, wherein the NLQ is a request to perform code debug.

### Claim 12 (depends on 4)

The computer-implemented method of claim 4, wherein the NLQ is received via an integrated development environment (IDE).

### Claim 13 (depends on 4)

The computer-implemented method of claim 4, further comprising:
ingesting the code repository and related documents;
chunking the ingested code repository into function and/or class-level chunks;
generating natural language summaries of the chunks using a first machine learning model;
generating embedding vectors for the chunks using a second machine learning model;
generating embedding vectors for the chunks using the second using a machine learning model;
indexing the chunks with their associated generated embedding vectors into a vector database; and
indexing the chunks with their associated summaries into the vector database.

### Claim 14 (depends on 13)

The computer-implemented method of claim 13, wherein the vector database is maintained by a search and database service.

### Claim 15 (depends on 4)

The computer-implemented method of claim 4, wherein predicting a response for the NLQ using the search result augmented NLQ is to be performed using a model fine-tuned on aspects of the enterprise context.

### Claim 16 (depends on 4)

The computer-implemented method of claim 4, wherein the enterprise context at least includes code and documents related to the code.

### Claim 17

A system comprising:
a first one or more computing devices to implement a storage service in a multi-tenant provider network; and
a second one or more computing devices to implement a natural language query service in the multi-tenant provider network, the natural language query service including instructions that upon execution cause the natural language query service to:
receive a request to answer a natural language query (NLQ);
generate one or more embedding vectors for the NLQ;
perform a search of a vector database having information regarding one or more of enterprise context, natural language summaries of enterprise context, embedding vectors for the enterprise context, and embedding vectors for natural language summaries of the enterprise context according to the request to generate a search result;
augment the NLQ using the search result;
predict a response for the NLQ using the search result augmented NLQ; and
provide the predicted response.

### Claim 18 (depends on 17)

The system of claim 17, wherein the NLQ is a request to perform code refactoring.

### Claim 19 (depends on 17)

The system of claim 17, wherein the NLQ is a request to perform knowledge gathering.

### Claim 20 (depends on 17)

The system of claim 17, wherein the NLQ is a request to perform code analysis.
