Genpact's GenAI Lead Interview

Author
0


LinkedIn Story · GenAI Lead · Genpact

My LinkedIn Connection Just Cleared Genpact's GenAI Lead Interview — Round 2 Full Breakdown With Every Answer

15 questions across GenAI, RAG, ML math, statistics, and live coding. Principal Consultant level. Here’s how she answered every single one.

🏢 Genpact  •  💼 GenAI Lead · Principal Consultant  •  🖥️ Virtual · Round 2  •  📋 15 Questions · 60 Minutes

She messaged me on a Tuesday afternoon with three words: “I think I cleared.”

Priya has been in data science for 8 years — the last three deeply focused on GenAI and agentic systems. She’d applied for a GenAI Lead (Principal Consultant) role at Genpact, cleared Round 1 screening, and had just wrapped up Round 2 — the one that actually matters.

“It wasn’t just GenAI questions,” she told me. “They went deep into ML math, statistics, and even asked me to draw cosine similarity on a virtual whiteboard. I wasn’t expecting that at a Principal Consultant level.”

She shared every question with me and said — “Post this. Someone needs it.”

So here it is. Every question, exactly how Priya answered it.

Interview Details — Shared by Priya
CompanyGenpact
RoleGenAI Lead (Principal Consultant)
ModeVirtual (Video Call + Virtual Whiteboard)
RoundRound 2 — Technical Deep Dive
Duration~60 minutes
Outcome✓ Cleared

Question 1

Career Introduction

This is never just a formality at the Principal Consultant level. The interviewer is assessing your career narrative — does your journey make sense? Do you own a clear progression?

Priya structured hers in three acts:

  • Foundation (Years 1–3): Started as a Data Analyst, moved into ML Engineering. Built classical ML models in banking and retail. Learned to productionize models, not just build them.
  • Transition (Years 4–6): Shifted into NLP and deep learning. Led NLP projects — entity extraction, document classification, semantic search. First exposure to LLMs via GPT-3 fine-tuning.
  • GenAI Leadership (Years 6–8): Built and led a 6-person GenAI team. Delivered 3 production agentic AI systems for enterprise clients. Currently advising Fortune 500 clients on AI strategy.
💡 What works: End your introduction with your current mission — one sentence on what problem you’re solving right now. “I’m currently helping enterprises move from RAG POCs to production-grade agentic systems” is a powerful closer at the PC level.

Question 2

Tell me about your current project in detail — client requirement, technical architecture, tech stack, and your individual responsibilities.

This was the longest question — Priya spent 12 minutes on it. At the Principal Consultant level, they want to see that you own the solution, not just contribute to it.

Client Requirement

A large insurance company was drowning in ServiceNow tickets — 10,000+ incidents per month. L1 agents spent 60% of their time on repetitive RCA tasks. The client wanted an agentic AI system to triage, analyze, and resolve Tier-1 incidents autonomously.

Technical Architecture
  • Ingestion Layer: 5 years of historical incident data + 200+ SOPs embedded using text-embedding-3-small, stored in pgvector.
  • Agentic Layer: LangGraph-based multi-agent system with a Supervisor Agent routing to 4 specialist sub-agents: SOP Retriever, Incident Classifier, Resolution Generator, ServiceNow Updater.
  • RAG Pipeline: Hybrid retrieval (dense + BM25) → cross-encoder re-ranking → top-3 chunks injected into GPT-4o prompt.
  • Feedback Loop: Human agents flagged incorrect resolutions → bi-weekly re-ranker retraining.
  • Deployment: FastAPI on GCP Cloud Run, API Gateway with API key auth, Secret Manager.
Tech Stack

LangGraph · OpenAI GPT-4o · pgvector · PostgreSQL · FastAPI · GCP Cloud Run · API Gateway · Python · Streamlit

Individual Responsibilities
  • End-to-end solution architecture — requirements to production deployment.
  • Designed multi-agent orchestration logic and state management.
  • Built hybrid retrieval pipeline (30% improvement in context precision vs naive RAG).
  • Led client demos and stakeholder presentations. Managed 3 developers.
“At Principal Consultant level, you are the system. They’re not asking what your team built — they’re asking what you designed, decided, and defended.”

Question 3

How many total agents were in your solution and how were they orchestrated?

Total agents: 5 (1 Supervisor + 4 Specialist Agents)

AgentResponsibilityTriggers When
Supervisor AgentReads state, decides next agentEntry point and after every completion
SOP RetrieverFetches relevant SOPs from pgvectorsop_context is empty in state
Incident ClassifierClassifies severity: P1/P2/P3Severity not yet set in state
Resolution GeneratorGenerates resolution steps via RAGSOP retrieved + severity classified
ServiceNow UpdaterPushes resolution to ticketResolution generated + human approved

