Find answers from the community

Updated 4 months ago

hello, is there a way to use hybrid

At a glance
hello, is there a way to use hybrid search with reranking with a chat_engine ? I looked nearly through the whole documentation and found nothing about how to integrate these three components together ?
W
g
4 comments
There may not be direct example but you can add pieces together. For example: https://docs.llamaindex.ai/en/stable/examples/query_engine/CustomRetrievers/?h=hybrid+search#plugin-retriever-into-query-engine

In this example it shows you a simple hybrid search and creates a custom retriever. You can pass on this retriever in Chat Engine. Some chat engine takes retriever and some take QueryEngine. You get both in this example.

Plain Text
chat_engine = CondensePlusContextChatEngine.from_defaults(retriever=retriever,system_prompt = DEFAULT_SYSTEM_PROMPT,memory = LlamaIndexBot.chat_memory, node_postprocessor[FlagEmbeddingReranker(top_n=2, model=RERANKER_MODEL)] )

This will give you a chat engine with mix of hybrid search + reranking + chat engine
would the custom retriver work with chromadb ? I save the embeddings in a local chromadb collection, was wondering how it handles the two types of vectors needed for hybrid search, can they be stored together in chromadb or does it have to be something different ?
and btw thank you so much for pointing me in the right direction, I was starting to look at workflow thinking it's the only way to do it πŸ˜…
It should work imo
Add a reply
Sign up and join the conversation on Discord