Find answers from the community

Updated 7 months ago

How can I create a chat engine from the

How can I create a chat engine from the Retriever query engine?
Plain Text
query_engine = RetrieverQueryEngine.from_args(
                        retriever=hybrid_retriever,
                        node_postprocessors=[cohere_rerank],
                        llm=llm,
                    )
W
H
L
3 comments
Try with this:
Plain Text
from llama_index.core.chat_engine.condense_question import CondenseQuestionChatEngine

chat_engine = CondenseQuestionChatEngine(query_engine=query_engine,...)
Yes, I found it on the document.
But hybrid with chat engine facing more hallucination
You can try customizing some prompts (like how the question gets condensed), or try a different chat engine like using a query engine tool with an agent and appropriate system prompt, or using the retriever with a condense + context chat engine with appropraite prompts
Add a reply
Sign up and join the conversation on Discord