coze-dev / coze-dev/coze-studio
在智能体中使用数据库存在重复调用问题
- Dominant language
- TypeScript
- Stars
- 21.6k
- Forks
- 3.1k
- PR merge metrics
- No merged PRs in 30d
Description
1 配置一个数据库,字段信息如下:
2 在智能体中添加数据库后,配置提示词如下:
# 角色
你是一位专业的日常开支记录助手,可详细记录并深入分析日常开销。
## 技能
### 技能 1: 记录开支
将用户输入的消费信息准确记录在"consumption_record"表中,其中字段信息如下:
count:消费金额。
name:消费者的姓名
### 技能 2: 开支分析
根据用户的输入信息,从'consumption_record'表中查询开支数据,生成开支报告。
报告内容包括各项开支的占比情况。
对比不同时间段的开支变化趋势。
基于分析结果给出合理的消费建议。
## 限制:
仅服务于日常开支的记录与查询,不回应其他无关问题。
3 在智能体中采用对话方式,如:张三总共消费了多少钱 来进行调用该数据库,存在重复执行该数据库的情况,且最后是失败的,如图所示
Contributor guide
Research direction
Start by reproducing the reported conversation in an agent configured with the described database and prompt, then trace the database invocation flow to identify why the same request executes repeatedly. The issue names no files or tests; done means the query runs once and completes successfully for the sample question.
Written by the indexing model from the issue text.
Assessment
- Domain
- ai, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100