tdoehmen commited on
Commit
dd2c84c
1 Parent(s): 94eca0b

Upload evaluation_c8db7099-75fb-4683-866f-a6cff602d95a.json

Browse files
data/evaluation_c8db7099-75fb-4683-866f-a6cff602d95a.json CHANGED
@@ -1,3 +1,3 @@
1
  {"inference_api": "openrouter", "model_name": "anthropic/claude-3.5-sonnet", "prompt_format": "custom_32428570", "custom_prompt": "### Instruction:\nYour task is to generate valid duckdb SQL to answer the following question, given a duckdb database schema.\n\nHere is the database schema that the SQL query will run on:\n{schema}\n\n### Question:\n{question}\n\n### Response (use duckdb shorthand if possible):\n```sql\n", "timestamp": "2024-10-27T22:55:01.139181", "easy_count": 5, "easy_execution_accuracy": 0.6, "medium_count": 14, "medium_execution_accuracy": 0.7857142857142857, "hard_count": 6, "hard_execution_accuracy": 0.3333333333333333, "duckdb_count": 48, "duckdb_execution_accuracy": 0.625, "ddl_count": 2, "ddl_execution_accuracy": 1.0, "all_count": 75, "all_execution_accuracy": 0.64}
2
  {"inference_api": "openrouter", "model_name": "anthropic/claude-3.5-sonnet", "prompt_format": "custom_32428570", "custom_prompt": "### Instruction:\nYour task is to generate valid duckdb SQL to answer the following question, given a duckdb database schema.\n\nHere is the database schema that the SQL query will run on:\n{schema}\n\n### Question:\n{question}\n\n### Response (use duckdb shorthand if possible):\n```sql\n", "timestamp": "2024-10-27T22:56:53.164026", "easy_count": 5, "easy_execution_accuracy": 0.6, "medium_count": 14, "medium_execution_accuracy": 0.7857142857142857, "hard_count": 6, "hard_execution_accuracy": 0.3333333333333333, "duckdb_count": 48, "duckdb_execution_accuracy": 0.625, "ddl_count": 2, "ddl_execution_accuracy": 1.0, "all_count": 75, "all_execution_accuracy": 0.64}
3
- {"inference_api": "openrouter", "model_name": "anthropic/claude-3.5-sonnet", "prompt_format": "duckdbinstgraniteshort", "custom_prompt": "System:\nYour task is to generate valid DuckDB SQL to answer the question that the user asks. You should only respond with a valid DuckDB SQL query.\n\nHere are some DuckDB SQL syntax specifics you should be aware of:\n\n\n- DuckDB use double quotes (\") for identifiers that contain spaces or special characters, or to force case-sensitivity and single quotes (') to define string literals\n- DuckDB can query CSV, Parquet, and JSON directly without loading them first, e.g. `SELECT * FROM 'data.csv';`\n- DuckDB supports CREATE TABLE AS (CTAS): `CREATE TABLE new_table AS SELECT * FROM old_table;`\n- DuckDB queries can start with FROM, and optionally omit SELECT *, e.g. `FROM my_table WHERE condition;` is equivalent to `SELECT * FROM my_table WHERE condition;`\n- DuckDB allows you to use SELECT without a FROM clause to generate a single row of results or to work with expressions directly, e.g. `SELECT 1 + 1 AS result;`\n- DuckDB supports attaching multiple databases, unsing the ATTACH statement: `ATTACH 'my_database.duckdb' AS mydb;`. Tables within attached databases can be accessed using the dot notation (.), e.g. `SELECT * FROM mydb.table_name syntax`. The default databases doesn't require the do notation to access tables. The default database can be changed with the USE statement, e.g. `USE my_db;`.\n- DuckDB is generally more lenient with implicit type conversions (e.g. `SELECT '42' + 1;` - Implicit cast, result is 43), but you can always be explicit using `::`, e.g. `SELECT '42'::INTEGER + 1;`\n- DuckDB can extract parts of strings and lists using [start:end] or [start:end:step] syntax. Indexes start at 1. String slicing: `SELECT 'DuckDB'[1:4];`. Array/List slicing: `SELECT [1, 2, 3, 4][1:3];`\n- DuckDB has a powerful way to select or transform multiple columns using patterns or functions. You can select columns matching a pattern: `SELECT COLUMNS('sales_.*') FROM sales_data;` or transform multiple columns with a function: `SELECT AVG(COLUMNS('sales_.*')) FROM sales_data;`\n- DuckDB an easy way to include/exclude or modify columns when selecting all: e.g. Exclude: `SELECT * EXCLUDE (sensitive_data) FROM users;` Replace: `SELECT * REPLACE (UPPER(name) AS name) FROM users;`\n- DuckDB has a shorthand for grouping/ordering by all non-aggregated/all columns. e.g `SELECT category, SUM(sales) FROM sales_data GROUP BY ALL;` and `SELECT * FROM my_table ORDER BY ALL;`\n- DuckDB can combine tables by matching column names, not just their positions using UNION BY NAME. E.g. `SELECT * FROM table1 UNION BY NAME SELECT * FROM table2;`\n- DuckDB has an inutitive syntax to create List/Struct/Map and Array types. Create complex types using intuitive syntax. List: `SELECT [1, 2, 3] AS my_list;`, Struct: `{{'a': 1, 'b': 'text'}} AS my_struct;`, Map: `MAP([1,2],['one','two']) as my_map;`. All types can also be nested into each other. Array types are fixed size, while list types have variable size. Compared to Structs, MAPs do not need to have the same keys present for each row, but keys can only be of type Integer or Varchar. Example: `CREATE TABLE example (my_list INTEGER[], my_struct STRUCT(a INTEGER, b TEXT), my_map MAP(INTEGER, VARCHAR), my_array INTEGER[3], my_nested_struct STRUCT(a INTEGER, b Integer[3]));`\n- DuckDB has an inutive syntax to access struct fields using dot notation (.) or brackets ([]) with the field name. Maps fields can be accessed by brackets ([]).\n- DuckDB's way of converting between text and timestamps, and extract date parts. Current date as 'YYYY-MM-DD': `SELECT strftime(NOW(), '%Y-%m-%d');` String to timestamp: `SELECT strptime('2023-07-23', '%Y-%m-%d')::TIMESTAMP;`, Extract Year from date: `SELECT EXTRACT(YEAR FROM DATE '2023-07-23');`\n- Column Aliases in WHERE/GROUP BY/HAVING: You can use column aliases defined in the SELECT clause within the WHERE, GROUP BY, and HAVING clauses. E.g.: `SELECT a + b AS total FROM my_table WHERE total > 10 GROUP BY total HAVING total < 20;`\n- DuckDB allows generating lists using expressions similar to Python list comprehensions. E.g. `SELECT [x*2 FOR x IN [1, 2, 3]];` Returns [2, 4, 6].\n- DuckDB allows chaining multiple function calls together using the dot (.) operator. E.g.: `SELECT 'DuckDB'.replace('Duck', 'Goose').upper(); -- Returns 'GOOSEDB';`\n- DuckDB has a JSON data type. It supports selecting fields from the JSON with a JSON-Path expression using the arrow operator, -> (returns JSON) or ->> (returns text) with JSONPath expressions. For example: `SELECT data->'$.user.id' AS user_id, data->>'$.event_type' AS event_type FROM events;`\n- DuckDB has built-in functions for regex regexp_matches(column, regex), regexp_replace(column, regex), and regexp_extract(column, regex).\n- DuckDB has a way to quickly get a subset of your data with `SELECT * FROM large_table USING SAMPLE 10%;`\n\nHere is the schema of the DuckDB database that the SQL query will run on:\n{schema}\n\nQuestion:\nHere is the question or an instruction the user provided:\n{question}\n\nWrite a DuckDB SQL query for the given question!\n\nAnswer:\n```\n", "timestamp": "2024-10-27T23:04:39.561642", "easy_count": 5, "easy_execution_accuracy": 0.6, "medium_count": 14, "medium_execution_accuracy": 0.7142857142857143, "hard_count": 6, "hard_execution_accuracy": 0.16666666666666666, "duckdb_count": 48, "duckdb_execution_accuracy": 0.7291666666666666, "ddl_count": 2, "ddl_execution_accuracy": 1.0, "all_count": 75, "all_execution_accuracy": 0.68}
 
