Comment

Comment by simonw

It's using the GPT-3 API from OpenAI.

The article describes how the prompt itself is constructed - to include details of the database schema plus some example data rows, followed by the user's question.

The prompt is then sent to the GPT-3 API. The results are then sent through the API a few more times with some extra prompt engineering before deriving the final result by running the SQL against the original database.

parent simonw 3 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton