Skip to content

Conversation

zxuexingzhijie
Copy link
Collaborator

目前用户可以添加提示词干扰用户报告输出内容
这是前端界面,可能要优化一下,配置的提示词如下:
860cf49fb8a160f7a6a5a1859d89b21

在配置提示词后,用户提问如下:
查询每个商品分类下,已成交且销量最高的商品及其销售总量。每个分类仅返回销量最高的商品。不要用Python

结果如下:
a3d9b5811be586ad75cbf870c5081b9
image
发现可以成功干预

在没有配置提示词,用户相同提问下,就没有出现上述图中标红的部分:
image

@github-actions github-actions bot added the area/nl2sql SAA nl2sql module label Aug 12, 2025
@zxuexingzhijie zxuexingzhijie requested a review from Copilot August 12, 2025 06:56
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the prompt word configuration system to support multiple optimization configurations and prevent user prompt interference. The changes move from a single custom prompt replacement system to a multi-configuration optimization approach that enhances the original prompt template.

  • Restructured UI to use a new PromptOptimizationConfig component for better configuration management
  • Modified backend services to support multiple prompt optimization configurations instead of single prompt replacement
  • Updated the report generator to apply optimization configurations additively to the base template

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
AgentDetail.vue Replaced inline prompt configuration section with new PromptOptimizationConfig component
PromptOptimizationConfig.vue New component for managing multiple prompt optimization configurations with CRUD operations
PromptConfigController.java Updated controller comments and added endpoint for retrieving all active optimization configs
report-generator.txt Added optimization_section placeholder to the prompt template
UserPromptConfigService.java Refactored to support multiple active configurations with in-memory caching
PromptHelper.java Updated to build optimization sections from multiple configs instead of replacing entire prompt
ReportGeneratorNode.java Modified to use optimization configs instead of custom prompt replacement
UserPromptConfig.java Updated entity documentation to reflect optimization usage
PromptConfigDTO.java Renamed systemPrompt field to optimizationPrompt to better reflect usage

@zhangshenghang zhangshenghang merged commit 05001d2 into alibaba:main Aug 19, 2025
13 of 14 checks passed
@zxuexingzhijie zxuexingzhijie deleted the Makoto-dataagent-reporter branch September 9, 2025 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/nl2sql SAA nl2sql module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants