Skip to content

qdrant_client.http.exceptions.UnexpectedResponse: Unexpected Response: 400 (Bad Request) #145

@settur1409

Description

@settur1409

Current Behavior

Getting qdrant_client.http.exceptions.UnexpectedResponse: Unexpected Response: 400 (Bad Request) when performing
retriever.retrieve(query)

Steps to Reproduce

  1. using FastEmbedEmbedding(model_name="sentence-transformers/all-MiniLM-L6-v2") from from llama_index.embeddings.fastembed (https://qdrant.github.io/fastembed/examples/Supported_Models/)
    Settings.embed_model = embed_model

  2. self.client = QdrantClient(url=url, api_key=qdrant_api_key)

    self.client.recreate_collection(
        collection_name=collection_name,
        vectors_config=VectorParams(size=384, distance=Distance.COSINE),
    )
    
    self.vector_store = QdrantVectorStore(client=self.client, collection_name=collection_name, )
    self.index = VectorStoreIndex.from_vector_store(vector_store=self.vector_store)
    
  3. ch_engine = index.as_chat_engine(llm=llm, chat_mode='openai')
     retriever = index.as_retriever()
    
  4.  retriever.retrieve(query) --> sending query as str.
    

I am getting below error,
qdrant_client.http.exceptions.UnexpectedResponse: Unexpected Response: 400 (Bad Request)
Raw response content:
b'{"status":{"error":"Wrong input: Vector inserting error: expected dim: 384, got 1536"},"time":0.00039087}'

the embedding model supports only 384 dim, not sure from where 1536 is coming into picture.

Expected Behavior

Embedding seems not applied to query and I see there is no way to input embedding algo while creating index

Possible Solution

Context (Environment)

Detailed Description

Possible Implementation

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingllama indexLlama Index with FastEmbed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions