提升SQL精确性/Enhancing the Precision of SQL Queries #1192
jiangshengdev
started this conversation in
General
Replies: 1 comment 1 reply
-
尝试修改了字段注释,获得了不错的效果 diff --git a/docker/examples/dashboard/test_case_mysql_data.py b/docker/examples/dashboard/test_case_mysql_data.py
index 0a37365..1a0b3bd 100644
--- a/docker/examples/dashboard/test_case_mysql_data.py
+++ b/docker/examples/dashboard/test_case_mysql_data.py
@@ -19,7 +19,7 @@ def build_table(connection):
name VARCHAR(50) NOT NULL COMMENT '用户名',
email VARCHAR(50) NOT NULL COMMENT '电子邮件',
mobile CHAR(11) NOT NULL COMMENT '手机号码',
- gender VARCHAR(20) COMMENT '性别',
+ gender VARCHAR(20) COMMENT '性别,可选值:Male, Female',
birth DATE COMMENT '出生日期',
country VARCHAR(20) COMMENT '国家',
city VARCHAR(20) COMMENT '城市',
@@ -36,7 +36,7 @@ def build_table(connection):
product_name VARCHAR(50) NOT NULL COMMENT '产品名称',
product_category VARCHAR(20) COMMENT '产品分类',
amount DECIMAL(10, 2) NOT NULL COMMENT '订单金额',
- pay_status VARCHAR(20) COMMENT '付款状态',
+ pay_status VARCHAR(20) COMMENT '付款状态,可选值:CANCEL, REFUND, SUCCESS, FAILD',
user_id INT(11) NOT NULL COMMENT '用户ID',
user_name VARCHAR(50) COMMENT '用户名',
create_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
(END) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
在使用 DB-GPT 进行测试时,
用文档的例子进行测试,https://www.yuque.com/eosphoros/dbgpt-docs/aiagvxeb86iarq6r
最终在查询数据库时遇到了问题。具体来说,在执行到某一步时,系统尝试查询了一个不存在的枚举值,导致无法正确获取数据。
是否可以通过给大语言模型提供一些示例数据/提供详细的属性枚举信息,以获得更加精确的结果
While testing with DB-GPT,
I used the example from the documentation, https://www.yuque.com/eosphoros/dbgpt-docs/aiagvxeb86iarq6r,
but encountered a problem when querying the database. Specifically, at a certain step, the system attempted to query a non-existent enum value, which prevented the correct retrieval of data.
Is it possible to obtain more precise results by providing the large language model with some sample data or detailed attribute enumeration information?
scratch.log
Beta Was this translation helpful? Give feedback.
All reactions