{
  "$about": "Public profile of Himanshu Verma, generated from https://himanshuverma.dev. Everything here is also on the website. There is deliberately no phone number: email or LinkedIn are the ways to reach him.",
  "updated": "2026-10-20",
  "name": "Himanshu Verma",
  "role": "Senior GenAI Engineer",
  "location": "Bengaluru, India",
  "experience": "6+ yrs",
  "headline": "senior GenAI engineer who builds agents that read balance sheets",
  "summary": "Six years from Java services at TCS, to voice NLP on Samsung Bixby, to multi-agent systems at HDFC. I design agentic workflows with LangGraph and MCP, vectorless RAG, and the LLMOps that keeps them safe in production: gateways, guardrails and evals.",
  "plainSummary": "I build AI assistants that read documents, numbers and conversations, then explain what they found, so teams can make decisions faster. Right now I do this at HDFC, where my AI tools help analyse credit card statements.",
  "openTo": "Open to senior GenAI / AI engineering roles, LLM consulting and collaborations on agentic systems.",
  "availability": {
    "noticePeriod": "3 months, negotiable",
    "relocation": "Always open to relocating",
    "remote": "Open to remote roles",
    "preferredCities": [
      "Bengaluru",
      "Pune",
      "Gurgaon"
    ]
  },
  "assistant": {
    "offLimits": [
      "salary, compensation, CTC or expected pay",
      "internal, confidential or client details of his current or past employers (including HDFC)",
      "his personal life: family, relationships, age, health, religion, caste or political views",
      "his home address or phone number"
    ],
    "suggestions": [
      "What does Himanshu do?",
      "What has he built with LangGraph?",
      "Notice period and locations?",
      "What do colleagues say about him?",
      "Explain vectorless RAG simply",
      "How do I contact him?"
    ]
  },
  "results": "Made Samsung's Bixby understand two of its features correctly 97% of the time, up from 75%. Made AI document reading 15% more accurate. Made credit card statement analysis 25% better at HDFC.",
  "links": {
    "website": "https://himanshuverma.dev/",
    "email": "hello@himanshuverma.dev",
    "linkedin": "https://www.linkedin.com/in/him0912/",
    "github": "https://github.com/himanshuverma0912",
    "x": "",
    "blog": "https://himanshuverma.dev/blog",
    "rss": "https://himanshuverma.dev/blog/rss.xml",
    "qa": "https://himanshuverma.dev/qa",
    "llms": "https://himanshuverma.dev/llms.txt",
    "mcp": "https://mcp.himanshuverma.dev/mcp"
  },
  "specialties": [
    "Agent-to-Agent (A2A)",
    "MCP",
    "Vectorless RAG",
    "LLMOps",
    "Guardrails",
    "Evals",
    "Fine-tuning & quantization",
    "OCR"
  ],
  "stack": [
    "Python",
    "Java",
    "TypeScript",
    "LangGraph",
    "LlamaIndex",
    "CrewAI",
    "AutoGen",
    "LiteLLM",
    "NeMo Guardrails",
    "Transformers",
    "PyTorch",
    "Airflow",
    "Kafka",
    "Kubernetes",
    "AWS",
    "GCP"
  ],
  "models": [
    "Claude",
    "Gemini",
    "GPT",
    "Llama",
    "Mistral",
    "Phi",
    "BERT",
    "T5",
    "BLIP"
  ],
  "knowsAbout": [
    "Generative AI",
    "Large Language Models",
    "Agentic AI",
    "Model Context Protocol",
    "Retrieval-Augmented Generation",
    "LLMOps",
    "NLP",
    "LangGraph",
    "Python"
  ],
  "career": [
    {
      "when": "B.Tech",
      "title": "Bachelor of Technology, Information Technology",
      "org": "Dr. A.P.J. Abdul Kalam Technical University",
      "summary": "Built the computer science base, then went straight into enterprise software.",
      "tags": [
        "IT",
        "Java",
        "DSA"
      ],
      "current": false
    },
    {
      "when": "2020",
      "title": "Assistant Software Engineer",
      "org": "Tata Consultancy Services · Tata Sky project · Jan 2020 – Jan 2022",
      "summary": "Wrote and maintained Java services for channel pricing and pack-management automation, handling web requests with servlets and hunting down defects before customers saw them.",
      "tags": [
        "Java",
        "Servlets",
        "Testing"
      ],
      "current": false
    },
    {
      "when": "2022",
      "title": "Software Engineer · NLP Engineer, Bixby",
      "org": "Tech Mahindra · Samsung Bixby voice assistant · Feb 2022 – Jul 2024",
      "summary": "Built the StreamingOTT and Launcher capsules for Bixby and raised their accuracy from 75% to 97%. Started fine-tuning and quantizing LLMs for specific tasks and datasets.",
      "tags": [
        "NLP",
        "Voice",
        "LLM fine-tuning"
      ],
      "current": false
    },
    {
      "when": "2024",
      "title": "Senior Software Engineer · GenAI",
      "org": "Ascendion · for IQVIA · Jul 2024 – Apr 2025",
      "summary": "Designed and fine-tuned generative models for OCR, lifting extraction accuracy by 15% and cutting error rates by 20%.",
      "tags": [
        "OCR",
        "Deep learning",
        "Azure"
      ],
      "current": false
    },
    {
      "when": "2025",
      "title": "Senior GenAI Engineer",
      "org": "HDFC · Bengaluru · Jun 2025 – present",
      "summary": "Architected an autonomous Agent-to-Agent credit card analysis framework on LangGraph and MCP, improving statement analysis by 25%. Built Airflow ingestion pipelines into PostgreSQL and moved them to Google Cloud Composer. Transformer-based summarization of statements raised extraction efficiency by 40%.",
      "tags": [
        "A2A",
        "LangGraph",
        "MCP",
        "Airflow",
        "GCP"
      ],
      "current": false
    },
    {
      "when": "now",
      "title": "Building agents you can audit",
      "org": "Current focus",
      "summary": "Vectorless retrieval with PageIndex, guardrails between data and model, and the evals and gateways that make agentic systems safe to run on financial data.",
      "tags": [
        "Agentic AI",
        "LLMOps",
        "Evals"
      ],
      "current": true
    }
  ],
  "careerPlain": [
    "Studied information technology at university.",
    "Wrote the software that priced TV channel packs for Tata Sky customers, and made sure it ran without errors.",
    "Worked on Samsung's voice assistant, Bixby. Got it to understand requests about streaming shows and opening apps correctly 97 times out of 100, up from 75. Started training AI models for specific jobs.",
    "Trained AI to read scanned documents for IQVIA, a healthcare data company. It became 15% more accurate and made 20% fewer mistakes.",
    "Built a team of AI assistants that read credit card statements and explain them. Statement analysis improved by 25% and pulling out the important details became 40% more efficient.",
    "Making AI assistants safe and checkable enough to trust with financial data."
  ],
  "projects": [
    {
      "id": "equity-research",
      "title": "Agentic Equity Research Command Center",
      "tags": [
        "genai",
        "agents"
      ],
      "summary": "A multi-agent research workstation. Agents pull metrics from PostgreSQL over MCP, read only the relevant pages of earnings calls via a vectorless PageIndex, score news sentiment, and write an executive briefing with a BUY / HOLD / SELL call.",
      "plainSummary": "An AI research assistant for stock investors. Name a company, and a small team of AI agents gathers its numbers, reads the right pages of its reports, checks the mood of the news, then writes a short buy, hold or sell briefing.",
      "stack": [
        "Python",
        "LangGraph",
        "MCP",
        "Gemini 3 Flash",
        "LiteLLM",
        "Streamlit",
        "PostgreSQL"
      ],
      "repo": "https://github.com/himanshuverma0912/GenAI-Equity-Research-Command-Center",
      "demo": "",
      "url": "https://himanshuverma.dev/#p-equity-research",
      "code": {
        "file": "research_graph.py",
        "language": "python",
        "source": "# Four agents, one LangGraph state machine.\nbuilder = StateGraph(EquityResearchState)\n\nbuilder.add_node(\"gatherer\", data_gatherer_node)      # PostgreSQL metrics over MCP\nbuilder.add_node(\"researcher\", document_researcher_node)  # vectorless PageIndex\nbuilder.add_node(\"sentiment\", sentiment_analyzer_node)    # live news + NLP\nbuilder.add_node(\"analyst\", financial_analyst_node)       # JSON payload for the UI\n\nbuilder.add_edge(START, \"gatherer\")\nbuilder.add_edge(\"gatherer\", \"researcher\")\nbuilder.add_edge(\"researcher\", \"sentiment\")\nbuilder.add_edge(\"sentiment\", \"analyst\")\nbuilder.add_edge(\"analyst\", END)\n\ngraph = builder.compile()\nfinal_state = await graph.ainvoke({\"ticker\": \"HDFCBANK.NS\"})"
      }
    },
    {
      "id": "llm-cost-calculator",
      "title": "LLM Cost Calculator",
      "tags": [
        "genai",
        "web"
      ],
      "summary": "Estimate what an AI product costs to run. Compare inference prices across LLMs, add embeddings and a vector database, and see per-message, per-user and monthly totals, including how much prompt caching saves.",
      "plainSummary": "A calculator that shows how much it costs each month to run an AI chatbot, depending on which AI model you choose and how many people use it.",
      "stack": [
        "Next.js",
        "TypeScript",
        "Tailwind",
        "Vercel"
      ],
      "repo": "https://github.com/himanshuverma0912/ModelCostCalculator",
      "demo": "https://model-cost-calculator-jade.vercel.app",
      "url": "https://himanshuverma.dev/#p-llm-cost-calculator",
      "code": {
        "file": "components/TopSummaryBanner.tsx",
        "language": "typescript",
        "source": "// 1. LLM math (with prompt caching)\nconst actualCachedTokens = useCaching ? Math.min(inputTokens, cachedTokens) : 0;\nconst uncachedTokens = inputTokens - actualCachedTokens;\nconst cachePrice = selectedModel.inPrice * (selectedModel.cacheRate || 0.10);\n\nconst uncachedCost = (uncachedTokens / 1000000) * selectedModel.inPrice;\nconst cachedCost = (actualCachedTokens / 1000000) * cachePrice;\nconst outputCost = (outputTokens / 1000000) * selectedModel.outPrice;\n\nconst llmCostPerMsg = uncachedCost + cachedCost + outputCost;\nconst llmMonthly = totalMsgs * llmCostPerMsg;\n\n// 2. Savings vs. no cache\nconst costPerMsgNoCache = ((inputTokens / 1000000) * selectedModel.inPrice) + outputCost;\nconst savings = totalMsgs * costPerMsgNoCache - llmMonthly;"
      }
    },
    {
      "id": "voice-analytics",
      "title": "GenAI Voice Analytics Library",
      "tags": [
        "genai",
        "tools"
      ],
      "summary": "Voice analytics building blocks packaged as an importable Python library, so the same transcription and translation logic runs in a web API, an Airflow worker, a batch job or a notebook. Config is injected, and exit codes form a contract orchestrators can branch on.",
      "plainSummary": "A toolkit that turns recorded phone calls into text and can translate them, for example into Hindi. Other teams plug it into their own systems.",
      "stack": [
        "Python",
        "uv",
        "Gemini",
        "OpenAI-compatible gateway",
        "Docker"
      ],
      "repo": "https://github.com/himanshuverma0912/voice_analytics",
      "demo": "",
      "url": "https://himanshuverma.dev/#p-voice-analytics",
      "code": {
        "file": "src/voice_analytics/llm/json_repair.py",
        "language": "python",
        "source": "def extract_json_block(content: str) -> str | None:\n    \"\"\"Pull JSON out of a markdown code fence, if there is one.\n\n    Models fail at JSON in predictable ways; this handles the\n    common ```json { ... } ``` wrapper.\n    \"\"\"\n    if \"```\" not in content:\n        return None\n\n    for part in content.split(\"```\"):\n        block = part.strip()\n        if block.startswith(\"json\"):\n            block = block[4:].strip()\n        if block.startswith(\"{\") or block.startswith(\"[\"):\n            return block\n\n    return None"
      }
    },
    {
      "id": "resume-parser",
      "title": "Resume Parser with spaCy NER",
      "tags": [
        "nlp"
      ],
      "summary": "Turns unstructured PDF resumes into structured fields. A custom spaCy named-entity model trained on annotated resumes extracts name, designation, companies, skills, college, degree and graduation year.",
      "plainSummary": "Reads a resume and pulls out the key facts: name, job title, companies, skills and education. It saves recruiters from copying details by hand.",
      "stack": [
        "Python",
        "spaCy",
        "NER",
        "PDF extraction"
      ],
      "repo": "https://github.com/himanshuverma0912/Resume-parsing-by-Spacy-NER",
      "demo": "",
      "url": "https://himanshuverma.dev/#p-resume-parser",
      "code": {
        "file": "src/ML_Pipeline/predict_model.py",
        "language": "python",
        "source": "import spacy\nfrom ML_Pipeline import text_extractor\n\ndef predict(path):\n    nlp = spacy.load(\"model\")                        # custom-trained NER\n    pages = text_extractor.convert_pdf_to_text(path)\n    for text in pages:\n        doc = nlp(text.replace(\"\\n\", \" \"))\n        for ent in doc.ents:\n            print(f\"{ent.label_.upper():{30}}-{ent.text}\")"
      }
    },
    {
      "id": "bart-summarizer",
      "title": "Abstractive Summarization with BART",
      "tags": [
        "nlp",
        "genai"
      ],
      "summary": "Paste a news article URL and get a short, readable summary next to the original text. Built on the BART transformer and a dataset of about 40,000 professionally written news summaries.",
      "plainSummary": "Paste a link to a news article and get a short summary in plain words, written by AI rather than cut and pasted from the article.",
      "stack": [
        "Python",
        "Transformers",
        "BART",
        "Web app"
      ],
      "repo": "https://github.com/himanshuverma0912/Abstractive-Text-Summarization-using-Transformers-BART-Model",
      "demo": "",
      "url": "https://himanshuverma.dev/#p-bart-summarizer",
      "code": null
    },
    {
      "id": "review-classifier",
      "title": "App Review Sentiment Classifier",
      "tags": [
        "nlp"
      ],
      "summary": "End-to-end text processing and a binary classifier for app-store reviews. Compares bag-of-words, binary counts, n-grams and TF-IDF features with logistic regression, and ships a CLI for predictions.",
      "plainSummary": "Reads app-store reviews and tells you whether each one is happy or unhappy, so a product team can spot problems quickly.",
      "stack": [
        "Python",
        "scikit-learn",
        "NLTK",
        "Logistic Regression"
      ],
      "repo": "https://github.com/himanshuverma0912/NLP-Project-on-Text-Processing-and-Classification",
      "demo": "",
      "url": "https://himanshuverma.dev/#p-review-classifier",
      "code": {
        "file": "Source/model.py",
        "language": "python",
        "source": "def vectorize(token_list, y, vect=\"bow\", min_df=5, ng_low=1, ng_high=3,\n              test_size=0.2, rs=42):\n    if vect == \"bow\":\n        vectorizer = CountVectorizer(min_df=min_df)\n    elif vect == \"bowb\":\n        vectorizer = CountVectorizer(binary=True, min_df=min_df)\n    elif vect == \"ng\":\n        vectorizer = CountVectorizer(min_df=min_df, ngram_range=(ng_low, ng_high))\n    elif vect == \"tf\":\n        vectorizer = TfidfVectorizer(min_df=min_df)\n    else:\n        raise Exception(\"vect has to be one of 'bow', 'bowb', 'ng' 'tf'\")\n\n    X = vectorizer.fit_transform(token_list)\n    X_train, X_test, y_train, y_test = train_test_split(\n        X, y, test_size=test_size, stratify=y, random_state=rs)\n    return X_train, X_test, y_train, y_test, vectorizer"
      }
    }
  ],
  "posts": [
    {
      "slug": "vectorless-rag",
      "title": "Vectorless RAG: retrieve by reasoning, not by similarity",
      "date": "2026-10-12",
      "tags": [
        "rag",
        "retrieval",
        "agents"
      ],
      "summary": "Why \"chunk, embed, top-k\" struggles on long financial reports, and how a table-of-contents tree that an LLM navigates can find the right pages instead.",
      "minutes": 3,
      "url": "https://himanshuverma.dev/blog/vectorless-rag",
      "markdownUrl": "https://himanshuverma.dev/blog/vectorless-rag.md",
      "sources": [
        {
          "name": "PageIndex on GitHub (VectifyAI)",
          "url": "https://github.com/VectifyAI/PageIndex"
        },
        {
          "name": "My Equity Research Command Center",
          "url": "https://github.com/himanshuverma0912/GenAI-Equity-Research-Command-Center"
        }
      ],
      "alsoOn": [],
      "markdown": "The default recipe for retrieval-augmented generation is simple: split documents into chunks, embed every chunk, embed the question, and hand the model the top-k most similar chunks. It works well for FAQs and short articles. It works much less well on a 300-page annual report.\n\n## Where similarity search breaks\n\nSimilarity is not the same thing as relevance. A question like *\"How did net interest margin move this year?\"* is semantically close to every paragraph that mentions margins, including the glossary, the risk disclaimer and last year's commentary. The paragraph that actually answers it may use different words, or sit in a table.\n\nChunking makes it worse:\n\n- **Tables get cut in half.** The row you need ends up in one chunk and its column headers in another.\n- **References break.** \"See note 14\" points to a chunk the retriever never sees.\n- **Structure disappears.** A human analyst knows the answer lives in *Management Discussion → Financial Performance*. A flat list of chunks has no idea where it is in the document.\n\n## The idea: a table of contents the model can read\n\nVectorless RAG keeps the document's structure instead of throwing it away.\n\n1. **Index:** build a tree that mirrors the document, like a table of contents. Each node is a section with a short summary and the page range it covers.\n2. **Retrieve:** give the model the tree, not the text. It reasons about which branches could contain the answer, opens them, and drills down until it reaches the right pages.\n3. **Answer:** read only those pages, and cite them.\n\nThis is the approach behind PageIndex, an open-source project from VectifyAI. There is no vector database and no chunking: retrieval is a reasoning step over the tree.\n\n```python\ndef find_pages(question, node, llm, depth=0):\n    \"\"\"Walk the document tree like an analyst flipping to the right section.\"\"\"\n    if not node.children:\n        return [node.pages]\n    menu = \"\\n\".join(f\"{i}. {c.title}: {c.summary}\" for i, c in enumerate(node.children))\n    picks = llm.choose(\n        f\"Question: {question}\\nWhich sections could contain the answer?\\n{menu}\",\n        max_choices=2,\n    )\n    return [p for i in picks for p in find_pages(question, node.children[i], llm, depth + 1)]\n```\n\n## What I used it for\n\nIn my Equity Research Command Center, a researcher agent works from a master index of page summaries for each company's reports. Before the analyst agent writes anything, the researcher picks the pages that talk about the metrics that matter for that sector, such as NIM, NPA and CASA for a bank, and passes only those pages on. The analyst then has to quote exact figures from them.\n\nThe win was less about accuracy on paper and more about **traceability**: every number in the briefing points back to a page I can open.\n\n## Trade-offs\n\n| | Vector RAG | Vectorless (tree) RAG |\n|---|---|---|\n| Best for | Many short, loosely structured docs | Few long, well-structured docs |\n| Query cost | One embedding + a lookup | Several LLM calls while navigating |\n| Explainability | \"These chunks were similar\" | \"I opened section 4.2, pages 61–63\" |\n| Failure mode | Confidently retrieves the wrong paragraph | Picks the wrong branch, but you can see it |\n\nIt is not a replacement for vector search everywhere. For a support bot over thousands of short articles, embeddings are cheaper and good enough. For contracts, filings, manuals and policies, where the structure *is* the meaning, letting the model navigate is often the better retriever. The two also combine well: use vectors to pick the document, then a tree to find the page.\n\n## Takeaways\n\n- Ask what a human expert would do. If they would open the table of contents, your retriever probably should too.\n- Keep page numbers all the way to the final answer. Citations are the cheapest evaluation tool you have.\n- Measure it on your own documents. The PageIndex authors report strong results on FinanceBench, but your reports are not their benchmark."
    },
    {
      "slug": "mcp-explained",
      "title": "MCP in 10 minutes: one plug for every tool",
      "date": "2026-10-05",
      "tags": [
        "mcp",
        "agents",
        "llm"
      ],
      "summary": "What the Model Context Protocol actually standardises: hosts, clients and servers, the three things a server can offer, and what changed in the stateless 2026 spec.",
      "minutes": 3,
      "url": "https://himanshuverma.dev/blog/mcp-explained",
      "markdownUrl": "https://himanshuverma.dev/blog/mcp-explained.md",
      "sources": [
        {
          "name": "MCP architecture overview",
          "url": "https://modelcontextprotocol.io/docs/learn/architecture"
        },
        {
          "name": "MCP specification",
          "url": "https://modelcontextprotocol.io/specification/latest"
        },
        {
          "name": "JSON-RPC 2.0",
          "url": "https://www.jsonrpc.org/"
        }
      ],
      "alsoOn": [],
      "markdown": "Before MCP, every AI app wired up its tools by hand. A Slack integration for one assistant had to be rewritten for the next. The Model Context Protocol fixes that with one standard way for an AI application to discover and use tools and data, the same way USB-C gave every device one port.\n\n## Three roles\n\n- **Host:** the AI application the user talks to, such as an IDE, a chat app or your own agent.\n- **Client:** a connection the host creates for each server. One host, many clients, one client per server.\n- **Server:** a program that offers context or actions. It can run locally next to the host, or remotely as a web service.\n\nThe protocol only defines how context is exchanged. It does not decide which model you use or how you prompt it.\n\n## What a server can offer\n\nA server exposes three kinds of things, each with a `*/list` method so the client can discover them:\n\n1. **Tools:** functions the model can call, like querying a database or creating a ticket (`tools/list`, `tools/call`).\n2. **Resources:** read-only context, like a file, a table schema or a record.\n3. **Prompts:** reusable templates, like a system prompt with few-shot examples.\n\nClients can offer something back. The main one today is **elicitation**: a server can ask the user for missing information or a confirmation. Sampling (a server asking the host's model for a completion) and logging are deprecated as of protocol version `2026-07-28`.\n\n## On the wire\n\nEvery message is **JSON-RPC 2.0**. There are two transports:\n\n- **stdio** for local servers: the host starts the server as a child process and talks over standard input and output.\n- **Streamable HTTP** for remote servers: HTTP POST for requests, with optional server-sent events for streaming. OAuth is the recommended way to get tokens.\n\nCalling a tool looks like this:\n\n```json\n{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 3,\n  \"method\": \"tools/call\",\n  \"params\": { \"name\": \"get_equity_snapshot\", \"arguments\": { \"ticker\": \"HDFCBANK.NS\" } }\n}\n```\n\n## What changed in 2026: stateless by default\n\nOlder versions started every session with an `initialize` handshake and kept state on the connection. The `2026-07-28` spec makes MCP **stateless**: every request carries the protocol version and the client's capabilities in its `_meta` field, so a server can handle each request on its own. A client that wants to know what a server supports up front sends `server/discover`, and the response can be cached.\n\nFor remote servers this matters a lot: any instance behind a load balancer can answer any request, with no sticky sessions.\n\n## A real server in a few lines\n\nThis is the shape of the MCP server in my Equity Research Command Center, using the official Python SDK. Each decorated function becomes a tool, and its docstring becomes the description the model reads when deciding whether to call it.\n\n```python\nfrom mcp.server.fastmcp import FastMCP\n\nmcp = FastMCP(\"FinanceServer\")\n\n@mcp.tool()\nasync def get_equity_snapshot(ticker: str) -> str:\n    \"\"\"Fetch the latest internal metrics (price, market cap, P/E) for a ticker.\"\"\"\n    row = await db.latest_metrics(ticker.upper())\n    if not row:\n        return f\"No internal data found for {ticker.upper()}.\"\n    return f\"P/E {row.pe_ratio}, market cap INR {row.market_cap}\"\n\nif __name__ == \"__main__\":\n    mcp.run()  # stdio by default\n```\n\nMy LangGraph \"data gatherer\" agent is the MCP client. It never touches the database directly: it lists the server's tools and calls `get_equity_snapshot`, which means a security layer can sit between the data and the model.\n\n## Takeaways\n\n- Write tool descriptions for the model, not for humans. They decide whether your tool gets called.\n- Keep tools small and named by what they do (`get_equity_snapshot`, not `query`).\n- Treat tool output as untrusted input to the model. Redact what it should not see before it leaves the server."
    }
  ],
  "qa": [
    {
      "id": "what-is-the-difference-between-rag-and-fine-tuning-and-when-",
      "question": "What is the difference between RAG and fine-tuning, and when would you pick each?",
      "level": "medium",
      "tags": [
        "rag",
        "fine-tuning",
        "llm"
      ],
      "source": "Common GenAI interview question",
      "answer": "They solve different problems.\n\n- **RAG** gives the model *knowledge* at question time: it retrieves relevant documents and puts them in the prompt. Use it when facts change often, when answers must cite sources, or when data is private and per-user.\n- **Fine-tuning** changes the model's *behaviour*: tone, output format, a domain's vocabulary, or a narrow task it should do reliably. Use it when prompting alone can't get consistent behaviour.\n\nA good rule of thumb: **RAG for what the model should know, fine-tuning for how it should act.** They also combine well, for example a model fine-tuned to always answer in a strict JSON format, fed with retrieved context.",
      "url": "https://himanshuverma.dev/qa#q-what-is-the-difference-between-rag-and-fine-tuning-and-when-"
    },
    {
      "id": "what-do-temperature-and-top-p-control",
      "question": "What do temperature and top-p control?",
      "level": "easy",
      "tags": [
        "llm",
        "decoding"
      ],
      "source": "Common GenAI interview question",
      "answer": "Both control how the next token is sampled.\n\n- **Temperature** rescales the probabilities before sampling. Low values (around 0–0.3) make the most likely tokens even more likely, giving focused, repeatable output. High values flatten the distribution, giving more varied and creative output.\n- **Top-p (nucleus sampling)** keeps only the smallest set of tokens whose probabilities add up to *p*, then samples from those. With `top_p = 0.9`, very unlikely tokens are never picked.\n\nFor extraction, classification or code, use low temperature. Usually you tune one of the two, not both.",
      "url": "https://himanshuverma.dev/qa#q-what-do-temperature-and-top-p-control"
    },
    {
      "id": "how-do-you-evaluate-a-rag-system",
      "question": "How do you evaluate a RAG system?",
      "level": "medium",
      "tags": [
        "rag",
        "evals"
      ],
      "source": "Interview at a fintech (example)",
      "answer": "Evaluate retrieval and generation separately, because they fail differently.\n\n**Retrieval**\n- *Context recall:* did we retrieve everything needed to answer?\n- *Context precision:* how much of what we retrieved was actually relevant?\n\n**Generation**\n- *Faithfulness / groundedness:* is every claim in the answer supported by the retrieved context?\n- *Answer relevance:* does the answer actually address the question?\n\nIn practice: build a small golden set of real questions with expected answers and source pages, score it automatically (frameworks like Ragas compute these metrics, often with an LLM as judge), and spot-check by hand. Track the scores on every change to chunking, prompts or models.",
      "url": "https://himanshuverma.dev/qa#q-how-do-you-evaluate-a-rag-system"
    },
    {
      "id": "what-is-the-kv-cache-and-why-does-it-matter-for-inference",
      "question": "What is the KV cache, and why does it matter for inference?",
      "level": "medium",
      "tags": [
        "llm",
        "inference",
        "performance"
      ],
      "source": "Common GenAI interview question",
      "answer": "When a transformer generates text one token at a time, each new token attends to every previous token. Without caching, the keys and values for the whole prefix would be recomputed at every step.\n\nThe **KV cache** stores the key and value tensors for tokens already processed, so each new step only computes them for the newest token. This makes generation much faster.\n\nThe cost is **memory**: the cache grows with sequence length × layers × heads × batch size. That's why long context windows are expensive to serve, and why techniques like grouped-query attention, paged attention and KV-cache quantization exist. It's also the idea behind **prompt caching**: reusing the cached prefix across requests that share the same system prompt.",
      "url": "https://himanshuverma.dev/qa#q-what-is-the-kv-cache-and-why-does-it-matter-for-inference"
    },
    {
      "id": "why-is-attention-scaled-by-the-square-root-of-d-k",
      "question": "Why is attention scaled by the square root of d_k?",
      "level": "hard",
      "tags": [
        "transformers",
        "attention"
      ],
      "source": "Deep-learning interview round (example)",
      "answer": "Attention computes `softmax(QKᵀ / √d_k) V`.\n\nThe dot product of two vectors with `d_k` dimensions, whose components have zero mean and unit variance, has a variance of about `d_k`. For large `d_k` the scores become large in magnitude, so the softmax saturates: one token gets almost all the weight and the gradients become tiny.\n\nDividing by `√d_k` brings the variance back to about 1, which keeps the softmax in a range where it still learns well.",
      "url": "https://himanshuverma.dev/qa#q-why-is-attention-scaled-by-the-square-root-of-d-k"
    },
    {
      "id": "what-is-lora-and-why-is-it-popular",
      "question": "What is LoRA and why is it popular?",
      "level": "medium",
      "tags": [
        "fine-tuning",
        "peft"
      ],
      "source": "Common GenAI interview question",
      "answer": "**LoRA (Low-Rank Adaptation)** fine-tunes a model without updating its original weights. For selected weight matrices `W`, it learns a small update `ΔW = B·A`, where `A` and `B` are thin matrices of rank `r` (often 8–64).\n\nWhy it's popular:\n- **Far fewer trainable parameters**, often well under 1% of the model, so it fits on modest GPUs.\n- **Small adapters:** you can keep one base model and swap adapters per task or customer.\n- **No extra latency** once the adapter is merged back into the weights.\n\n**QLoRA** goes further by keeping the frozen base model in 4-bit precision while training the LoRA adapters.",
      "url": "https://himanshuverma.dev/qa#q-what-is-lora-and-why-is-it-popular"
    },
    {
      "id": "what-causes-hallucinations-and-how-do-you-reduce-them-in-pro",
      "question": "What causes hallucinations, and how do you reduce them in production?",
      "level": "medium",
      "tags": [
        "llm",
        "reliability",
        "guardrails"
      ],
      "source": "LinkedIn post discussion (example)",
      "answer": "A model generates the most plausible continuation, not a verified fact. Hallucinations rise when the answer isn't in its training data or context, when the prompt pressures it to answer anyway, or when retrieval returns the wrong context.\n\nWays to reduce them:\n1. **Ground it:** retrieve the right context, and instruct the model to answer only from it.\n2. **Allow \"I don't know\":** say explicitly that refusing is better than guessing.\n3. **Require citations:** ask for source references, then check them in code.\n4. **Constrain the output:** structured output (JSON schemas) for anything a program will consume.\n5. **Verify:** a second pass or rules that check numbers and claims against the source.\n6. **Measure:** track faithfulness on a test set so you notice regressions.",
      "url": "https://himanshuverma.dev/qa#q-what-causes-hallucinations-and-how-do-you-reduce-them-in-pro"
    },
    {
      "id": "how-does-quantization-speed-up-llms-and-what-do-you-give-up",
      "question": "How does quantization speed up LLMs, and what do you give up?",
      "level": "medium",
      "tags": [
        "inference",
        "quantization"
      ],
      "source": "Interview for an on-device ML role (example)",
      "answer": "Quantization stores weights (and sometimes activations) in fewer bits, for example 8-bit or 4-bit integers instead of 16-bit floats.\n\n**Gains:** a much smaller memory footprint (4-bit weights are about a quarter of FP16), so bigger models fit on smaller GPUs or devices, and faster inference because generation is usually limited by memory bandwidth.\n\n**Costs:** some loss of accuracy, which grows as precision drops. Methods like GPTQ and AWQ calibrate the quantization on sample data to keep the most important weights accurate. Always re-run your own evals after quantizing, especially for maths, code and long-context tasks.",
      "url": "https://himanshuverma.dev/qa#q-how-does-quantization-speed-up-llms-and-what-do-you-give-up"
    },
    {
      "id": "how-would-you-design-guardrails-for-a-banking-chatbot",
      "question": "How would you design guardrails for a banking chatbot?",
      "level": "hard",
      "tags": [
        "guardrails",
        "system-design",
        "security"
      ],
      "source": "System design round (example)",
      "answer": "Think in layers, before and after the model:\n\n1. **Input guardrails:** detect prompt injection and jailbreaks, block out-of-scope topics, and redact PII before it reaches a third-party model.\n2. **Context controls:** retrieve only documents the signed-in user is allowed to see, and treat retrieved text and tool output as untrusted.\n3. **Action controls:** the model *proposes* actions; deterministic code checks permissions, limits and confirmations before anything executes. Never let the model move money directly.\n4. **Output guardrails:** check for leaked PII, unsupported financial advice and unsupported claims; enforce the response format.\n5. **Observability:** log prompts, retrieved context and decisions; run red-team tests and evals before every release.\n\nTools like NeMo Guardrails or an LLM gateway help, but the key idea is that safety lives in code around the model, not only in the prompt.",
      "url": "https://himanshuverma.dev/qa#q-how-would-you-design-guardrails-for-a-banking-chatbot"
    },
    {
      "id": "how-would-you-choose-a-chunk-size-for-rag",
      "question": "How would you choose a chunk size for RAG?",
      "level": "easy",
      "tags": [
        "rag",
        "retrieval"
      ],
      "source": "Common GenAI interview question",
      "answer": "There's no universal number; it depends on the documents and the questions.\n\n- **Too small:** each chunk lacks context, and answers get split across chunks.\n- **Too large:** chunks mix several topics, similarity gets diluted, and you waste context window.\n\nA practical approach: start around a few hundred tokens with some overlap, split on the document's natural structure (headings, paragraphs, table boundaries) rather than a fixed character count, and attach metadata like the section title and page number to every chunk. Then evaluate several settings on a golden question set and keep the one with the best retrieval recall. For long structured documents, consider a hierarchical or tree-based index instead of flat chunks.",
      "url": "https://himanshuverma.dev/qa#q-how-would-you-choose-a-chunk-size-for-rag"
    }
  ],
  "recommendationsUrl": "https://www.linkedin.com/in/him0912/details/recommendations/",
  "recommendations": [
    {
      "id": "qurratulain-saleem",
      "name": "Qurratulain Saleem",
      "role": "Lead AI/ML Engineer, Ascendion",
      "relation": "Worked with Himanshu on the same team",
      "date": "2025-05",
      "during": "Senior Software Engineer · GenAI · Ascendion",
      "excerpt": "I’ve had the opportunity to work closely with Himanshu, and I’ve consistently been impressed by his technical depth, reliability, and collaborative spirit.",
      "text": "I’ve had the opportunity to work closely with Himanshu, and I’ve consistently been impressed by his technical depth, reliability, and collaborative spirit. As a data engineer and AI engineer, Himanshu brings a strong command over data pipelines, processing workflows, and backend systems that power data-driven products.\n\nHe has a solid understanding of core data engineering principles — from designing scalable ingestion processes to ensuring data integrity across systems. His ability to write clean, modular, and maintainable code stands out, especially when dealing with large datasets and performance-sensitive tasks.\n\nIn addition to his technical skills, Himanshu is a great team player. He communicates clearly, participates actively in Agile ceremonies, and is always willing to review or support peer work. His problem-solving mindset and calm demeanor make him someone you can count on under pressure.\n\nHe’ll be an asset wherever he goes.",
      "linkedin": ""
    },
    {
      "id": "abhay-kumar",
      "name": "Abhay Kumar",
      "role": "Developer AI, SAP Labs",
      "relation": "Collaborated with Himanshu from another company",
      "date": "2024-10",
      "during": "Senior Software Engineer · GenAI · Ascendion",
      "excerpt": "During our collaboration, I was impressed by his ability to quickly learn and master complex concepts.",
      "text": "I highly recommend Himanshu Verma for his excellent skills in Python application development and AI/ML. During our collaboration, I was impressed by his ability to quickly learn and master complex concepts. Himanshu consistently delivered innovative solutions and demonstrated a strong understanding of both development and machine learning frameworks. His collaborative spirit and dedication to excellence make him a valuable asset to any team. I am confident that he will excel in any role he takes on and continue to make significant contributions to the field.",
      "linkedin": ""
    },
    {
      "id": "sushant-kumar",
      "name": "Sushant Kumar",
      "role": "Lead ML Engineer, Samsung R&D India",
      "relation": "Worked with Himanshu on Samsung's voice assistant",
      "date": "2024-09",
      "during": "Software Engineer · NLP Engineer, Bixby · Tech Mahindra",
      "excerpt": "He could effectively communicate complex technical concepts to both technical and non-technical audiences.",
      "text": "I had the pleasure of working with Himanshu on our Voice Assistant project. He was a valuable asset to our team, consistently demonstrating exceptional skills and a strong work ethic.\n\nHimanshu’s research and analysis abilities were truly impressive. He consistently delivered insightful findings that informed our project direction. Additionally, His presentation skills were top-notch. He could effectively communicate complex technical concepts to both technical and non-technical audiences.\n\nHe was always reliable and dedicated to his work, consistently meeting or exceeding deadlines. I highly recommend Himanshu for any role that requires strong technical skills, excellent communication abilities, and a passion for innovation.",
      "linkedin": ""
    },
    {
      "id": "akhil-srirambhatla",
      "name": "Akhil Srirambhatla",
      "role": "MBA, NMIMS Mumbai · ex-TCS",
      "relation": "Mentored by Himanshu at TCS",
      "date": "2025-04",
      "during": "Assistant Software Engineer · Tata Consultancy Services",
      "excerpt": "From day one, he has been incredibly approachable, patient, and always willing to share his knowledge.",
      "text": "I’ve had the privilege of being mentored by Himanshu in my initial days of career in TCS, and I can confidently say that his guidance has made a lasting impact on my professional journey. From day one, he has been incredibly approachable, patient, and always willing to share his knowledge.\n\nWhether it was helping me understand basic stuff or walking me through concepts I was unfamiliar with, Himanshu always took the time to explain things clearly and thoroughly. Himanshu has excellent communication and creative skills and more than that the interest to learn new evolving technologies.\n\nI’m truly grateful to have had the opportunity to learn from Himanshu, and I highly recommend him to anyone looking for a skilled professional with a big heart for mentorship",
      "linkedin": ""
    },
    {
      "id": "babji-polisetti",
      "name": "Babji Polisetti",
      "role": "Java Developer",
      "relation": "Himanshu was his senior at TCS",
      "date": "2024-09",
      "during": "Assistant Software Engineer · Tata Consultancy Services",
      "excerpt": "Himanshu not only possesses a deep understanding of software development but also has the remarkable ability to explain complex concepts in an easily digestible manner.",
      "text": "Himanshu not only possesses a deep understanding of software development but also has the remarkable ability to explain complex concepts in an easily digestible manner. Their patience and mentorship helped me build a solid foundation in coding and problem-solving, and their feedback always pushed me to think critically and improve my skills.",
      "linkedin": ""
    }
  ]
}
