US 12,405,985 B1
Retrieval-augmented generation processing using dynamically selected number of document chunks
Ramakanth Kanagovi, Hyderabad (IN); Gaurav Bhattacharjee, Bangalore (IN); and Ravi Shukla, Bangalore (IN)
Assigned to Dell Products L.P., Round Rock, TX (US)
Filed by Dell Products L.P., Round Rock, TX (US)
Filed on Dec. 12, 2024, as Appl. No. 18/978,284.
Int. Cl. G06F 16/00 (2019.01); G06F 16/3329 (2025.01); G06F 16/335 (2019.01); G06F 40/30 (2020.01)
CPC G06F 16/335 (2019.01) [G06F 16/33295 (2025.01); G06F 40/30 (2020.01)] 20 Claims
OG exemplary drawing
 
1. An apparatus comprising:
at least one processing device comprising a processor coupled to a memory;
the at least one processing device being configured:
to obtain a query, the query comprising search text and a context, the context identifying one or more documents to be searched using the search text;
to generate a plurality of document chunks by parsing the one or more documents, each of the plurality of document chunks comprising a portion of content of one of the one or more documents;
to determine a degree of specificity of the search text in the query;
to determine, based at least in part on the determined degree of specificity of the search text, a number of the plurality of document chunks to select for retrieval-augmented generation processing;
to select a subset of the plurality of document chunks based at least in part on determining a similarity between content of the plurality of document chunks and the search text, the subset including the determined number of the plurality of document chunks;
to generate, based at least in part on the query, a prompt for input to a machine learning system, the prompt comprising the selected subset of the plurality of document chunks;
to apply the prompt to the machine learning system to generate an output; and
to provide an answer to the query based at least in part on the output of the machine learning system.