AnthropicClaude Certified Architect – Professional2026-102.3 Apply prompt engineering techniques (zero-shot, few-shot, chain-of-thought)
Text to SQL with Claude
Completed by opening the official lab
Why it matters
One task carried through zero-shot, few-shot and reasoning prompts shows what each technique adds, checked by executing the query.
What to practise
On a SQLite database of employees and departments, start with a prompt that holds the schema and asks for the query in <sql> tags. Add few-shot examples, then examples that reason in <thought_process> before the <sql>. Retrieve only the relevant schema with Voyage embeddings, and add a loop that executes the SQL and feeds errors back for up to max_attempts tries. Promptfoo checks syntax, query semantics and result correctness. The published results compare earlier models, Claude 3 Haiku and Claude 3.5 Sonnet: few-shot alone scored below the basic prompt on Claude 3 Haiku.
How it fits
The first prompt is 2.3.1’s zero-shot baseline, and the examples are a set to audit for 2.3.2’s coverage. Treat the <thought_process> text as generated output, not an audit record, as 2.3.3 does; executing the SQL is the check. Judge which step pays for itself by 2.3.4’s quality, tokens and latency.