ValueError: shapes (176,768) and (1536,) not aligned: 768 (dim 1) != 1536 (dim 0)
qdrant_vectorstore_client = qdrant_client.QdrantClient( location=":memory:" ) fastembed_model = FastEmbedEmbedding(model_name="BAAI/bge-base-en-v1.5") vector_store = QdrantVectorStore(client=qdrant_vectorstore_client, collection_name=collection_name) pipeline = IngestionPipeline( transformations=[ TokenTextSplitter(), fastembed_model ], vector_store=vector_store ) documents = [...] pipeline.run(documents=documents) index = VectorStoreIndex.from_vector_store(vector_store=vector_store) retriever = index.as_retriever(similarity_top_k=3) nodes_with_sources = retriever.retrieve("...") # <----- the error occurs here, why?
storage context
's default embedding model is ada-002, but I'm not defining storage context in my code, so it has to be defined by default somewhere, but where?VectorStoreIndex.from_vector_store
part. Now I need to figure out how to replace ada-002 with my embeddingindex = VectorStoreIndex.from_vector_store(vector_store=vector_store, service_context=service_context)
ServiceContext
and it has everything I've defined in IngestionPipeline
(splitter, embedding model). Do I need to remove IngestionPipeline
and declare my splitter in service context? Or is my code okay?qdrant_vectorstore_client = qdrant_client.QdrantClient( location=":memory:" ) fastembed_model = FastEmbedEmbedding(model_name="BAAI/bge-base-en-v1.5") vector_store = QdrantVectorStore(client=qdrant_vectorstore_client, collection_name=collection_name) pipeline = IngestionPipeline( transformations=[ TokenTextSplitter(), fastembed_model ], vector_store=vector_store ) documents = [...] pipeline.run(documents=documents) service_context = ServiceContext.from_defaults(embed_model=fastembed_model) <----- adding this index = VectorStoreIndex.from_vector_store(vector_store=vector_store, service_context=service_context) retriever = index.as_retriever(similarity_top_k=3) nodes_with_sources = retriever.retrieve("...")
IngestionPipeline
or will ServiceContext
override configs from ingestion pipeline?