I have a set of lines. I am embedding each line using “text-embedding-3-large” and saving it into the vector DB with metrics as cosine and 3072 as dimension. I have only 20 lines as sample data. During a query, even If I try with a single word during the search, I am not getting a proper response.
Sample code to insert the sample data
embed_model = AzureOpenAIEmbeddings(
model=“text-embedding-3-large”,
api_key=os.getenv(‘OPENAI_API_KEY’),
azure_endpoint=os.getenv(‘OPENAI_END_POINT’),
api_version=os.getenv(‘OPENAI_API_VERSION’),
)
embedding =embed_model.embed_documents(line_from_sample_file.strip())
index.upsert([(str(row[0]), embedding[0], {“title”: “RCA”, “text”: .strip()})])
Sample code to query the sample data
question=“<sample text”
embed_model.embed_documents(question)
anything, I am missing in this flow?
2 posts - 2 participants