Skip to content
RED SAGSkills
hardPrompt Engineer interview question

A high-volume prompt costs too much. How do you reduce cost while protecting quality?

What the interviewer wants to hear

  • Measure token usage and cost per request
  • Trim instructions and examples; dynamic example selection
  • Prompt caching for static prefixes
  • Route easy cases to smaller models
  • Limit output length; validate quality with evals

Model answer

First I measure input and output tokens per request to find what drives cost. Then I trim: remove repeated or unnecessary instructions, shorten examples, and only include the few examples most relevant to each input instead of a fixed long list. I order the prompt so the static part comes first and benefits from prompt caching. I control output length with clear limits, since output tokens are often the more expensive part. Next I try a smaller, cheaper model, often with a slightly adjusted prompt, and route only the hard cases to the large model, using simple rules or a classifier. For non-urgent work, batch processing can be cheaper. Every change is tested against the eval set, and I present the cost savings next to any quality change so the business can choose the right balance.

Can you answer it under time pressure?

Take a timed hard round and get scored on every answer.

Start mock interview

More hard Prompt Engineer questions