Search data
Once the data is put into Tair, we can start asking some questions. A question will be automatically vectorized by the OpenAI model, and the created vector will be used to find some possibly matching answers in Tair. Once retrieved, the most similar answers will be incorporated into the prompt sent to the OpenAI Large Language Model.

import random

random.seed(52)
selected_questions = random.choices(questions, k=5)

import time
for question in selected_questions:
    print(">", question)
    print(qa.run(question), end="\n\n")
    # wait 20 seconds because of the rate limit
    time.sleep(20)