Orchestration: LangGraph StateGraph with conditional edges on the Supervisor node. Human-in-the-loop approval gate before the ServiceNow Updater.

“The Supervisor isn’t magic — it’s a Python function that reads a dictionary and returns a string. The intelligence is in the state design, not the routing logic.”

Question 4

How did you make sure AI responses were from internal resources only and not based on publicly available information?

Priya described a 3-layer containment strategy:

Layer 1 — Prompt-Level Constraint
SYSTEM: You are an internal incident resolution assistant. Answer ONLY using the context provided below. If the answer is not in the context, respond: "I don't have enough information in our internal knowledge base to answer this. Please escalate to L2." Do NOT use any external knowledge.
Layer 2 — RAG Architecture Itself

No query reaches the LLM without retrieved internal context attached. If retrieval returns zero relevant chunks (similarity score below threshold), the query is blocked at the retrieval layer — the LLM is never called.

Layer 3 — Faithfulness Verification

After generation, a faithfulness scorer (RAGAs) checks every claim. Responses below 0.85 faithfulness are blocked and replaced with a safe fallback message.

🔒 Additional measure: Internet access was disabled in the Cloud Run environment entirely — the LLM API was the only outbound endpoint allowed.

Question 5

How did you evaluate your RAG solution?

Priya used the RAGAs framework — and the interviewer asked her to name every metric and explain what each measures.

MetricWhat It MeasuresTarget
Context PrecisionOf retrieved chunks, what % were actually relevant?> 0.80
Context RecallOf all relevant info, what % did we retrieve?> 0.75
FaithfulnessIs every claim supported by retrieved context?> 0.85
Answer RelevanceDoes the answer address the question?> 0.80
Answer CorrectnessMatch against gold standard answers> 0.75

Beyond RAGAs: 200 golden QA pairs built by domain experts, LLM-as-Judge scoring via GPT-4o, and operational metrics (latency, token cost, cache hit rate) tracked in Looker dashboards weekly.


Question 6

What if your system is not able to find relevant data in the corpus? How will it respond?

Priya described a tiered fallback strategy:

  1. Similarity threshold check: If top chunk cosine similarity < 0.65, the LLM is never called. Response: “I couldn’t find relevant information in our knowledge base.”
  2. Partial match fallback: Similarity 0.65–0.75 → respond with a confidence disclaimer: “Based on the closest matching info I found — please verify with your team lead.”
  3. Escalation routing: Unanswered queries are automatically routed to an L2 queue in ServiceNow.
  4. Corpus gap logging: Every unanswered query logged in a “knowledge gap” table — feeds a monthly SOP review cycle.
“A system that says ‘I don’t know’ gracefully is infinitely more trustworthy than one that confidently makes something up. Design the failure path as carefully as the success path.”

Question 7

How will you handle it if your RAG solution is giving wrong answers confidently?

Detection
  • Faithfulness scoring (RAGAs): Automated check after every generation — unfaithful answers are caught and blocked.
  • Dual-LLM cross-check: A second LLM independently asked: “Does this answer contradict the provided context?” Disagreements trigger a block.
  • Human feedback loop: Reviewers flag wrong resolutions → stored for re-ranker retraining.
Prevention
  • Citation enforcement: Every claim must reference a chunk ID like [SOP-047, Section 3.2]. A validator checks all citations exist in retrieved chunks.
  • Temperature = 0: Set for factual generation — reduces creative/hallucinatory output.
  • Chunking audit: Confident wrong answers often trace to bad chunks. Retrieval logs audited weekly.
“Confident wrong answers usually mean the retriever found something plausible but wrong. That’s a retrieval problem, not a generation problem. Fix the retrieval first.”

Question 8

What is cosine similarity? What is the mathematical background? (Virtual whiteboard)

Priya said this was the most unexpected question. She was glad she understood it geometrically, not just as a formula.

The Intuition

Cosine similarity measures the angle between two vectors — not the distance between their endpoints. Two vectors pointing in the same direction score 1 (identical), perpendicular vectors score 0 (unrelated), opposite vectors score −1.

Why angle instead of distance? In NLP we care about meaning (direction), not magnitude. A 3-word sentence and a 300-word document on the same topic should be considered similar even though their vector magnitudes differ wildly.

📝 Virtual Whiteboard — Cosine Similarity
Vectors: A = [a₁, a₂, ..., aₙ]   and   B = [b₁, b₂, ..., bₙ]

