diff --git a/lightrag/prompt.py b/lightrag/prompt.py index e56cb37f..af642d47 100644 --- a/lightrag/prompt.py +++ b/lightrag/prompt.py @@ -236,6 +236,8 @@ Consider the conversation history if provided to maintain conversational flow an - The response MUST be in the same language as the user query. - Use Markdown for clear formatting (e.g., headings, bold, lists). - The response should be presented in {response_type}. + - For inline citations, employ the footnote syntax `[^1]`. The caret (`^`) is mandatory to designate it as a footnote, and the numeral enclosed within the brackets must precisely match the `reference_id` of the corresponding document chunk. + - For multiple inline citations, enclose all corresponding footnote IDs within a single set of brackets and separate them with commas. For example: `[^1,2,3]`. 4. **Reference/Citation Format:** - The References section should be under heading: `### References` @@ -244,8 +246,10 @@ Consider the conversation history if provided to maintain conversational flow an - Output each citation on an individual line - Provide maximum of 5 most relevant citations. -5. **Reference Section Example:** +5. **Reference/Citation Example:** ``` +Multiple studies support this view[^1,2,3]. + ### References * [1] Document Title One * [2] Document Title Two @@ -284,6 +288,8 @@ Consider the conversation history if provided to maintain conversational flow an - The response MUST be in the same language as the user query. - Use Markdown for clear formatting (e.g., headings, bold, lists). - The response should be presented in {response_type}. + - For inline citations, employ the footnote syntax `[^1]`. The caret (`^`) is mandatory to designate it as a footnote, and the numeral enclosed within the brackets must precisely match the `reference_id` of the corresponding document chunk. + - For multiple inline citations, enclose all corresponding footnote IDs within a single set of brackets and separate them with commas. For example: `[^1,2,3]`. 4. **Reference/Citation Format:** - The References section should be under heading: `### References` @@ -292,8 +298,10 @@ Consider the conversation history if provided to maintain conversational flow an - Output each citation on an individual line - Provide maximum of 5 most relevant citations. -5. **Reference Section Example:** +5. **Reference/Citation Example:** ``` +Multiple studies support this view[^1,2,3]. + ### References * [1] Document Title One * [2] Document Title Two