Example of prompt that GPT-3.5 solved, but nsql-6B did not.
Thanks for a great family of models!
You may want to add the below prompt as training material when developing the nsql further, as nsql-6B (and also nsql-350M) return an invalid SQL-query to it.
Prompt to nsql-6B
"""
text = """CREATE TABLE stadium (
stadium_id number,
location text,
name text,
capacity number,
highest number,
lowest number,
average number
)
CREATE TABLE singer (
singer_id number,
name text,
country text,
song_name text,
song_release_year text,
age number,
is_male others
)
CREATE TABLE concert (
concert_id number,
concert_name text,
theme text,
stadium_id text,
year text
)
CREATE TABLE singer_in_concert (
concert_id number,
singer_id text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Among the artists having concerts in year 2020, which artist has a song whose title equals the name of the stadium on which the concert takes place?
SELECT
"""
Invalid response, as retreived when using nsql-6B:
"""
SELECT T2.name
FROM concert AS T1
JOIN singer_in_concert AS T2 ON T1.concert_id = T2.concert_id
JOIN singer AS T3 ON T2.singer_id = T3.singer_id
WHERE T1.year = 2020 AND T3.song_name = (
SELECT T3.song_name
FROM stadium AS T4
JOIN concert AS T5 ON T4.stadium_id = T5.stadium_id
WHERE T5.year = 2020
);
"""
Valid response, as given by GPT-3.5:
"""
SELECT s.name AS artist_name
FROM singer s
JOIN singer_in_concert sic ON s.singer_id = sic.singer_id
JOIN concert c ON sic.concert_id = c.concert_id
JOIN stadium st ON c.stadium_id = st.stadium_id
WHERE c.year = '2020' AND s.song_name = st.name;
"""
Awesome! Will incorporate it in the future release. Thanks!