Dot Product:   A · B = Σ (aᵢ × bᵢ)

Magnitudes:   |A| = √(Σ aᵢ²)     |B| = √(Σ bᵢ²)

cosine_similarity(A, B) = (A · B) / (|A| × |B|)

Range: −1 (opposite) → 0 (perpendicular) → +1 (identical direction)
import numpy as np A = np.array([1, 2, 3]) B = np.array([2, 4, 6]) # same direction, different magnitude dot_product = np.dot(A, B) # 1*2 + 2*4 + 3*6 = 28 magnitude_A = np.linalg.norm(A) # sqrt(1+4+9) = 3.74 magnitude_B = np.linalg.norm(B) # sqrt(4+16+36) = 7.48 cosine_sim = dot_product / (magnitude_A * magnitude_B) print(cosine_sim) # → 1.0 (identical direction!)

Why it matters for RAG: When a user query is embedded into a 1536-dimensional vector, cosine similarity finds chunks whose embedding vectors point in the most similar direction — regardless of text length.


Question 9

What is p-value and when should we use it?

Definition: The p-value is the probability of observing results at least as extreme as the ones you got, assuming the null hypothesis is true. It does NOT tell you the probability that your hypothesis is correct.

Decision Rule
p-value < α (typically 0.05) → Reject null hypothesis → Result is statistically significant

p-value ≥ α → Fail to reject null hypothesis → Insufficient evidence
When to Use It
  • A/B testing: Is the new model version performing significantly better than the baseline?
  • Feature selection: Is this feature statistically significantly correlated with the target?
  • Model comparison: Is the performance difference between two models real or just noise?
“A small p-value means your result is statistically surprising under the null hypothesis — not that your hypothesis is definitely true. These are very different things.”

Question 10

Which algorithms have you used for classification so far?

Priya grouped them by family and mentioned where she’d actually used each one — not just a list of names.

FamilyAlgorithmsUsed For
LinearLogistic Regression, SVM (SVC)Churn prediction, text classification
Tree-BasedDecision Tree, Random Forest, XGBoost, LightGBMFraud detection, incident severity
ProbabilisticNaive BayesSpam detection, document categorization
Instance-BasedKNNRecommendation, anomaly detection
NeuralMLP, Fine-tuned BERTSentiment analysis, intent classification
EnsembleVoting, StackingHigh-stakes production models

Question 11

Explain the mathematical background of any one ML algorithm. (Priya chose SVC — with 3 follow-up questions)

SVC — Support Vector Classifier

SVC finds the optimal hyperplane that separates two classes with the maximum margin. The margin is the distance between the hyperplane and the nearest data points (support vectors) from each class.

The Math
Hyperplane equation: w · x + b = 0

w = weight vector (normal to hyperplane), b = bias, x = input features

Margin = 2 / |w|

Objective: Maximize margin = Minimize |w|² / 2

Subject to: yᵢ(w · xᵢ + b) ≥ 1 for all training points i
Follow-Up 1: What is the Kernel Trick?

When data isn’t linearly separable, the kernel trick implicitly maps it into a higher-dimensional space where it becomes separable — without computing those high-dimensional coordinates explicitly. Common kernels: RBF (projects to infinite dimensions), Polynomial, Sigmoid.

Follow-Up 2: What is the C parameter?
  • High C: Classifies all training points correctly → small margin → risk of overfitting.
  • Low C: Accepts some misclassifications → larger margin → better generalization.
Follow-Up 3: SVC vs Logistic Regression?
  • SVC wins when classes are clearly separable and dataset is small-to-medium.
  • LR is faster, more interpretable, scales better to large datasets.
  • SVC with RBF beats LR on non-linear boundaries but requires feature normalization.

Question 12

What’s the difference between covariance and correlation?

DimensionCovarianceCorrelation
MeasuresDirection of linear relationshipDirection + strength
Range−∞ to +∞ (unbounded)−1 to +1 (normalized)
UnitsProduct of units of X and YDimensionless
InterpretabilityHard to compare across datasetsEasy to compare — standardized
FormulaΣ(xᵢ−x̄)(yᵢ−ȳ) / nCov(X,Y) / (σₓ × σᵜ)
“Covariance tells you which direction two variables move together. Correlation tells you how strongly. In practice, almost always use correlation — covariance is just an intermediate calculation.”

Question 13

What is a confusion matrix, its significance, and what metrics can be derived from it?

Predicted: PositivePredicted: Negative
Actual: PositiveTP (True Positive)FN (False Negative)
Actual: NegativeFP (False Positive)TN (True Negative)
Key Metrics Derived
Accuracy = (TP + TN) / (TP + TN + FP + FN)

