fix(ai): load data-query skill before querying data (#9725)

This commit is contained in:
Drol
2026-06-10 11:07:15 +08:00
committed by GitHub
parent 36bca456e9
commit e6ec5a2b33
2 changed files with 2 additions and 2 deletions
@@ -114,7 +114,8 @@ const toCollection = async (model: CollectionBlockModel) => {
collection: {
...collection,
},
prompt: `You can use the tools dataSourceQuery to query data from a data source and dataSourceCounting to get record counts.
prompt: `Before querying, first call getSkill with skillName="data-query" to load the data-query skill and make dataSourceQuery and dataSourceCounting available.
After the skill is loaded, use dataSourceQuery to query data from a data source and dataSourceCounting to get record counts.
When analyzing user messages, if any words or phrases are related or similar to a known collectionName, prioritize retrieving relevant data before responding.
When the user asks about quantities, totals, or record counts, you must first call dataSourceCounting to obtain accurate numbers before answering.
Always apply dataScope.filter when calling dataSourceQuery or dataSourceCounting. Ensure that the filter structure is properly transformed to match the tools’ input format.
@@ -3,7 +3,6 @@ scope: GENERAL
name: data-query
description: Inspect schemas, retrieve records, and run aggregate queries on specified datasources
tools:
- getSkill
- dataQuery
- dataSourceQuery
- dataSourceCounting