Find answers from the community

Updated last year

How do I inspect the reference docs that

How do I inspect the reference docs that I'm attempting to insert into a chroma vector store? I'm creating a persistent chroma vector store and then loading it and refreshing the ref docs with the following, but I can't tell if the docs I'm passing to refresh are actually being stored and saved to disk properly.
vector_store = ChromaVectorStore(chroma_collection=chroma_collection) storage_context = StorageContext.from_defaults( docstore=SimpleDocumentStore.from_persist_dir(storage_params["persist_dir"]), vector_store=vector_store, index_store=SimpleIndexStore.from_persist_dir(storage_params["persist_dir"]), ) service_context = ServiceContext.from_defaults(callback_manager=callback_manager, llm=llm, embed_model=OpenAIEmbedding(embed_batch_size=50), node_parser=node_parser) vector_index = VectorStoreIndex([], storage_context=storage_context, service_context=service_context, store_nodes_override=vector_index_params["store_nodes_override"]) results = vector_index.refresh_ref_docs(data)
Now that I've run refresh_ref_docs() how do I verify the refresh worked and persisted the docs/nodes/embeddings? thanks kindly!
L
t
4 comments
results = vector_index.refresh_ref_docs(data) will return a list of booleans, where if it's true that means that the document inserted as a new document or updated

Other than that, I'm not sure if chroma has any utilities allowing you to inspect the vector store, might have to read some chroma docs for that πŸ˜…
ok thanks Logan. I did find a readme about a Chroma Reader, have you used that? I'm unclear how the reader differs from a vector_store.as_query_engine() https://gpt-index.readthedocs.io/en/stable/community/integrations/vector_stores.html#vector-store-index I'll see if I can figure this Reader out. thanks!
I haven't used the reader, but it looks a little clunky haha

I guess I meant reading the chroma docs instead. The collection has a get function which might be helpful https://docs.trychroma.com/reference/Collection#get
ok will do. cheers /0_o
Add a reply
Sign up and join the conversation on Discord