Retrieval augmented generation using Elasticsearch and OpenAI - Part 20
top_hit_summary = response['hits']['hits'][0]['_source']['text'] # Store content of top hit for final step
Success! We've used kNN to perform semantic search over our dataset and found the top results.