Similar content fetching instead of whole document from the multiple documents.

Hi everyone, I am trying to utilize the Vectara for my RAG use case.

What I am trying to do:- I have multiple documents, having SOPs as content in each document. I have indexed each document on the Vectara platform and trying to run a query to fetch the steps from the most relevant SOP document. I want all the steps mentioned in that particular SOP.

What is currently happening:- The retrieved result contains some specific points from the multiple documents having similar content and it summarizes all of them with having the final answer as steps from multiple documents.

Expectation:- I want the whole document to have the highest similarity with my query.

Can anyone provide which parameter I should be tuning to get the expected result? Or what should I do in this scenario?


I think the best approach would be to look at the results and specifically in responseSet, there is an array of responses.
Every response object has the relevant docId pertaining to this response, and a score.

The response with the highest score is the one you are looking for. The response also contains the documentIndex through which you will know which document this response is from.