3 ms·
Existing LLMs are already pretty good at this, no? The tricky part is mapping however the NL question refers to the various types of data to the actual column n
by wizofaus 3y ago
Existing LLMs are already pretty good at this, no?
The tricky part is mapping however the NL question refers to the various types of data to the actual column names, which is where I'd imagine some prompt engineering (or pretraining) would be necessary.
- deleted 3y ago[deleted]
- wizofaus 3y agoBTW I tried it with ChatGPT 3.5 - with a prompt that roughly described the database schema and a question "I need to know the manufacturer for the vehicle with VIN X7820-A and to confirm whether it has the feature 'rear camera' installed", it came back with SELECT TVehicles.Make, CASE WHEN TVehFeatures.FName = 'rear camera' THEN 'Installed' ELSE 'Not Installed' END AS RearCameraStatus FROM TVehicles JOIN TVehFeatures ON TVehicles.TV_ID = TVehFeatures.TV_ID WHERE TVehicles.VIN = 'X7820-A'; One interesting thing to note - I didn't tell it that "Make" and "Manufacturer" are the same thing. I even went the next level and asked it to write me code to execute the query and generate appropriate HTML output from the results. It didn't quite manage it to handle any possible SQL query (remembering that the query itself has been dynamically generated), but wasn't far off. My description of how the output should look was simply "sleek and modern", and it came up with CSS that could be reasonably said to fill that brief.