tencentmusic / supersonic

SuperSonic is the next-generation BI+AI platform that integrates Chat BI (powered by LLM) and Headless BI (powered by semantic layer) paradigms.
Other
1.98k stars 323 forks source link

[Enhancement] 字段转换的时候能否兼容大模型解析s2sql时间格式不满足要求的情况 #1401

Open wangwz587 opened 1 month ago

wangwz587 commented 1 month ago

Search before asking

Description

大模型输出的sql不稳定,时间条件不满足prompt中的要求下,字段名称修正的时候能否兼容这类问题? 如将下述的“年份=2018”修正为“YEAR (数据日期)”? image image image 补充,本例对接的大模型是qwen1.5 32B

Solution

“年份”修正为“YEAR (数据日期)” “月份”修正为“MONTH (数据日期)” “日”修正为“DAY (数据日期)”

Are you willing to submit PR?

Code of Conduct

jerryjzhang commented 1 month ago

这个会比较tricky,也不太清楚大模型会幻觉成“年份”、“年”等术语表达。是不是可以先尝试修改prompt,给一些更明确的指令说明。在下个版本会支持在助理层面配置自定义prompt