1325 questions for senior .NET engineer interviews, each with a 30-second answer, the full answer, a deep dive, the follow-ups interviewers ask next, and real-world production problems.
Using AI well as a senior .NET engineer: AI-assisted development and its risks, building AI features in .NET with Azure OpenAI, Microsoft.Extensions.AI and Semantic Kernel (embeddings, vector search, RAG, function calling), and agents and MCP, with safety, prompt injection and data-leakage controls.
Evaluating AI features in .NET: building a golden evaluation set, retrieval metrics versus answer metrics, groundedness, relevance and completeness with Microsoft.Extensions.AI.Evaluation, LLM-as-judge calibration and bias, deterministic checks, safety evaluation, CI regression gates for prompt and model changes, and production feedback loops.
Production troubleshooting of a RAG assistant giving confident wrong answers: tracing a bad answer through retrieval, chunks and prompt, separating retrieval failures from generation failures, fixing chunking (split tables and clauses), hybrid search, reranking, relevance thresholds, grounding and citation rules, and preventing recurrence with evaluation and monitoring.
The mechanics of the agent loop: the model proposing tool calls, the host executing them and feeding results back, conversation state and memory, termination conditions and iteration caps, and how FunctionInvokingChatClient and the Microsoft Agent Framework implement it in .NET.
Building a Model Context Protocol server in .NET 10 with the ModelContextProtocol SDK: the three primitives (tools, resources, prompts), stdio vs Streamable HTTP transports, tool annotations, DI, authorisation with MapMcp, and keeping tools narrow and validated.
MCP-specific security: OAuth 2.1 with audience-bound tokens and no token passthrough, least-privilege tool scoping, server-side confirmation for destructive tools, tool poisoning through descriptions and changed tool definitions, confused deputy risks, and vetting third-party MCP servers.
Architecture of an agentic feature in a .NET product: agent vs workflow decision, autonomy levels, tool design and permissions, input/output guardrails, human approval for side effects, cost and latency budgets, state, evaluation and rollout.
Observability for LLM features and agents: OpenTelemetry GenAI semantic conventions, UseOpenTelemetry in Microsoft.Extensions.AI, spans for model and tool calls, token and cost metrics, content capture and PII, Application Insights and Aspire dashboards, quality signals and alerting.
Incident response for an agent that took a wrong real-world action: containment with a kill switch, data repair from the audit log, diagnosing from traces (ambiguous tool results, missing validation, prompt injection, model change), and the guardrails added afterwards.