Claude Seekho

Interview Quick Revision

This section is for reading the day before the interview: short answers, comparison tables and a practice checklist.

30.1 Top questions: short answers

QuestionShort answer
Who made Claude?Anthropic (2021, Dario & Daniela Amodei); focus on AI safety
Haiku vs Sonnet vs Opus vs Fable?Fast/cheap → balanced → smart → most capable
Default model today?Claude Opus 5.5 (claude-opus-5-5)
Context window?Current models 1M tokens; Haiku 4.5: 200K
What is a token?A small unit of text; billing and limits are in tokens
Constitutional AI?The model self-critiques based on principles + RLAIF
RLHF?A reward model from human preference rankings, then RL
API endpoint?POST /v1/messages, headers x-api-key, anthropic-version
Is the API stateful?No: send the full history every time
Where does the system prompt go?In the top-level system field
stop_reason types?end_turn, max_tokens, stop_sequence, tool_use, pause_turn, refusal
Why streaming?Fast UX + long requests don't time out; SSE events
Tool use flow?Define tools → tool_use → you run it → tool_result → final
Client vs server tools?Client: your code runs it; Server: Anthropic runs it (web search, code exec)
Parallel tool results?All in a single user message
Adaptive thinking?Claude decides how much to think; controlled with effort
budget_tokens?The old way; gives a 400 on newer models
Prefill?Removed on newer models; use structured outputs
Prompt caching?Stable prefix is cached; read ~0.1x cost; 5 min TTL; 4 breakpoints
Batch API?Async, 50% cheaper, up to 24 hours
Structured outputs?output_config.format JSON schema / messages.parse()
Citations?citations.enabled on the document; cited_text + page
What is MCP?Open protocol: AI apps ↔ tools/data; host-client-server; JSON-RPC
MCP primitives?Tools (model), Resources (app), Prompts (user)
MCP transports?stdio (local), Streamable HTTP (remote)
What is a Skill?SKILL.md + files; loaded on demand via progressive disclosure
CLAUDE.md?Claude Code's project memory, loaded every session
Hooks?Deterministic shell commands on lifecycle events
Subagent?A specialized worker with its own context window
Plan mode?Read-only explore + plan, no edits
Agent SDK vs Tool Runner?Agent SDK = Claude Code harness + built-in tools; Tool Runner = a loop for only your tools
Workflow vs agent?Workflow: code-defined path; Agent: the LLM decides
RAG?Retrieve relevant chunks → into the prompt → grounded answer
Embeddings from Anthropic?No; Voyage AI is recommended
How to reduce hallucination?Allow "I don't know", quotes/citations, grounding, verification
Prompt injection?Instructions hidden in data; least privilege + approvals
RSP / ASL?Safeguards scale with capability; ASL-1..4+
C# SDK package?NuGet Anthropic (v10+ official); Microsoft.Extensions.AI via AsIChatClient()
C# streaming method?client.Messages.CreateStreaming(...) → IAsyncEnumerable
How does computer use work?computer_toolset_20260801; screenshot → action → screenshot loop, in an isolated VM
Memory tool?Client-side /memories files; view/create/str_replace/insert/delete/rename
Programmatic tool calling?Claude calls tools from inside code execution; fewer round trips
Mid-conversation system message?role: system in messages; saves the cache, an operator channel
Preserved thinking?Thinking blocks are tied to the model + conversation; keep the harness append-only
Fallbacks?On a refusal, retry on another model in the same call (fallbacks: "default")
Managed Agents objects?Environment, Agent (versioned), Session, Vault, Deployment
ant apply ?Syncs agents/environments from repo files (control plane as code)
Output styles?Default / Explanatory / Learning: Claude Code's response style
Built-in subagents?Explore, Plan, general-purpose
Interpretability?Understanding features/circuits inside the model (Golden Gate Claude, circuit tracing)
MCP server in C#?ModelContextProtocol package; AddMcpServer().WithStdioServerTransport().WithToolsFromAssembly()
MCP auth?OAuth 2.1 + PKCE + Protected Resource Metadata for HTTP servers; credentials from env for stdio
Agent SDK custom tool?@tool + create_sdk_mcp_server; name mcp__server__tool
Hook decision priority?deny > defer > ask > allow
GitHub Actions?anthropics/claude-code-action@v1; /install-github-app; @claude mention
Web search price?$10 per 1,000 searches + tokens
Image tokens?⌈w/28⌉ × ⌈h/28⌉; 1000×1000 ≈ 1,296 tokens
Rate limit algorithm?Token bucket; cached reads don't count toward ITPM
Model lifecycle?Active → Legacy → Deprecated → Retired; 60+ days notice
Where did temperature go?Removed in API version 2026-10-21; control via prompting/effort
Compliance?SOC 2 Type I/II, ISO 27001, ISO 42001, HIPAA (BAA)
LangChain vs direct SDK?Simple → SDK; many integrations/provider switch → framework; .NET → IChatClient

