Hi, with ContextChatEngine is there any reliable way to get answers
only from the context? Pretty often, I face the situation when it can't find the relevant data in the context and takes it from its generic knowledge what is usually pretty wrong. Thanks.
retriever = index.as_retriever(verbose=True, chat_mode="context", similarity_top_k=similarity_top_k)
# CustomContext inherits the ContextChatEngine, and just has a small changes for the best results.
custom_chat_engine = CustomContext.from_defaults(
retriever=retriever,
memory=chatmemory,
context_template=generate_context_template(),
system_prompt=prepared_system_prompt,
node_postprocessors=[CustomPostprocessor(
context_limit, query_text + prepared_system_prompt, project.db_name, None)])
response = custom_chat_engine.chat(query_text, chat_history=chat_history)