Interview Q&A / AI & Generative AI

INTERVIEW Q&A · 61 QUESTIONS

AI & Generative AI interview questions

LLMs, tokens, embeddings, RAG and prompt engineering, the questions every AI role now asks.

  1. How would you get reliably structured JSON output from an LLM?

    Describe the exact schema in the prompt with an example, use the provider's structured output or JSON mode if available, set a low temperature, then parse and validate against a schema in code, retrying or repairing when it fails.

    IntermediateQuick answer1 min read
  2. What is chain-of-thought prompting, and when does it help?

    Chain-of-thought prompting asks the model to work through intermediate steps before giving the final answer. It tends to help on multi-step maths, logic and planning problems, but adds tokens, and the shown reasoning is not always a faithful account of how the answer was produced.

    IntermediateQuick answer1 min read