Find answers from the community

Home
Members
Sachin Singh
S
Sachin Singh
Offline, last seen 6 months ago
Joined September 25, 2024
I'm using as_chat_engine to stream the chat.
chat_engine = index.as_chat_engine( streaming=True, similarity_top_k=5, chat_mode="condense_plus_context", llm=llm, response_synthesizer=response_synthesizer, node_postprocessors=[SentenceEmbeddingOptimizer(threshold_cutoff=0.8)], verbose=True, system_prompt=( """Where possible use bulleted list and good formatting to help understand the content better. Please note to answer the questions within the context of the documents provided.""" ), ) response = chat_engine.stream_chat(query) sources = [] for node in response.source_nodes: sources.append(node.node.metadata["file_name"] + " (score="+ str(node.score) + ")")

I'm getting the response-
The document does not have any specify answer.

but still getting the sources and scores 0.83, can anyone help me here how I'm getting the scores if documents does not have relevant answers ?
I don't want to show the sources and scores if it doesn't have relevant answer.
1 comment
W