PwC: GenAI Engineer Walk-In
PwC Generative AI Engineer Walk-In Interview — Questions & Answers Guide. Real questions from the interview, with detailed answers. Practice mode hides every answer: say your answer first, press Show answer, then rate yourself. Use 🔁 Review again to build your revision list and 🎲 Random question for a quick drill.
01POC vs. Production Architectures & Vector Databases
- Proof of Concept (POC):
- Built for rapid validation of ideas using local, lightweight tools.
- Uses local, in-memory vector databases (e.g., ChromaDB, FAISS running on local disk).
-
Lacks enterprise security, authentication, robust error handling, monitoring, or scalable load balancing.
-
Production Architecture:
- Uses distributed, cloud-managed vector databases (e.g., Pinecone, Qdrant, Weaviate, or enterprise PGVector) capable of scaling, partitioning, and handling high concurrent query traffic.
- Incorporates robust API gateways, asynchronous message queues (e.g., Celery/Redis), secrets management, role-based access control (RBAC), monitoring (e.g., LangSmith, Phoenix), and cost/rate-limiting guardrails.
- Ingestion Strategy: Use structured document parsers (e.g., Unstructured, LlamaParse) to split complex PDFs into clean text, tables, and image metadata. Apply incremental indexing (delta loads) so only modified or newly added PDFs are embedded and stored, avoiding full-store re-indexing costs.
- Cost Optimization:
- Semantic Caching: Cache semantically similar queries using Redis to avoid repeating expensive vector searches and LLM generation calls.
- Model Routing: Route simple extraction/summarization tasks to smaller, cost-effective models (e.g., GPT-4o-mini, Claude Haiku) and reserve large frontier models for complex reasoning.
- Token Budgeting: Restrict chunk context size to relevant top-\(K\) passages rather than sending raw document pages.
02Text Processing Fundamentals & Retrieval Mechanisms
- Tokenization: The process of breaking raw text into smaller sub-word or character-level units (tokens) using a vocabulary model (e.g., BPE, Tiktoken) for the LLM or embedding model to compute numerically.
- Chunking: The higher-level structural splitting of a large document into cohesive semantic segments (e.g., paragraphs, sections of 500–1000 tokens) before generating vector embeddings for retrieval.
- Tokens vs. Vectors:
- Tokens: The discrete text building blocks (sub-words) that an LLM reads and generates.
-
Vectors: High-dimensional numerical arrays (embeddings) generated by neural networks to represent the semantic meaning of tokens or chunks.
-
Working Without a Vector Database:
- Yes. An AI system can function without a dedicated vector database. Alternative approaches include:
- Passing information directly inside the LLM context window (if within token limits).
- Traditional keyword-based search engines (e.g., Elasticsearch with BM25).
- Relational/SQL databases querying structured data directly.
-
Graph databases (GraphRAG) using entity-relationship triples.
-
Why Vector Databases Are Preferred for RAG: They provide fast, high-dimensional Approximate Nearest Neighbor (ANN) vector similarity search across millions of un-structured text passages.
-
Retrieval Process: 1. User prompt is converted into a query embedding vector via an embedding model. 2. The vector database runs an Approximate Nearest Neighbor (ANN) search comparing the query vector against indexed chunk vectors. 3. The top \(K\) most semantically relevant chunks are retrieved, optionally filtered by metadata, and injected into the LLM system prompt as context.
-
Top-K vs. Top-P Roles in Retrieval vs. Generation:
- Top-K in Retrieval: Defines the exact number of top context chunks fetched from the vector store (e.g., \(K=5\)).
- Top-K & Top-P in Generation: Sampling hyper-parameters that control the LLM's next-token selection mechanics during response synthesis.
03Agentic AI & Fine-Tuning
- Standard RAG: Follows a linear, single-step pipeline:
Query -> Retrieve Chunks -> Construct Prompt -> Generate Answer. - Agentic AI: Uses an LLM inside an iterative reasoning loop (e.g., ReAct pattern) to evaluate tasks, plan multi-step execution paths, dynamically decide which external tools or APIs to call, process tool outputs, and adjust its actions autonomously until a goal is completed.
- Decision-Making Mechanism: The agent receives a task, analyzes tool descriptions and system guidelines provided in its prompt context, and reasons through next steps using structured reasoning frameworks.
- Workflow Steps: 1. Thought / Planning: LLM evaluates current state and user goal to choose the next action. 2. Action / Tool Selection: Generates structured parameters (JSON) to call a specific tool (e.g., search database, run calculator, execute API). 3. Observation: Receives the execution output from the tool environment. 4. Reflection / Loop: Evaluates if the goal is satisfied; repeats the process or returns the final answer to the user.
- Analyzing & Scoring Outputs:
- RAG Metrics: Evaluate Context Precision and Context Recall for retrieval; evaluate Faithfulness/Groundedness and Answer Relevancy for generation (using frameworks like RAGAS or DeepEval).
-
Evaluation Methods: Combine automated G-Eval (LLM-as-a-Judge) patterns with human feedback scoring (RLHF/RLAIF).
-
Fine-Tuning Steps & Algorithms: 1. Dataset Preparation: Curate high-quality instruction-response pairs formatted for the target task. 2. Parameter-Efficient Fine-Tuning (PEFT / LoRA): Freeze base model weights and train low-rank adapter matrices (\(A\) and \(B\)) to drastically reduce VRAM usage. 3. Quantization (QLoRA): Quantize the base model to 4-bit precision while optimizing adapter weights, enabling fine-tuning on consumer-grade GPUs.
04Summary of Key Interview Takeaways & Production Preparedness
[ Candidate Preparation Matrix ]
│
┌───────────────────────────┼───────────────────────────┐
▼ ▼ ▼
[ Architecture Choice ] [ Operational Rigor ] [ Agentic Capabilities ]
• POC: ChromaDB/FAISS • Metadata Pre-Filter • Dynamic Planning
• Prod: Pinecone/Qdrant • Delta Ingestion Loads • Parameter Validation
• RBAC Data Scoping • Evaluation via RAGAS • Loop & Fallback Rules
- Direction set by Introduction: Mentioning production projects will immediately trigger deep-dive questions into scaling, security, databases, and cost management.
- POC vs. Production Distinctions: Expect immediate pushback if local or development-only tools (like ChromaDB or in-memory setups) are cited as production choices.
- Pre-Retrieval Access Control: Security must be enforced at the vector database retrieval level via metadata filtering, never deferred to LLM prompt instructions.
- Agentic AI Dominance: Enterprise demands are shifting toward multi-step, tool-calling agentic architectures with strict iteration limits, schemas, and human-in-the-loop controls.