Company Interview Questions · IT Services

Coforge & Hexaware: GenAI Interviews

❓ 6 questions🏢 Coforge & Hexaware🆕 Recent reports

Coforge & Hexaware: GenAI Interview Experiences (2026). Rounds, real reported questions and model answers, compiled from public candidate reports (sources at the end). 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.

About this interview

Compiled from public candidate reports: Hexaware Gen AI Data Scientist (Bengaluru, June 2026, offer) and a Coforge technical manager role with a GenAI panel (Chennai/Pune, April 2026). The questions are paraphrased, and the model answers are written by EasyLearnSpace.

Hexaware Coforge
Role Gen AI Data Scientist QA / Technical Manager (GenAI panel)
Rounds L1: theory + basic coding; L2: mostly Python + GenAI and agentic AI Two leadership panels (Pune director; Chennai GenAI panel)
Key questions Chunking strategies, hybrid search, self-attention How you use GenAI day to day and in frameworks; what you built (LangChain, RAG)
Outcome Offer accepted; panel supportive, difficulty fairly high Not selected; candidate felt the GenAI panel was one-sided

01Rounds at a glance

02Questions and model answers

Q1
Which chunking strategies do you know, and when do you use each?
  • Fixed-size + overlap (e.g. 512 tokens, 10–15% overlap): simple and a good baseline.
  • Recursive character / structure-aware: split on headings → paragraphs → sentences, keeping sections whole. Best for documentation and policies.
  • Semantic chunking: split where adjacent-sentence embedding similarity drops. Gives cleaner topics, at extra cost.
  • Document-specific: keep tables and code blocks whole; slide-level or page-level for PDFs.
  • Parent–child / small-to-big: retrieve small chunks, send the parent section to the LLM.
  • Pick by evaluation: measure recall@k and faithfulness for 2–3 strategies on your own Q&A set.
Q2
What is hybrid search and why does it beat pure vector search?
  • Hybrid = sparse (BM25 keywords) + dense (embeddings), with results fused using Reciprocal Rank Fusion: score = Σ 1/(k + rank).
  • Dense search catches meaning and synonyms. Sparse search catches exact terms: product codes, names, error IDs, acronyms. Embeddings often miss these.
  • Add a cross-encoder re-ranker on the fused top 50 for the best precision.
  • Available in Azure AI Search, Elasticsearch/OpenSearch, Weaviate, Qdrant and Pinecone (sparse-dense).
Q3
Explain self-attention step by step.
  1. For each token embedding x, compute Q = xW_Q, K = xW_K, V = xW_V.
  2. Scores: QKᵀ, the similarity of each query with every key.
  3. Scale by √d_k so the softmax doesn't saturate, then apply a mask (causal or padding).
  4. Softmax turns the scores into attention weights that sum to 1.
  5. Output = weights × V: each token's new representation mixes information from the relevant tokens. - Cost is O(n²·d) in sequence length, which is why long context is expensive. FlashAttention and sparse or linear attention help.
Q4
Coforge panel: how do you use GenAI in your day-to-day work and frameworks?

Answer (practical and specific):

  • Engineering productivity: Copilot-style code assistants for tests and boilerplate, always reviewed; LLMs for test-case generation from requirements in QA.
  • Frameworks: LangChain/LangGraph for RAG and agents, LlamaIndex for ingestion, RAGAS for evaluation, LangSmith for tracing.
  • What I built: "A RAG assistant over 2,000 test-strategy documents. Hybrid search plus a re-ranker; it cut test-planning time by about 30%."
  • If challenged: "There are several valid designs. I chose X because of constraints A and B; I'd switch to Y if latency or cost mattered more." Stay calm and evidence-based.
Q5
Python: group words that are anagrams of each other.
from collections import defaultdict

def group_anagrams(words):
    g = defaultdict(list)
    for w in words:
        g["".join(sorted(w))].append(w)
    return list(g.values())

print(group_anagrams(["eat", "tea", "tan", "ate", "nat", "bat"]))
  • O(n · k log k) for k-length words. Using a 26-letter count tuple as the key gives O(n·k).
Q6
What is agentic AI, and how would you make an agent reliable?
  • Agentic AI: an LLM that plans, calls tools, observes the results and iterates towards a goal, often with memory and several cooperating agents.
  • Reliability checklist:
  • Few, well-described tools with strict schemas.
  • A step and time limit.
  • Retries with validation.
  • A deterministic workflow where the path is known.
  • Human approval for side effects.
  • Tracing of every step.
  • A trajectory evaluation set.
  • Fallback to a human when unsure.

03How to prepare

Sources

Created by Ajeetkumar