| CPC G06F 16/335 (2019.01) [G06F 16/33295 (2025.01); G06F 40/30 (2020.01)] | 20 Claims |

|
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.
|