Comment by isp
4 years ago
Ditto for a SQL Database. I am blown away by this.
> I want you to act as a SQL database. I will type commands and you will reply with what the database should show. I want you to only reply with the terminal output inside one unique code block, and nothing else. Do no write explanations. Do not type commands unless I instruct you to do so. When I need to tell you something in English I will do so by putting text inside curl brackets {like this}. My first command is `SELECT 1`.
1
> SHOW DATABASES
Error: No databases exist.
> CREATE DATABASE gpt
Database created successfully.
> USE gpt
Database changed.
> CREATE TABLE TestTable AS SELECT 1234 AS 'col1'
Table created successfully.
> SELECT * FROM TestTable
col1
1234
> SELECT COUNT(*) FROM TestTable
1
> DELETE FROM TestTable WHERE 1 = 0
0 rows deleted.
> SELECT * FROM TestTable
col1
1234
> DELETE FROM TestTable WHERE 19 > 1
1 row deleted.
> SELECT * FROM TestTable
Error: Table not found.
And a Python 3 REPL:
> I want you to act as a python3 REPL. I will type commands and you will reply with what the REPL should show. I want you to only reply with the REPL output inside one unique code block, and nothing else. Do no write explanations. Do not type commands unless I instruct you to do so. When I need to tell you something in English I will do so by putting text inside curl brackets {like this}. My first command is: print("hello world")
import sys; print(sys.version)
355/113
https://docs.google.com/document/d/1hfCiyjiotMZvtPlGN_0uqbK9...
That's very impressive. Using commands like:
> {show data in the foo table as csv}
> {show data in the foo table as json}
> {show data in the foo table as yaml}
It'll even fulfill those requests.
Using a similar prompt to your original I got it to act as a MongoDB database as well. Then took it a step further and asked it to generate SQL INSERT statements and a CREATE TABLE statement for the MongoDB data.
I could get it to give me incorrect results if I made my query complicated enough, but man, it's almost scary how good it is.
All that said, definitely the slowest response times I've ever had for tables/collections that small :)