Selecting the number of chunks to use as context when doing RAG?

Bao, Jeremy (Cognizant) 90 Reputation points
2024-03-18T21:51:14.91+00:00

When you are using the Python SDK for Azure OpenAI to generate text based on user input and RAG, how do you specify the number of chunks of text to use as context?

I read that it involves some parameter called "topNDocuments," but where does that go? It is not recognized as an argument to client.chat.completions.create().

Azure OpenAI in Foundry Models

1 answer

Sort by: Oldest
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.

    1 deleted comment

    Comments have been turned off. Learn more

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.