-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve prompts to avoid LLM make up answer #681
Improve prompts to avoid LLM make up answer #681
Conversation
…prompt-prevent-make-up-answer
…prompt-prevent-make-up-answer
… very long context is provided.
Great update. |
Thx :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One typo to fix, but other than that it looks correct to me
lightrag/prompt.py
Outdated
Generate a response of the target length and format that responds to the user's question, considering both the conversation history and the current query. Summarize all information in the input data tables appropriate for the response length and format, and incorporating any relevant general knowledge. | ||
If you don't know the answer, just say so. Do not make anything up. | ||
Do not include information where the supporting evidence for it is not provided. | ||
GGenerate a concise response based on Document Chunks and follow Response Rules, considering both the conversation history and the current query. Summarize all information in the provided Document Chunks, and incorporating general knowledge relevant to the Document Chunks. Do not include information not provided by Document Chunks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix the typo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Thx.
Improve prompts to avoid make-up respond from LLM like qwen-plus when very long context is provided.
The original prompts, when the context length is sufficient, may cause certain models (such as qwen-plus) to deviate from the prompt's guidance and fabricate answers using their own knowledge. Sometimes, large language models switch to English instead of responding in the questioner's language.
The new prompts aim to strengthen the constraints and guidance capabilities over LLMs, and have achieved good results in actual testing.