Find answers from the community

Updated 5 months ago

hello, is there a way to use hybrid

At a glance

The community member is looking for a way to integrate hybrid search, reranking, and a chat engine. A community member suggests using a custom retriever, as shown in an example from the LlamaIndex documentation, which can be passed to the chat engine. The chat engine can then use the hybrid search and reranking capabilities. Another community member asks if the custom retriever would work with ChromaDB, and the first community member confirms that it should work.

Useful resources
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