Retrieval augmented generation using Elasticsearch and OpenAI - Part 23
The model will generate a response to the question, using the top kNN hit as context. Use the messages list to shape your prompt to the model. In this example, we're using the gpt-3.5-turbo model.