Find answers from the community

Updated 2 months ago

Hi, I am using custom model from

Hi, I am using custom model from hugging face to generate embedding and then I am using Qdrant to store my documents along with their embeddings as shown below
Plain Text
MODEL = "mixedbread-ai/mxbai-embed-large-v1"

reader = SimpleDirectoryReader(input_dir="/content/data")
documents = reader.load_data()
embed_model = HuggingFaceEmbedding(model_name=MODEL)
vector_store = QdrantVectorStore(client=QDRANT_CLIENT, collection_name=collection_name)
storage_context = StorageContext.from_defaults(vector_store=vector_store)
index = VectorStoreIndex.from_documents(
    documents,
    storage_context=storage_context,
    embed_model=embed_model,
)

Now I want to make retriever which should be of the same model as of embedding model. And then to synthesize the final response I want to use gpt, How can I make retriever with the same embedding model that I used for document embeddings?
k
U
3 comments
Let me check the knowledge base for you. One moment! :books:
Sorry @Uzair, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist:

Perhaps try again in 15mins?
Can someone correct my concepts here (if I am wrong),

After creating an index, the retriever is utilized to fetch the most relevant texts (nodes), after which this information is passed to the synthesizer along with the prompt (if provided) to generate the final response. Right?

And the query engine is built on top of the index. Does this mean that if we utilize a model from Hugging Face to generate embeddings for indexing, and then we use this index to create a retriever, will this retriever be utilizing our embedding model or not?

Plain Text
retriever = VectorIndexRetriever(
   index=index,
    similarity_top_k=5,
) 
Add a reply
Sign up and join the conversation on Discord