Replies: 5 comments 7 replies
-
Hey @johnhu33! 👋 I'm here to help you with any bugs, questions, or contributions while you wait for a human maintainer. Let's squash those bugs together! I found a similar closed issue that might be relevant: [Question]: Retriever documents, embeddings = None. The suggested solution is to modify the To store embeddings after inserting nodes into a
Here is a code snippet demonstrating these steps: # Assuming you have a VectorStoreIndex instance `index` and a list of nodes `nodes`
# Step 1: Generate embeddings for the nodes
nodes_with_embeddings = index._get_node_with_embedding(nodes)
# Step 2: Insert nodes with embeddings into the index
index._add_nodes_to_index(index._index_struct, nodes_with_embeddings) The |
Beta Was this translation helpful? Give feedback.
-
How to get node's corresponding embedding with node_id? |
Beta Was this translation helpful? Give feedback.
-
vector_store = VectorStoreIndex(redis_client=redis_client, overwrite=True, schema=schema) load storage contextstorage_context = StorageContext.from_defaults(vector_store=vector_store) build and load index from documents and storage contextindex = VectorStoreIndex.from_vector_store(vector_store=vector_store, embed_model=BGEEmbeddings()) index.insert_nodes(nodes) result_nodes[0].embedding is None How could I store index in the VectorStoreIndex? |
Beta Was this translation helpful? Give feedback.
-
I had a similar issue where the input embeddings were going in as one size and coming out as 1536. This happened because llama-index was defaulting to I resolved this by explicitly passing my embedding model during the indexing process. E.g. # Create your chosen embedding model at the top of the file
my_embed_model = FastEmbedEmbedding(model_name="BAAI/bge-base-en-v1.5")
# Create storage context
storage_context = StorageContext.from_defaults(vector_store=vector_store)
# Create the index from documents with chosen embeddings
index = VectorStoreIndex.from_documents(
documents,
storage_context=storage_context,
embed_model=my_embed_model, # Explicitly pass the embedding model
) |
Beta Was this translation helpful? Give feedback.
-
NGL It would have saved me a lot of time if there was a warning that this was happening... |
Beta Was this translation helpful? Give feedback.
-
Embedding is None after inserting nodes to a VectorStoreIndex that is initialised using from_vector_store, how can I store embeddings?
Beta Was this translation helpful? Give feedback.
All reactions