← All projects

HackerRank Orchestrate, Aug 2026, LLM routing

WhatsApp Notification Router

20th of 1,983 submissions

Decides, per user, whether each WhatsApp message (text, image poster or voice note) should notify, digest or mute, and cites why.

  • 20Rank out of 1,983 submissions; final score 78.3/100
  • 37/40Rows that changed between runs with a fixed seed, before majority voting
  • 8/8Impersonator-business and prompt-injection messages muted by deterministic overrides
  • 61%Hidden-set accuracy, against 0.925 locally; the post-mortem explains the gap
Role
Solo · 24-hour build
Year
2026
Stack
Python, OpenAI gpt-5.6, whisper-1, Pydantic, rank-bm25, tenacity, pandas, pytest
Links
GitHub

How it works

  1. Ingest13 relational CSVs, 412 past interactions, 20 images, 13 voice notes
  2. RetrieveDeterministic BM25 retrieval plus hard links between records
  3. Extract signalsRisk and trust signals computed in code: signals, never verdicts
  4. Vote5-vote LLM majority over a closed bank of 27 reason templates
  5. DeriveCode sets action, confidence and cited evidence; schema-valid by construction
  6. OverrideDeterministic injection, impersonator and high-risk-business overrides

Problem

Every WhatsApp message needs a routing decision for its user: notify now, hold for a digest, or mute. Messages arrive as text, image posters and voice notes, and some come from impersonator businesses or carry prompt injections. In HackerRank Orchestrate’s August 2026 edition, a 24-hour build where the challenge itself is agentic AI, the system had to return an action, a message type, a reason, a confidence and cited evidence for each message. The data was 13 relational CSVs, 412 historical interactions, 20 images and 13 voice notes, and output accuracy was graded against hidden labels.

Approach

The design rule was “signals, never verdicts”. Deterministic code does the retrieval (BM25 plus hard links between records) and extracts risk and trust signals. The LLM only picks a reason from a closed bank of 27 reason templates. Code then derives the action, confidence and evidence, so every output is schema-valid by construction.

I measured the noise before fighting it. temperature=0 was ruled out, and a fixed seed still changed 37 of 40 rows between runs. A 5-vote majority halved run-to-run variance, from about 3 rows in 40 to 1.3.

Safety does not depend on the LLM agreeing. Untrusted message content is fenced, and deterministic overrides handle prompt injection, impersonators and high-risk businesses. A resumable per-vote cache meant 5 mid-run process kills cost zero LLM calls.

Results

Ranked 20th of 1,983 submissions, with a final score of 78.3/100: chat transcript 9.6/10, code 25.8/30, AI-judge interview 24.6/30, output accuracy 18.3/30. All 6 impersonator-business messages and both injection attempts were muted.

After the competition I cut 30% of the code (the pipeline by 41%) and proved behavior byte-identical with a golden fingerprint of every prompt and context.

What I learned

Output accuracy was my weakest score, so I wrote a post-mortem. Locally I measured 0.925. On the hidden set it was 61%. The post-mortem traces the gap to a missing hold-out set: without one, 0.925 was never an estimate of performance on unseen data. Two things made it worse. My final changes before submission were never measured, and the distribution was skewed toward mute.

The architecture held up. Closed vocabularies, code-derived outputs and deterministic overrides made every decision auditable, and the safety cases all landed. But auditable is not the same as accurate on data I haven’t seen. Next time the hold-out set comes first, and every change gets measured against it, including the last one.

Limits, stated not hidden

  • There was no hold-out set, and 0.925 local accuracy became 61% on the hidden set.
  • The final changes before submission were never measured.
  • The data had a mute-skewed distribution, the third cause named in the post-mortem.
  • Voting halved run-to-run variance but did not remove it: about 1.3 rows in 40 still change.
HomeWorkExperienceOpen sourceResearchAchievementsCertifications
GitHubLinkedInLeetCodeCodeChef
↑↓ move↵ open or askesc close