semiotic/SynQL-Spider-Train-Topics
收藏资源简介:
--- dataset_info: features: - name: db_id dtype: string - name: topic_id dtype: string - name: topic dtype: string splits: - name: train num_bytes: 137469 num_examples: 900 download_size: 41636 dataset_size: 137469 configs: - config_name: default data_files: - split: train path: data/train-* license: apache-2.0 language: - en size_categories: - n<1K --- # Dataset Card for SynQL-Spider-Train-Topics - Developed by: Semiotic Labs - Model type: [Text to SQL] - License: [Apache-2.0] ## Dataset Details Example view of data: ```json { "pilot_record": { "1": "Aircraft Information (Questions related to the aircrafts in the database, such as specifications, manufacturer details, model and order year)", "2": "Pilot Details (Questions focused on pilots, such as age, nationality, rank, position, year of joining and team)", "3": "Flight Records (Questions pertaining to flight records, including the relationship between pilots and aircrafts, and the dates of the flights)" }, "storm_record": { "1": "Storm Characteristics (Questions specifically related to the storms such as name, dates active, max speed, damage in millions USD, and number of deaths. Avoid questions related to regions affected by storms)", "2": "Region Details (Questions specifically related to the regions such as region code and region name. Avoid questions related to storms or the impact of storms on these regions)", "3": "Impact on Regions (Questions specifically related to the impact of storms on regions such as the number of cities affected. Avoid questions related to specific details of storms or regions)" }, ... "spider_database_id" { "topic_key": "Topic based on the database schema." } } ``` The topics above have been generated using GPT-4 and the database schemas contained within the Spider dataset ([link](https://yale-lily.github.io/spider)). An example prompt used for generation is as follows: ``` **System Prompt:** Your job is to provide distinct topics that encapsulate a specific subset of questions that can be asked about a database. The goal is to generate distinct topics for the database. The topics should not overlap. Please return the topics as a numbered list within a JSON object. The list should have integer keys for each topic and the value should be the topic description itself. Ensure that the numbering starts at 1 and each entry is unique. { "1": "Topic Description for the first topic", "2": "Topic Description for the second topic", "3": "Topic Description for the third topic", } The topics should be relevant to typical questions that would be asked about the database, so try to avoid details that are too specific to the database (such as column names). Try to make the topics distinct from each other, so that a large area of potential questions is covered. **User Prompt:** Provided here are the create statements for tables in database browser_web. Your job is to return distinct topics of questions that can be asked about the database browser_web. schema: CREATE TABLE "Web_client_accelerator" ( "id" int, "name" text, "Operating_system" text, "Client" text, "Connection" text, PRIMARY key("id") ) CREATE TABLE "browser" ( "id" int, "name" text, "market_share" real, PRIMARY key("id") ) CREATE TABLE "accelerator_compatible_browser" ( "accelerator_id" int, "browser_id" int, "compatible_since_year" int, PRIMARY key("accelerator_id", "browser_id"), FOREIGN KEY ("accelerator_id") REFERENCES ‘Web_client_accelerator‘("id"), FOREIGN KEY ("browser_id") REFERENCES ‘browser‘("id") ) Example Topics: { "1": "College Information (Questions specifically related to the colleges. Avoid questions related to players or tryouts)", "2": "Player Information (Questions specifically related to players. Avoid questions related to colleges or tryouts)", "3": "Tryout Information (Questions specifically related to tryouts. Avoid questions related to colleges or players)", } Only respond with the topic of the question, not the question itself, formatted as the Example Topics are. Please return the topics as a numbered dictionary within a JSON object.
数据集信息: 特征字段: - 字段名:db_id,数据类型:字符串类型 - 字段名:topic_id,数据类型:字符串类型 - 字段名:topic,数据类型:字符串类型 划分集: - 划分名称:train,字节数:137469,样本数:900 下载大小:41636 数据集总大小:137469 配置项: - 配置名称:default,数据文件: - 划分:train,路径:data/train-* 许可证:Apache-2.0 语言:英语 规模类别:样本数少于1000 # SynQL-Spider-Train-Topics 数据集卡片 - 开发方:Semiotic Labs - 模型类型:[文本到SQL(Text to SQL)] - 许可证:[Apache-2.0] ## 数据集详情 数据示例如下: json { "飞行员记录": { "1": "航空器信息(针对数据库中航空器的查询问题,例如规格、制造商详情、机型及交付年份)", "2": "飞行员详情(针对飞行员的查询问题,例如年龄、国籍、军衔、职位、入职年份及所属团队)", "3": "飞行记录(针对飞行记录的查询问题,涵盖飞行员与航空器的关联关系及飞行日期)" }, "风暴记录": { "1": "风暴特征(针对风暴的查询问题,例如风暴名称、活跃日期、最大风速、以百万美元计的经济损失及死亡人数,需避免涉及风暴影响区域相关问题)", "2": "区域详情(针对区域的查询问题,例如区域代码及区域名称,需避免涉及风暴或风暴对区域的影响相关问题)", "3": "区域受影响情况(针对风暴对区域造成的影响的查询问题,例如受影响城市数量,需避免涉及风暴或区域的具体细节相关问题)" }, ... "spider数据集数据库ID(Spider dataset database ID)": { "主题键": "基于数据库模式生成的主题" } } 上述主题由GPT-4结合Spider数据集(Spider dataset)中的数据库模式生成,相关链接:https://yale-lily.github.io/spider。用于生成主题的示例提示词如下: **系统提示词:** 你的任务是生成差异化主题,用以涵盖针对某一数据库可提出的各类具体问题子集。 本任务旨在为该数据库生成互不重叠的差异化主题。请将主题以JSON对象内的编号列表形式返回,列表中每个主题以整数作为键,对应值为主题描述本身。请确保编号从1开始,且每个条目均唯一。 { "1": "第一个主题的描述", "2": "第二个主题的描述", "3": "第三个主题的描述", } 主题需贴合针对该数据库的典型查询问题,因此应避免过于贴合数据库本身的细节(例如列名)。请确保各主题互不重叠,以覆盖尽可能多的潜在查询问题范围。 **用户提示词:** 以下为browser_web数据库中各表的CREATE语句。你的任务是为browser_web数据库生成可提出的查询问题对应的差异化主题。 数据库模式: CREATE TABLE "Web_client_accelerator" ( "id" int, "name" text, "Operating_system" text, "Client" text, "Connection" text, PRIMARY key("id") ) CREATE TABLE "browser" ( "id" int, "name" text, "market_share" real, PRIMARY key("id") ) CREATE TABLE "accelerator_compatible_browser" ( "accelerator_id" int, "browser_id" int, "compatible_since_year" int, PRIMARY key("accelerator_id", "browser_id"), FOREIGN KEY ("accelerator_id") REFERENCES ‘Web_client_accelerator‘("id"), FOREIGN KEY ("browser_id") REFERENCES ‘browser‘("id") ) 示例主题: { "1": "学院信息(针对学院的查询问题,避免涉及球员或试训相关内容)", "2": "球员信息(针对球员的查询问题,避免涉及学院或试训相关内容)", "3": "试训信息(针对试训的查询问题,避免涉及学院或球员相关内容)", } 仅需返回主题内容,而非具体问题,格式需与上述示例主题一致。请将主题以JSON对象内的编号字典形式返回。



