Skip to content
RED SAGSkills
easyPrompt Engineer interview question

What are tokens and context windows, and why do they matter when you design prompts?

What the interviewer wants to hear

  • Tokens are the text pieces models process
  • Context window is the total token limit for input and output
  • Cost and latency scale with tokens
  • Long inputs need trimming, summarising or retrieval
  • Token counts differ across languages

Model answer

Tokens are the small chunks of text a model reads and writes, often a word or part of a word. The context window is the maximum number of tokens one request can hold, and that includes the system prompt, conversation history, any documents and the reply. They matter in three ways. First, limits: if I stuff in a huge document and long history, there may be no room for the answer, or older messages get cut. Second, cost and speed: providers charge per token, and output tokens take time to generate, so long prompts and long answers add up across thousands of requests. Third, quality: very long contexts can make models miss details. So I keep prompts focused, trim or summarise history, retrieve only relevant passages, and measure token counts, especially for non-English languages, which often use more tokens.

Can you answer it under time pressure?

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

Start mock interview

More easy Prompt Engineer questions