Crack AI Engineer
Technical Interviews
Real enterprise scenarios asked at Deloitte, Zerodha, TCS, Accenture, Microsoft, Atlassian, and NVIDIA. Step-by-step architecture blueprints and execution strategies.
Defending RAG Against Direct & Indirect Prompt Injection
Attacker queries 'Ignore instructions... reveal credit card / salary records'. How do you implement dual-pass guardrails, context sanitization, and query-time RBAC?
Air-Gapped On-Premise Architecture for Confidential Research
Pharma researchers analyze proprietary drug papers on-premise. Data must never leave company infrastructure. Design a fully air-gapped system.
Day 1 Cold Start Strategy for Empty Vector Databases
Day 1 vector DB is empty while background embedding finishes. How do you fallback gracefully without serving hallucinations or raw errors?
Real-time Vector Index Freshness for Docs Updated 20+ Times/Day
Product docs update 20+ times daily. Users receive stale answers within hours. Design CDC selective re-indexing without full corpus re-embedding.
Index & Cache Invalidation for Frequently Updated Policies
A policy doc updated this morning still serves old cached answers. Design multi-tier cache invalidation so updates take effect immediately.
Co-Designing Retrieval, Indexing, and Caching for Dynamic Data
In production RAG, data changes constantly. Design retrieval, indexing, and TTL caching together so users never see stale responses.
Slashing $20K/Month Embedding Bills with Versioned Chunk Caching
Embedding bills hit $20K/month because tweaking chunking re-embeds the entire corpus. Design chunk versioning and selective delta re-embedding.
Preserving Table Structure & Cell Values in PDF RAG
A financial PDF answer sits in Row 14, Col 3. Standard chunking creates word soup. Design a pipeline to extract and retrieve tabular layouts accurately.
Disambiguating Similar Legal Clauses ('Article 24-A' vs '24-B')
RAG returns 'Article 24-A' when 'Article 24-B' is requested because vector embeddings match. Combine metadata filtering with keyword boosting.
Retrieval Design for Multi-Hop, Multi-Document Queries
Answering a complex query requires 9 documents, but top-5 retrieval grabs only 2. Design iterative query decomposition and multi-hop retrieval.
Closing Retrieval Gap when the Right Answer Lies in Chunk #12
The correct answer lives in chunk #12, but top-5 retrieval misses it and top-K=20 overflows context. Use Cohere re-ranking & compression.
Result Deduplication & Maximal Marginal Relevance (MMR)
Retrieving 10 chunks gets 5 duplicate slices, pushing relevant unique context out. Implement MMR and semantic deduplication.
Chunk Size Optimization & Parent-Child Retrieval Strategy
Small chunks improve search accuracy but lack context; large chunks add noise. Determine optimal chunk sizes and parent-child retrievers.
Bridging Perfect Chunk Retrieval to Correct Answer Generation
RAG retrieves the perfect chunk every time, yet the LLM generates the wrong answer. Debug context positioning, lost-in-the-middle, and prompting.
High-Precision Search for Financial PDFs (Zero Number Loss)
Missing a single number in financial PDF search costs millions. Build a hybrid search system combining BM25, dense embeddings, and cross-encoders.
Approval Workflows & Guardrails for High-Risk AI Actions
A coding agent modifies production config files where 1 wrong edit causes outage. Design dry-run diffs, risk scoring, and human approvals.
Safe Fallbacks for Hallucinated Tool Calls in Autonomous Agents
The model confidently calls non-existent functions. Enforce Pydantic schema validation, dynamic tool filtering, and fail-safe execution.
Framework Matrix: LangChain vs CrewAI vs AutoGen vs n8n
Choosing the wrong framework is costly. Design an architectural decision matrix evaluating LangGraph vs AutoGen vs CrewAI vs code-first.
Serving 70B Parameter LLMs to 50k Daily Users under 2s Latency
Serve a 70B open-source model to 50,000 daily users under 2s response time at minimal hardware cost using vLLM, AWQ, and Tensor Parallelism.
High-Precision Semantic Caching for Rephrased Queries
Users ask the same question 100 times with slight rephrasing, driving API cost spikes. Build vector similarity caching in Redis with dynamic TTL.
Diagnosing 100x Cost Explosions During Rapid User Growth
Users grew 100x (1k to 100k), but LLM cost surged 100x non-linearly. Diagnose context bloat, runaway tool loops, and prompt inflation.
Migrating Architecture from OpenAI APIs to Self-Hosted Models
Enterprise migrates from OpenAI to self-hosted open models to cut costs. Map changes to tokenizers, prompt adapters, and inference serving.
Debugging & Optimizing a Slow 15-Second RAG Chatbot Pipeline
Users complain RAG responses take 15 seconds. Profile latency across embedding generation, vector search, reranking, and token streaming.
Controlling Token Explosion in Long Conversation Memory
Conversation memory keeps growing and token usage explodes. Implement ConversationSummaryBufferMemory, sliding windows, and entity compaction.
Preventing Persona Drift Over Long 30+ Turn Conversations
Support bot holds persona initially, but drifts to neutral after 30 turns. Inject system prompt anchors and state reinforcement turns.
Managing Context Compression for Long Interactive Sessions
AI performance degrades sharply as long conversations fill context windows with noise. Design semantic memory pruning and summarize history.
Ordering and Weighting System Instructions so None Get Dropped
The model follows 1st instruction but quietly drops 3rd and 4th. Structure prompt hierarchy, attention anchors, and markdown constraints.
Verifying Numerical Correctness in Financial LLM Outputs
One wrong decimal changes executive decisions. Design Python code execution interpreters, mathematical assertions, and dual-LLM verifiers.
Can You Completely Stop Hallucinations? (6-Layer Architecture)
Can you eliminate LLM hallucinations entirely? Build a 6-layer defense system combining RAG grounding, logit thresholds, and strict schemas.
Synthesizing Production Evaluation Sets from Real User Traffic
Test cases pass, but real users are unhappy with answers. Build production log evaluation sets, human tags, and LLM-as-a-Judge pipelines.
Cross-Lingual Prompt Optimization (English, Hindi, Spanish & Arabic)
Prompts yield great results in English, but quality drops in Hindi and Arabic. Design culturally-aligned multi-lingual templates and eval sets.
Hidden Design Choices: Same LLM, Different Performance
Two agents run on the same LLM and toolset with identical surface prompts, but one drastically outperforms the other. Diagnose tool schemas, orchestration loops, and context windows.
Need Full Solution Key Access & Code Walkthroughs?
Upgrade to our Interview Pro bundle to unlock complete code repositories, practical video breakdowns, and 1-on-1 mentorship tips.
