From e0a755e42cef804a8c6be3dfea8e48a805a8a523 Mon Sep 17 00:00:00 2001 From: yangdx Date: Tue, 26 Aug 2025 18:28:57 +0800 Subject: [PATCH] Refactor prompt instructions to emphasize depth and completeness --- lightrag/prompt.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lightrag/prompt.py b/lightrag/prompt.py index ce78f8a6..586f7ae6 100644 --- a/lightrag/prompt.py +++ b/lightrag/prompt.py @@ -141,11 +141,10 @@ Your task is to synthesize a list of descriptions of a given entity or relation ---Instructions--- 1. **Comprehensiveness:** The summary must integrate key information from all provided descriptions. Do not omit important facts. -2. **Consistency:** If the descriptions contain contradictions, you must resolve them to produce a logically consistent summary. If a contradiction cannot be resolved, phrase the information neutrally. -3. **Context:** The summary must explicitly mention the name of the entity or relation for full context. -4. **Style:** The output must be written from an objective, third-person perspective. -5. **Conciseness:** Be concise and avoid redundancy. The summary's length must not exceed {summary_length} tokens. -6. **Language:** The entire output must be written in {language}. +2. **Context:** The summary must explicitly mention the name of the entity or relation for full context. +3. **Style:** The output must be written from an objective, third-person perspective. +4. **Length:** Maintain depth and completeness while ensuring the summary's length not exceed {summary_length} tokens. +5. **Language:** The entire output must be written in {language}. ---Data--- {description_type} Name: {description_name}