diff --git a/lightrag/prompt.py b/lightrag/prompt.py index 9c61041b..6230197b 100644 --- a/lightrag/prompt.py +++ b/lightrag/prompt.py @@ -61,7 +61,13 @@ You are a Knowledge Graph Specialist responsible for extracting entities and rel """ PROMPTS["entity_extraction_user_prompt"] = """---Task--- -Extract entities and relationships from the input text below. +Extract entities and relationships from the input text in Data to be Processed below. + +---Instructions--- +1. **Strict Adherence to Format:** Strictly adhere to all format requirements for entity and relationship lists, including output order, field delimiters, and proper noun handling, as specified in the system prompt. +2. **Output Content Only:** Output *only* the extracted list of entities and relationships. Do not include any introductory or concluding remarks, explanations, or additional text before or after the list. +3. **Completion Signal:** Output `{completion_delimiter}` as the final line after all relevant entities and relationships have been extracted and presented. +4. **Output Language:** Ensure the output language is {language}. Proper nouns (e.g., personal names, place names, organization names) must be kept in their original language and not translated. ---Data to be Processed--- @@ -72,12 +78,6 @@ Extract entities and relationships from the input text below. {input_text} ``` ----Instructions--- -1. **Strict Adherence to Format:** Strictly adhere to all format requirements for entity and relationship lists, including output order, field delimiters, and proper noun handling, as specified in the system prompt. -2. **Output Content Only:** Output *only* the extracted list of entities and relationships. Do not include any introductory or concluding remarks, explanations, or additional text before or after the list. -3. **Completion Signal:** Output `{completion_delimiter}` as the final line after all relevant entities and relationships have been extracted and presented. -4. **Output Language:** Ensure the output language is {language}. Proper nouns (e.g., personal names, place names, organization names) must be kept in their original language and not translated. - """