One example method includes receiving a set of reranking models, and a dataset that comprises questions posed by a user, and also comprises expected source documents responsive to the questions, using the set of reranking models, and the dataset, to identify a best combination set of reranking models, using the set of reranking models, and the dataset to determine best respective weights for each of the reranking models, using, in a RAG (retrieval-augmented generation) pipeline, the best combination set of reranking models, and the best respective weights for each of the reranking models, to rank documents, collectively identified by the reranking models, to the questions, and one or more best documents, from among the documents, are ranked highest, and returning the best documents to the user.