Free live cohort on Google Meet — register your interest →

Session 2

Prompt Engineering & the LLM API Surface

The Question You'll Be Asked

"Walk me through how you'd design a production prompt for a structured extraction task."

This is the core interview question for prompt engineering. A strong answer covers five beats in 60–90 seconds — miss one and you sound junior.

5 Beats Interviewers Listen For

Miss one and they probe.

  1. Structure — system prompt (role/rules/format) vs. user message (the task)
  2. RCTF — Role, Context, Task, Format — applied to the system prompt
  3. Parameters — temperature 0 for anything parsed downstream, max_tokens ≈ 2× expected length
  4. Technique escalation — zero-shot first, few-shot only if format is wrong, chain-of-thought only for multi-step reasoning
  5. Failure modes — prompt injection guard + never trust model memory for current data

The Model Answer

"I separate the system prompt — role, rules, output format — from the user message, which carries the task. In the system prompt I apply RCTF: Role, Context, Task, and Format, usually a JSON schema with exact field names. For parameters, temperature 0 for deterministic output and max_tokens at roughly 2× the expected response. I start zero-shot; if the format is still wrong I add 2–3 few-shot examples; if the task needs multi-step reasoning I add chain-of-thought. Finally, I XML-delimit user input to block prompt injection, and I never rely on the model's memory for current facts — I inject them into context instead."

Your version doesn't have to match word-for-word — all five beats must be present.

Say This, Not That

Say

  • "System prompt vs. user message, two layers"
  • "RCTF: Role, Context, Task, Format"
  • "Temperature 0 for anything a parser reads"
  • "XML-delimit user input to stop injection"

Avoid

  • "I just write a good prompt" (no framework named)
  • "Higher temperature = better quality"
  • "Few-shot teaches the model new facts" (it teaches shape, not facts)
  • Skipping the failure-modes beat — it's what separates senior from junior

Want the project that goes with this?

All 12 sessions are free to read, right now, no account needed — you just finished session 2. What the email list adds is the build: one real, deployable AI project every fortnight, with what to build, how to build it, and why it matters for the role you're aiming at. Reply to any of them and a person answers.

No spam. Unsubscribe anytime. Replies go to a real person.