Find answers from the community

Updated 8 months ago

but the config is correct

but the config is correct
L
c
10 comments
this is with qdrant right? You need to enable hybrid
QdrantVectorStore(..., enable_hybrid=True)
Yeah I’m doing this
You sure? Because the only way that error would pop up is if you didn't do that
I can publish my code
If you can replicate in Google colab, that would probably be best
Plain Text
    hybrid_retriever = index.as_retriever(
        vector_store_query_mode=VectorStoreQueryMode.HYBRID,
        similarity_top_k=top_k,
        sparse_top_k=10,
        enable_hybrid=True,
    
    )
    logger.success("retriever created")
    response_synthesizer = get_response_synthesizer(
        llm=llm,
        text_qa_template=qa_prompt,
        response_mode="compact",
    )
    logger.success("response synthesizer created")

    # todo find how to use tokenizer
    chat_template = open(
        "../../resources/chat_templates/chat_templates/mistral-instruct.jinja"
    ).read()
    chat_template = chat_template.replace("    ", "").replace("\n", "")
    # tokenizer.chat_template = chat_template

    query_engine = RetrieverQueryEngine(
        retriever=hybrid_retriever,
        node_postprocessors=[SimilarityPostprocessor(similarity_cutoff=0.5)],
        response_synthesizer=response_synthesizer,
        callback_manager=Settings.callback_manager,
    )
`
Enable hybrid doesn't go there
It goes in the constructor
QdrantVectorStore(..., enable_hybrid=True)
Add a reply
Sign up and join the conversation on Discord