Precision = TP / (TP + FP) — Of predicted positives, how many were correct?

Recall = TP / (TP + FN) — Of actual positives, how many did we catch?

F1 Score = 2 × (Precision × Recall) / (Precision + Recall)

Specificity = TN / (TN + FP)
💡 Precision vs Recall: Fraud detection → optimize Recall (don’t miss any fraud). Medical diagnosis → optimize Recall. Spam filtering → optimize Precision (don’t block legitimate content).

Question 14

What is collinearity?

Collinearity (multicollinearity) occurs when two or more predictor variables in a regression model are highly correlated with each other.

Why It’s a Problem
  • Makes it difficult to determine each feature’s individual effect on the target.
  • Coefficients become unstable — small data changes cause large coefficient swings.
  • Standard errors inflate → hypothesis tests become unreliable.
How to Detect It
  • Correlation matrix: Pairwise correlations above 0.8–0.9 are a red flag.
  • VIF (Variance Inflation Factor): VIF > 5 = moderate; VIF > 10 = severe.
How to Fix It
  • Remove one of the correlated features.
  • Use PCA to create uncorrelated components.
  • Apply Ridge Regression (L2 regularization) — shrinks correlated coefficients.
“Collinearity doesn’t break your model’s predictions — it breaks explainability. In consulting, where clients ask ‘why did the model decide this?’, that matters enormously.”

Question 15 · Live Coding

Write a program to subtract two numbers with fractions — assuming your compiler doesn’t understand fractions.

Beautifully deceptive. It tests whether you understand fraction arithmetic at a mathematical level and can implement it from scratch.

The key insight: represent fractions as two integers (numerator + denominator) and implement the math yourself.

● ● ●   python · fraction_subtract.py
import math def subtract_fractions(num1, den1, num2, den2): """ Subtract two fractions: (num1/den1) - (num2/den2) No built-in fraction types used. Math: a/b - c/d = (a*d - c*b) / (b*d) """ # Step 1: Cross multiply for common denominator result_num = (num1 * den2) - (num2 * den1) result_den = den1 * den2 # Step 2: Simplify using GCD common = math.gcd(abs(result_num), abs(result_den)) simplified_num = result_num // common simplified_den = result_den // common # Step 3: Keep denominator positive if simplified_den < 0: simplified_num = -simplified_num simplified_den = -simplified_den return (simplified_num, simplified_den) def display(num, den): return str(num) if den == 1 else f"{num}/{den}" # Test cases print(display(*subtract_fractions(3, 4, 1, 4))) # → 1/2 print(display(*subtract_fractions(5, 6, 1, 3))) # → 1/2 print(display(*subtract_fractions(1, 2, 3, 4))) # → -1/4 print(display(*subtract_fractions(7, 8, 7, 8))) # → 0
The Formula Behind It
a/b − c/d = (a×d − c×b) / (b×d)

Then simplify: divide numerator & denominator by GCD(|numerator|, denominator)
“When they say ‘your compiler doesn’t understand X’ — they’re asking you to implement X from mathematical first principles. That’s the whole test.”

What Genpact’s PC Round Is Really About

When I asked Priya what surprised her most, she said: “I expected it to be 90% GenAI. It was 50% GenAI, 30% ML math, and 20% statistics. They really want Principal Consultants who haven’t forgotten their foundations.”

At the PC level, Genpact isn’t just hiring GenAI coders — they’re hiring people who can walk into a client boardroom and defend every architectural and mathematical decision.

  • Own your architecture end-to-end. Know why you made every design decision — agents, retrieval, evaluation, fallbacks.
  • Don’t neglect ML fundamentals. SVC, confusion matrix, p-value, collinearity — table stakes at PC level.
  • The coding question will have a trick. “Fractions without fractions” tests mathematical maturity, not syntax knowledge.
  • Graceful degradation > happy path. Every RAG question had a failure-mode follow-up. Show you’ve thought about what breaks.

If this helped your prep — give it 50 claps. It helps more engineers find this content.

Have you interviewed at Genpact, Accenture, or any top firm recently? DM me on LinkedIn — I’ll feature your story next.

Follow me for a new company interview breakdown every single day.

#Genpact #GenAI #InterviewExperience #RAG #MachineLearning #DataScience #LangGraph #SVM #AIInterview #PrincipalConsultant #Statistics #TechInterview
Tags

Post a Comment

0Comments

Post a Comment (0)

#buttons=(Ok, Go it!) #days=(20)

Our website uses cookies to enhance your experience. Check Now
Ok, Go it!