Company Interview Questions · IT Services

IBM: AI Engineer, Bengaluru (2025)

❓ 8 questions🏢 IBM🆕 Recent reports

IBM: AI Engineer Interview Experience (Bengaluru, 2025). 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 a public candidate report for an IBM AI Engineer role in Bengaluru (February 2025). The questions are paraphrased, and the model answers are written by EasyLearnSpace.

Role AI Engineer
Rounds 3: HackerRank online test → technical discussion → senior manager + architect
Online test 2 DSA coding problems + 2 MySQL queries
Reported outcome Not selected; the candidate rated the experience positive
Difficulty Medium. The online test filters out many candidates

01Rounds at a glance

02Questions and model answers

Q1
SQL: find the second-highest salary in each department.
SELECT department_id, salary
FROM (
  SELECT department_id, salary,
         DENSE_RANK() OVER (PARTITION BY department_id ORDER BY salary DESC) AS rk
  FROM employees
) t
WHERE rk = 2;
  • DENSE_RANK handles ties, so two people on the top salary are both rank 1. Window functions work in MySQL 8 and later.
Q2
DSA: return the indices of the two numbers that add up to a target.
def two_sum(nums, target):
    seen = {}
    for i, x in enumerate(nums):
        if target - x in seen:
            return [seen[target - x], i]
        seen[x] = i
    return []
  • One pass with a hash map: O(n) time and O(n) space, compared with O(n²) for brute force. State the brute force first, then optimise.
Q3
How did you use RAG in your project, and what problems did you face?

Answer (a structure to follow):

  1. The problem: "Analysts spent hours searching 3,000 policy PDFs."
  2. The architecture: loader → chunker (800 tokens, 120 overlap) → embeddings → vector DB → retriever (hybrid + re-rank) → LLM with a citation prompt → FastAPI + UI.
  3. Problems and fixes: - Tables were split badly, so I switched to layout-aware parsing. - Wrong chunks were retrieved, so I added a re-ranker and metadata filters. - The model hallucinated, so I made the prompt strict and showed "no answer" when the retrieval score was low.
  4. Metrics: recall@5 went from 0.71 to 0.89, faithfulness reached 0.93, and p95 latency was 2.1 seconds.
Q4
Which metrics do you use for classification models, and when?
  • Accuracy: only when classes are balanced.
  • Precision: of the items predicted positive, how many really are positive. Use it when false positives are costly, such as spam filters.
  • Recall: of the actual positives, how many were caught. Use it when misses are costly, such as fraud or disease detection.
  • F1: the harmonic mean of precision and recall, for imbalanced data.
  • ROC-AUC: ranking quality across thresholds. PR-AUC is better under heavy imbalance.
  • Confusion matrix: the full picture. Pick the decision threshold based on the business cost of each error type.
Q5
How do you evaluate an LLM application?
  • Offline:
  • A golden set of 100 to 500 questions with expected answers.
  • Retrieval metrics: recall@k and MRR.
  • Generation metrics (RAGAS / DeepEval): faithfulness, answer relevance, correctness.
  • Task-specific checks such as exact match for extraction or JSON validity.
  • LLM-as-judge with a clear rubric, calibrated against human labels.
  • Online: thumbs up/down, escalation rate, resolution rate, latency and cost per query, plus A/B tests for prompt or model changes.
  • Safety: toxicity, PII leakage, jailbreak test sets.
Q6
Explain overfitting and the ways to reduce it.
  • Overfitting: the model learns the noise in the training data, so it scores high on training and low on validation.
  • Fixes:
  • More or augmented data
  • A simpler model
  • Regularisation (L1/L2, dropout, weight decay)
  • Early stopping
  • Cross-validation
  • Feature selection
  • Ensembles (bagging)
  • For LLM fine-tuning: a lower learning rate, fewer epochs, LoRA instead of a full fine-tune, and a held-out evaluation set.
Q7
Python: what is the difference between a list and a tuple, and between deep copy and shallow copy?
  • List vs tuple: a list is mutable; a tuple is immutable, hashable (if its elements are), slightly faster, and can be used as a dict key.
  • Shallow copy (copy.copy, list[:]): a new outer object whose nested objects are shared.
  • Deep copy (copy.deepcopy): recursively copies everything, so changing a nested item does not affect the original.
Q8
Final round: how would you approach a new AI use case from a business team?
  1. Clarify: what problem, who the users are, what success looks like (a metric), and the constraints (data, privacy, budget).
  2. Check feasibility: what data exists and its quality, whether a simple rule or classic ML would do before reaching for an LLM, and the risks.
  3. Build a quick proof of concept on a small evaluation set and show it to users early.
  4. Plan production: security, monitoring, cost and a human fallback.
  5. Measure and iterate against the agreed metric. - Managers listen for business thinking + pragmatism, not just model names.

03How to prepare for IBM

Sources

Created by Ajeetkumar