30.2 Comparison cheat-sheet

ThisvsDifference
MCPTool useTool use is an API feature; MCP is a standard protocol that makes tools reusable
SkillMCPSkill = knowledge/procedure; MCP = connection/access
CompactionContext editingCompaction summarizes; context editing clears old tool results
Prompt cachingBatchCaching makes a repeated prefix cheaper; batch makes async requests 50% cheaper (both can run together)
ProjectsArtifactsProjects = a workspace of knowledge + chats; Artifacts = a window for generated content
max_tokensTask budgetmax_tokens is a hard cut (the model doesn't know about it); a task budget is visible to the model, which paces itself
Claude CodeAgent SDKClaude Code is a product; the Agent SDK is its harness as a library
Agent SDKManaged AgentsYou host the Agent SDK; Anthropic hosts Managed Agents

30.3 Code questions that may be asked

# 1. Retry with backoff (the SDK already does this, but here is the manual pattern)
import time, anthropic
def call_with_retry(**kw):
    for attempt in range(5):
        try:
            return client.messages.create(**kw)
        except anthropic.RateLimitError:
            time.sleep(2 ** attempt)              # exponential backoff
        except anthropic.APIStatusError as e:
            if e.status_code < 500: raise         # don't retry 4xx
            time.sleep(2 ** attempt)
    raise RuntimeError("retries exhausted")

# 2. Model router: easy tasks go to the cheaper model
def route(question):
    label = client.messages.create(
        model="claude-haiku-5-5", max_tokens=10,
        system="Write only EASY or HARD.",
        messages=[{"role": "user", "content": question}]).content[0].text
    return "claude-opus-5-5" if "HARD" in label else "claude-haiku-5-5"

# 3. Token count before sending
n = client.messages.count_tokens(model="claude-opus-5-5",
        messages=[{"role": "user", "content": big_text}]).input_tokens

30.4 System design: "Build a chatbot over company docs"

  1. Requirements: users, data size, freshness, latency, privacy (PII), cost budget.
  2. Ingestion: docs → chunk → contextual embeddings → vector DB + BM25 index.
  3. Query: hybrid retrieve → rerank → top chunks + system prompt (cached) → Claude (Sonnet/Opus) with citations.
  4. Guardrails: input screening, "answer only from the docs", PII masking, refusal handling.
  5. Scale/cost: prompt caching, model routing (Haiku for simple), streaming UX, rate-limit retries.
  6. Quality: eval set (100+ real questions), LLM-as-judge, feedback thumbs up/down, monitoring.

30.5 Practice checklist

  • Create an API key in the Console and send your first request from both Python and C#
  • Build a streaming chat CLI that remembers history
  • Write a manual tool loop with one tool (a SQL query or weather)
  • Do the same thing with Tool Runner and understand the difference
  • Use structured outputs to extract an invoice PDF's data into JSON
  • Add prompt caching and verify cache_read_input_tokens
  • Run sentiment on 100 reviews with the Batch API
  • Build an MCP server with FastMCP and add it in Claude Code with claude mcp add
  • Create a CLAUDE.md, a subagent and a PostToolUse hook for your own project
  • Write a SKILL.md and test that Claude loads it at the right time
  • Build a small RAG bot + an eval set of 20 questions
  • Add IChatClient + the tools of an MCP server in a C# console app
  • Turn on compaction, run a long conversation and look at the compaction block
  • Build a simple file-based backend for the memory tool
  • Create a Managed Agent, run a session and view the trace in the Console
  • Build a plugin in Claude Code (command + subagent + hook) and install it