import pandas as pd
import numpy as np
import openai
from openai.embeddings_utils import get_embedding, cosine_similarity
openai.api_key = 'sk-????'
embedding_model = "text-embedding-ada-002"
embedding_encoding = "cl100k_base"
max_tokens = 8000
data_source = pd.read_csv("<Your_File>")
query_vector =np.array(get_embedding(data_source["query_variable"])).reshape(1, -1)
searched_vector = np.array(data_source["search_variable"]).reshape(1, -1)
similarity = cosine_similarity(query_vector, searched_vector.T)[0][0]