Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问关于sql生成的prompt格式应该是怎么样的? #5

Open
zjj-shiyi opened this issue Jul 25, 2023 · 2 comments
Open

请问关于sql生成的prompt格式应该是怎么样的? #5

zjj-shiyi opened this issue Jul 25, 2023 · 2 comments

Comments

@zjj-shiyi
Copy link

zjj-shiyi commented Jul 25, 2023

如题,想要测试sql生成的能力,推荐以什么样形式的prompt把表结构(表名称,字段,字段类型)输入给模型?
例如有一张财产表(property),需要找到钱最多的人,如下输入会输出一些无关信息

# -- language: SQL\n# table name: property_info. columns: id, name, bank_number, deposit, gender. According to the table infomation above, find the people with most money

输出
# Write your MySQL query statement below\nselect name, bank_number, deposit from property_info where gender = 'male' order by deposit desc limit 1;

想咨询一下训练时的prompt格式时怎样的?

@AlexasXu
Copy link

同样求问

@Stanislas0
Copy link
Contributor

@AlexasXu @zjj-shiyi 开源的 CodeGeeX2-6B 是一个基座代码模型,它的使用方式是偏补全的,只要按照某种语言一般的编程习惯使用就可以了。开头需要加上语言标签:-- language: SQL; prompt需要使用相应语言的注释符号,SQL用-- [prompt],例子如下(运行代码):

CleanShot 2023-07-26 at 20 19 03@2x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants