Skip to main content
Anuraag Mishra
← home/Mini stories

Mini stories

Shorter than the case studies: one problem, what I did about it, and what changed.

Work examples are anonymized: no client names, internal tools, thresholds or data. How I write about work →

Agentic Systems

Agent tools for people search

Problem

To find the right person, the agent queried several directories itself, pulled raw results into its context and looped until it had an answer. Answers were slow, expensive and uneven.

What I did

  • Built MCP tools that search the sources in parallel and merge duplicates into one record per person, matching on employee ID or email before any fuzzy matching.
  • Rank by what the request asks for; with no stated preference, use the requester's own profile as context.
  • Return one detailed profile plus a 3–10 person shortlist, with a skill that decides when that is enough and when to call the lower-level search, merge, rank or profile tools.

Result

  • 5–⁠10 s per answer, was 10–⁠30 s
  • ~90% fewer LLM tokens
  • ~50% fewer agent loops
  • More consistent answer quality

Results compare the same agent with and without the tools and skill.

MCPAgentsEntity ResolutionRanking

Routing & Reliability

Routing with a safe default

Problem

Every request waited on a 2–⁠4 s routing step, and ambiguous requests were pushed into a specialist path, where the wrong specialist does more harm than the default would.

What I did

  • Designed a cascade: deterministic signals first, then BM25 and semantic retrieval, with confidence and route-separation gates.
  • Anything ambiguous goes to the default path instead of a guessed specialist.
  • Measured per-specialist precision, Macro F1 and wrong-specialist routes against an established system, not just overall accuracy.

Result

  • Under 1 ms for ~70% of requests, was 2–⁠4 s
  • Ambiguous requests fall back to the default
PythonBM25EmbeddingsRouting

Evaluation & Reliability

Release evaluation bench

Problem

Release testing was partial and manual. It took the team half a day to two days, so it could not run on every release.

What I did

  • Replay realistic multi-turn conversations through the same endpoints the product UI calls, with the model's source access varied from full retrieval down to memory only.
  • Score answers with a web-enabled LLM judge that knows what the tested model could see, plus a lexical check that the names the user asked about survive into the answer, because judges tend to quietly reinterpret an unfamiliar name.
  • Run short high-load bursts in quiet windows to find bottleneck servers and the daily failure patterns behind them.

Result

  • Full release test in under an hour, was half a day to two days
  • Runs every release, even weekly
  • Failures grouped for agent-assisted triage

Next goal: 99.999% response success, up from 99.99%. That is a target, not a result.

LLM EvaluationLLM-as-JudgeNLPLoad Testing

Ranking & Personalization

Follow-up question suggestions

Problem

Suggested follow-up questions tended to repeat: near-duplicates crowded the list, and users kept seeing questions they had already been shown.

What I did

  • Build candidates from the current conversation and from parent-child links between questions.
  • Rank with MMR, balancing relevance against diversity so near-duplicates don't take over the list.
  • Penalize questions the user has already seen, and generate replacements in the background when the pool runs thin.

Result

Suggestions follow the conversation and keep changing as it goes; a thin pool refills in the background instead of serving the same questions again.

PythonEmbeddingsRankingMMR

Document Intelligence

Splitting large documents for vision models

Problem

Large documents are too big to send to a vision model in one call, and guessing a part size wastes calls whenever the guess is wrong.

What I did

  • Break a large document into smaller parts before sending it to the vision model.
  • Use binary search to find a part size that works, instead of guessing or stepping down one size at a time.

Result

Large documents get processed in parts of a workable size, found by search rather than trial and error.

PythonDocument AIVision ModelsBinary Search

Evaluation & Reliability

Testing before replacing a working AI workflow

Problem

A newer skill-based flow was meant to replace a specialized AI workflow that already worked, and the switch needed evidence that quality would hold.

What I did

  • Built an NLP and statistical evaluator that compares the old specialized workflow with the new skill-based one.
  • Used that comparison, not impressions from a demo, to judge whether the new flow could take over the task.

Result

Whether to replace the old workflow became a question with measured evidence behind it.

PythonLLM EvaluationNLPStatistics

Retrieval & Caching

Reusing answers safely

Problem

Many questions repeat, so reusing answers saves time and cost. But a question about a different company, quarter or scope can look almost identical, and reusing that answer is wrong.

What I did

  • Look up exact keys first, from normalized queries that keep the original context.
  • On a miss, use hybrid retrieval to find related past answers.
  • Reuse only when entity, time period, scope and freshness all match, with selective NLI checks; anything uncertain goes back through fresh retrieval.

Result

Repeat questions skip the full pipeline, and a lookalike question about a different entity or period gets a fresh answer instead of a stale one.

PythonHybrid RetrievalEmbeddingsNLI

Routing & Evaluation

Improving routing from its own mistakes

Problem

Routing is only as good as its examples, and the gaps only show up as misrouted requests.

What I did

  • Review routing decisions in a background pass, outside the request path.
  • Have an LLM propose missing or weak examples, and treat them as suggestions, not ground truth.
  • Test each proposed set of examples against scenarios, and keep it only if routing improves.

Result

Routing examples change only when a candidate set does better on the test scenarios.

PythonBM25LLM EvaluationRegression Testing