feat(prompt): enhance question rewriting and intent classification in prompt templates
- Updated the prompt template to clarify the task of understanding and rewriting user questions, improving the instructions for coreference resolution and ellipsis completion. - Renamed sections for better clarity, changing "Rewriting Goals" to "Query Understanding." - Added critical notes for intent classification regarding image and document attachments, ensuring accurate processing based on the presence of attachments. - Improved examples to reflect the updated intent classification logic, enhancing the overall user experience in query handling.
This commit is contained in:
@@ -321,9 +321,13 @@ func (p *PluginQueryUnderstand) buildPrompts(chatManage *types.ChatManage, histo
|
||||
queryContent := chatManage.Query
|
||||
if len(chatManage.Images) > 0 {
|
||||
queryContent += fmt.Sprintf("\n\n<images_uploaded count=\"%d\" />", len(chatManage.Images))
|
||||
} else {
|
||||
queryContent += "\n\n<no_image_attached />"
|
||||
}
|
||||
if len(chatManage.Attachments) > 0 {
|
||||
queryContent += chatManage.Attachments.BuildPrompt()
|
||||
} else {
|
||||
queryContent += "\n<no_document_attached />"
|
||||
}
|
||||
|
||||
vals := types.PlaceholderValues{
|
||||
|
||||
Reference in New Issue
Block a user