1
  {"inference_api": "openrouter", "model_name": "anthropic/claude-3.5-sonnet", "prompt_format": "custom_32428570", "custom_prompt": "### Instruction:\nYour task is to generate valid duckdb SQL to answer the following question, given a duckdb database schema.\n\nHere is the database schema that the SQL query will run on:\n{schema}\n\n### Question:\n{question}\n\n### Response (use duckdb shorthand if possible):\n```sql\n", "timestamp": "2024-10-27T22:55:01.139181", "easy_count": 5, "easy_execution_accuracy": 0.6, "medium_count": 14, "medium_execution_accuracy": 0.7857142857142857, "hard_count": 6, "hard_execution_accuracy": 0.3333333333333333, "duckdb_count": 48, "duckdb_execution_accuracy": 0.625, "ddl_count": 2, "ddl_execution_accuracy": 1.0, "all_count": 75, "all_execution_accuracy": 0.64}
2
  {"inference_api": "openrouter", "model_name": "anthropic/claude-3.5-sonnet", "prompt_format": "custom_32428570", "custom_prompt": "### Instruction:\nYour task is to generate valid duckdb SQL to answer the following question, given a duckdb database schema.\n\nHere is the database schema that the SQL query will run on:\n{schema}\n\n### Question:\n{question}\n\n### Response (use duckdb shorthand if possible):\n```sql\n", "timestamp": "2024-10-27T22:56:53.164026", "easy_count": 5, "easy_execution_accuracy": 0.6, "medium_count": 14, "medium_execution_accuracy": 0.7857142857142857, "hard_count": 6, "hard_execution_accuracy": 0.3333333333333333, "duckdb_count": 48, "duckdb_execution_accuracy": 0.625, "ddl_count": 2, "ddl_execution_accuracy": 1.0, "all_count": 75, "all_execution_accuracy": 0.64}
3
+ {"inference_api": "openrouter", "model_name": "anthropic/claude-3.5-sonnet", "prompt_format": "duckdbinstgraniteshort", "custom_prompt": "", "timestamp": "2024-10-27T23:04:39.561642", "easy_count": 5, "easy_execution_accuracy": 0.6, "medium_count": 14, "medium_execution_accuracy": 0.7142857142857143, "hard_count": 6, "hard_execution_accuracy": 0.16666666666666666, "duckdb_count": 48, "duckdb_execution_accuracy": 0.7291666666666666, "ddl_count": 2, "ddl_execution_accuracy": 1.0, "all_count": 75, "all_execution_accuracy": 0.68}