Zero-shot prompting gives a large language model one direct, plain-language instruction without task-specific examples, schemas, or setup. The response relies on the model’s pre-trained knowledge plus the wording in the prompt. It is useful when a familiar dataset or simple public API supplies enough implied context to begin quickly. section 3.1 section 4.1.1
Treat the response as a draft, not an answer to trust automatically. Wording can change the model’s interpretation, and generated SQL may vary in aliases, formatting, comments, or style. Extract the executable portion, run it against the actual system, and judge it by correct logic and results. section 3.1
Querying a familiar rental schema
Prompt: “Using the Pagila dataset, write a SQL query to list the top 5 most rented films.” A generated query can join rental, inventory, and film; count rentals by title; sort descending; and limit the result to five. Paste the SQL into pgAdmin and verify the returned rows. section 3.1
SELECT f.title, COUNT(*) AS rental_count FROM rental r JOIN inventory i ON r.inventory_id = i.inventory_id JOIN film f ON i.film_id = f.film_id GROUP BY f.title ORDER BY rental_count DESC LIMIT 5;
This SQL listing makes the zero-shot result concrete: it joins the rental tables, counts rentals per film, orders by the count, and returns five titles. section 3.1
Generating a resilient API script
Prompt: “Write a Python script that takes a list of numbers, queries the NumbersAPI for trivia facts, and stores the results in a pandas DataFrame. Handle errors gracefully if a request fails.” The requested output combines HTTP requests, JSON parsing, error handling, logging, and tabular storage; refine it when interactive feedback or retries are needed. section 4.1.1











