Speculative retrieval proxy for retrieval augmented generation
Патент · US B1
Полный текст
Aspects of the present disclosure involve efficient retrieval-augmented generation. Aspects include generating, by a first machine learning model based on a query and a knowledge corpus, a draft context comprising candidate knowledge items, and a first sufficiency score indicating a likelihood that the draft context is sufficient for the query. Aspects include generating, by a second machine learning model, based on the query and the draft context, a second sufficiency score indicating a corresponding likelihood that the draft context is sufficient for the query. Aspects include performing, based on the second sufficiency score and the first sufficiency score, one of: selecting the draft context as a generation context; or performing a comprehensive retrieval augmented generation process using the knowledge corpus to determine an alternative context for the query and selecting the alternative context as the generation context. Aspects include generating a response to the query based on the generation context.