Skip to content

feat: Intent recognition: 1) The prompt template can be customized. 2) Output reason is configurable. 3) Show the system prompt in the execution detail.#4931

Open
wangliang181230 wants to merge 29 commits into1Panel-dev:v2from
wangliang181230:feat/intent-node/config-output-reason
Open

Conversation

@wangliang181230
Copy link
Contributor

@wangliang181230 wangliang181230 commented Mar 24, 2026

What this PR does / why we need it?

Intent recognition:

  1. feat: The prompt template can be customized.
  2. feat: Output reason is configurable.
  3. optimize: Show the system prompt in the execution detail.

Summary of your change

在使用部分大模型时,默认的系统提示词有时候还是无法很好的判断连续对话的连贯性,我认为是提示词与大模型的兼容性不好,或者对于所选大模型来说不够完善。
现将 提示词模板 做成可自定义,默认情况下填充原来的提示词模板。

注:经测试此次调整向下兼容,可安全升级。

  1. 新特性:意图识别 节点的 提示词模板 可自定义配置了(默认值根据语言变更)。

    1. 默认提示词模板截图:
    图片
    1. 可以自定义修改提示词模板,甚至可以提示大模型只输出意图ID数值,如图:
    图片
    1. 默认提示词按所选语言变更
  2. 新特性:意图识别 节点,是否输出理由 支持可配置化了;
    添加该功能的原因:在 生产环境 下,可以配置 不输出理由,能减少 意图识别 的耗时,还能稍微减少token消耗。
    一般在 开发、测试阶段 才需要开启它来观察意图识别的理由。

    界面截图:
    图片

  3. 优化:意图识别 的执行详情中,展示 系统提示词
    界面截图:
    图片

Please indicate you've done the following:

  • Made sure tests are passing and test coverage is added if needed.
  • Made sure commit message follow the rule of Conventional Commits specification.
  • Considered the docs impact and opened a new docs issue or PR with docs changes if needed.

@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Mar 24, 2026

Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Mar 24, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@wangliang181230 wangliang181230 changed the title feat: Configurable output of the reason for Intent recognition feat: Intent recognition whether to output "reason" is configurable Mar 24, 2026
@wangliang181230 wangliang181230 changed the title feat: Intent recognition whether to output "reason" is configurable feat: Intent recognition whether to output reason is configurable Mar 24, 2026
@wangliang181230 wangliang181230 changed the title feat: Intent recognition whether to output reason is configurable feat: Intent recognition whether to output reason is configurable, and show the system prompt in the execution detail Mar 24, 2026
@wangliang181230 wangliang181230 changed the title feat: Intent recognition whether to output reason is configurable, and show the system prompt in the execution detail feat: Intent recognition whether to output reason is configurable. In addition, show the system prompt in the execution detail Mar 24, 2026
@wangliang181230 wangliang181230 changed the title feat: Intent recognition whether to output reason is configurable. In addition, show the system prompt in the execution detail feat: Intent recognition: 1) The prompt template can be customized. 2) Output reason is configurable. 3) Show the system prompt in the execution detail. Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant