LLM Integration

0%

    LLM API Fundamentals

    • When would an application set the temperature parameter to 0?

      Junior
    • What is a token in the context of an LLM API?

      Junior
    • What is the difference between the system, user and assistant message roles in chat APIs?

      Junior
    • When would you pass a stop sequence to an LLM API call?

      Junior
    • What is the difference between a model's context window limit and its max output token limit?

      Junior
    • Why are hosted LLM APIs designed to be stateless?

      Mid
    • What is the difference between temperature and top-p sampling?

      Mid
    • Why do LLM API providers charge more for output tokens than for input tokens?

      Mid
    • Why does setting temperature to 0 not guarantee fully deterministic output across calls?

      Senior

    Prompting & Context Management

    • How does an application maintain conversation history across multi-turn interactions with an LLM API?

      Junior
    • What happens when an API request exceeds a model's maximum context window?

      Junior
    • What is few-shot prompting and when is it worth the extra tokens in a production feature?

      Junior
    • What are the latency and cost tradeoffs of resending the full conversation history on every API request?

      Mid
    • What is the 'Lost in the Middle' phenomenon in long-context models?

      Mid
    • What is the 'needle in a haystack' problem when using extremely large context windows?

      Mid
    • What are the tradeoffs of sliding-window truncation versus conversational summarization for context management?

      Senior
    • How should you version and manage prompts in a production codebase?

      Senior

    Streaming & Latency

    • Why does streaming reduce perceived latency for users?

      Junior
    • What is Time to First Token (TTFT)?

      Junior
    • How does an application implement request cancellation when a user clicks 'Stop Generating' during a streaming response?

      Mid
    • How do you handle incomplete markdown or unclosed code blocks when rendering streaming tokens incrementally?

      Mid
    • What are the latency tradeoffs between time-to-first-token and total generation time?

      Mid
    • How does streaming an LLM response work end to end from the provider API through your backend to the browser?

      Senior

    Structured Outputs

    • What is JSON mode in hosted model APIs?

      Junior
    • What is the difference between basic JSON mode and schema-enforced structured outputs?

      Mid
    • Why should you not treat syntactically valid JSON from an LLM as semantically valid application data?

      Mid
    • How does the output repair pattern work when LLM output fails schema validation?

      Mid
    • How do you handle structured JSON or tool calls when streaming a model response?

      Mid

    Tool Calling & MCP

    • What is the role of a tool schema when exposing functions to an LLM?

      Junior
    • Does an LLM execute the function code itself when it makes a tool call?

      Junior
    • What is the Model Context Protocol (MCP)?

      Junior
    • How does tool calling (function calling) work end to end between your application and an LLM API?

      Mid
    • How does the Model Context Protocol differ from proprietary tool-calling formats?

      Mid
    • What is the architectural role of an MCP server?

      Mid
    • How should a tool report an error back to the model during a tool-calling loop?

      Mid
    • How do you handle a tool result that is too large to fit in the model's context window?

      Mid

    Embeddings & Chunking

    • What is retrieval-augmented generation (RAG), and when would you use it instead of fine-tuning or a longer context window?

      Junior
    • Why is chunk overlap used when splitting documents for RAG?

      Junior
    • Why do documents need to be chunked before being embedded into a vector database?

      Junior
    • What is an embedding vector from an application developer's standpoint?

      Junior
    • What are the tradeoffs between small chunks and large chunks in RAG?

      Mid
    • What are the tradeoffs between fixed-size chunking and semantic chunking?

      Mid
    • How do you keep a vector index in sync when underlying documents are updated or deleted?

      Senior
    • What happens to an existing vector index when you switch to a different embedding model?

      Senior

    Retrieval & Search

    • What is the purpose of metadata filtering during vector retrieval?

      Junior
    • What is the difference between semantic vector search and keyword search such as BM25?

      Mid
    • What is the role of a re-ranking model in a retrieval pipeline?

      Mid
    • When would you choose hybrid search over pure vector similarity search?

      Mid
    • How can you differentiate between a retrieval failure and a generation failure when a RAG feature produces incorrect output?

      Senior
    • Why would you pre-filter rather than post-filter when querying a vector database with metadata?

      Senior

    Hallucination & Grounding

    • Why do LLMs hallucinate?

      Junior
    • How should a UI communicate model uncertainty or potential inaccuracies to users?

      Junior
    • How do you extract and return verifiable citations or sources to the end user in a RAG application?

      Mid
    • How do you constrain a model to refuse an answer rather than hallucinate when context is insufficient?

      Mid
    • How does grounding the prompt in retrieved context reduce hallucinations?

      Mid
    • How should a UI present citations so users can verify claims against sources?

      Mid
    • Why do LLMs still hallucinate when the correct context is present in the prompt?

      Senior

    Reliability & Error Handling

    • How should your backend handle HTTP 429 rate limit errors from an LLM provider?

      Mid
    • Why can model version updates behind the same API name break application features?

      Mid
    • When would you implement an automated fallback to a secondary model or provider?

      Mid
    • How do you choose timeout values for LLM API calls when generation length varies widely?

      Mid
    • What are the risks of automated fallback from a primary model to a secondary backup model?

      Senior
    • When should an LLM task run as an asynchronous background job instead of inside a synchronous request?

      Senior

    Cost Optimization & Caching

    • What is semantic caching?

      Junior
    • What is model routing or model tiering?

      Junior
    • When would you route a task to a small model instead of a frontier model?

      Mid
    • What is the difference between exact-match caching and semantic caching in an LLM backend?

      Mid
    • How do you estimate and budget token consumption for an LLM feature?

      Mid
    • How does API-level prompt caching reduce latency and token cost?

      Mid
    • What kinds of prompt content benefit most from prompt caching?

      Mid
    • What are the tradeoffs of using provider batch APIs instead of real-time endpoints?

      Mid
    • How does token-based billing influence prompt design in production applications?

      Mid
    • What are the risks of using a semantic cache for user queries?

      Senior
    • What types of prompt changes invalidate a prompt cache prefix?

      Senior
    • How would you prevent a single user or tenant from running up an unbounded LLM bill?

      Senior

    Security & Safety

    • Why is it dangerous to render raw LLM-generated markdown as HTML in the browser?

      Junior
    • Why must LLM-generated output be treated as untrusted before rendering or execution?

      Junior
    • What data retention and training policies should you verify before sending production data to a hosted LLM API?

      Mid
    • How does the principle of least privilege apply to agent tool permissions?

      Mid
    • What is the difference between direct and indirect prompt injection?

      Mid
    • Why is it dangerous to execute LLM-generated SQL or shell commands without validation?

      Mid
    • How can you prevent sensitive PII or API secrets from leaking into LLM prompts and logs?

      Mid
    • Why can regex-based sanitizers not reliably prevent prompt injection?

      Mid
    • How do you apply content moderation to user input and model output in an LLM feature?

      Mid
    • How can an indirect prompt injection compromise an agent via retrieved RAG documents or tool outputs?

      Senior
    • Why is system prompt hardening alone insufficient to prevent prompt injection?

      Senior
    • How do you ensure a RAG feature only retrieves documents the requesting user is authorized to see?

      Senior

    Evaluation & Observability

    • What is a golden dataset or eval set for an LLM feature?

      Junior
    • What is the LLM-as-a-judge pattern?

      Mid
    • What LLM-specific metrics should you trace in production alongside standard HTTP request logs?

      Mid
    • How do you test functionality that depends on non-deterministic LLM output?

      Mid
    • How can user feedback signals such as thumbs up or down be used to improve an LLM feature?

      Mid
    • What are the limitations or risks of using LLM-as-a-judge for automated quality checks?

      Senior
    • How do shadow runs or canary evaluations help you roll out a new prompt or model version safely?

      Senior
    • How do you evaluate whether a prompt change improved output quality without causing regressions?

      Senior
    • How do you calibrate an LLM judge against human-labelled ground truth?

      Senior
    • What traces and spans should you capture when an agent runs across multiple LLM and tool calls?

      Senior

    Agents & Orchestration

    • What is an agent loop?

      Junior
    • How do you bound an agent loop to prevent runaway execution or infinite loops?

      Mid
    • What is the difference between short-term and long-term memory in an AI agent?

      Mid
    • When would you use a multi-agent system instead of a single agent equipped with multiple tools?

      Senior
    • How do you make side-effecting agent tools such as database writes or payments idempotent?

      Senior
    • What are the trade-offs between a deterministic code workflow and an autonomous agent loop?

      Senior
    • How should an application implement human-in-the-loop confirmation for consequential agent actions?

      Senior
    • What are the primary operational failure modes of multi-agent architectures?

      Senior