Find answers from the community

Updated 2 years ago

does this help

At a glance

The post suggests that community members can directly ask their questions on the documentation chat bot. The comments discuss issues with accessing document embeddings in the GPT Index library. Community members tried to print the embeddings, but encountered issues - the doc.embedding attribute returned None even though the embeddings were present in the vector_store.json file. A community member suggested exploring the index._vector_store to look up the embeddings directly. Another community member provided a specific way to access the embeddings using index._vector_store.__dict__["_data"].embedding_dict[doc_id]. However, there is no explicitly marked answer on how to query the index using embeddings.

Useful resources
does this help?
I think you can directly ask your questions on their documentation chat bot...
n
A
10 comments
I was able to iterate documents like this:
Plain Text
for doc_id in index.docstore.docs:
    doc = index.docstore.docs[doc_id]
    print(doc.embedding)
But doc.embedding returns None 😦
Even though I can see embedding vectors in vector_store.json
yeah I also tried to print these embeddings just to see them, but i was also not able to see anything
I don't know if it's the proper way to 'print' them , there might be something else..
I am exploring index._vector_store now to see if I can lookup embeddings there
lemme know if you find anything
@AvishWagde try this πŸ™‚
Plain Text
index._vector_store.__dict__["_data"].embedding_dict[doc_id]
How do I query the index by embedding though?
Add a reply
Sign up and join the conversation on Discord