From 6f5503ebd6d8e2e440105dd88336156b337aae5c Mon Sep 17 00:00:00 2001 From: yangdx Date: Sun, 2 Feb 2025 04:22:43 +0800 Subject: [PATCH] Update similarity_check prompt to avoid generating two scores sometiimes --- lightrag/prompt.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lightrag/prompt.py b/lightrag/prompt.py index 913f8eef..160663d9 100644 --- a/lightrag/prompt.py +++ b/lightrag/prompt.py @@ -290,9 +290,8 @@ PROMPTS[ Question 1: {original_prompt} Question 2: {cached_prompt} -Please evaluate the following two points and provide a similarity score between 0 and 1 directly: -1. Whether these two questions are semantically similar -2. Whether the answer to Question 2 can be used to answer Question 1 +Please evaluate whether these two questions are semantically similar, and whether the answer to Question 2 can be used to answer Question 1, provide a similarity score between 0 and 1 directly. + Similarity score criteria: 0: Completely unrelated or answer cannot be reused, including but not limited to: - The questions have different topics