Eslam Hamed
Technical Lead & AI Solutions Architect
Building enterprise AI systems, cloud platforms, and production-ready software
Case study ·
Auto-RAG and MerlinX: enterprise retrieval for 7 to 10 customers, and agents that cannot make up a price
The retrieval platform I architected and solo-built at DXWand, the agentic platform that followed it, and the cost decision that cut spend per conversation by 73% across 840 agents.
DXWand, 2019 to now. Senior engineer, then formal technical lead for a five-person cross-functional team from 2021 to 2023, then hands-on architect across the AI platforms.
Context
Enterprise customers, including Gulf-region government ministries, wanted answers grounded in their own documents through the channels their users already lived in. The company needed one retrieval platform it could ship to many customers rather than a bespoke build per contract.
The constraint
Every customer brought a different corpus, a different language mix, and a different tolerance for a wrong answer. The platform had to be tunable per customer without becoming a consulting project per customer.
The decisions that mattered
- Auto-RAG. I architected and solo-built the MVP and shipped it to production for 7 to 10 enterprise customers. Later I contributed to the production Python rebuild: LangChain and LlamaIndex orchestration, Weaviate and Azure AI Search retrieval, and automated experimentation across retrieval strategies and prompt templates, so tuning became a measured run rather than an argument.
- MerlinX. The flagship agentic conversational platform: a business hands over its files, and gets an agent that sells and supports across WhatsApp, Instagram, Messenger and web chat, in Arabic and English. In production with about ten active customers. I designed and directed the core, built with AI coding agents, and extended the Svelte and TypeScript console.
- Model economics. On our agent workflows I found the orchestrator model was 75% of workflow cost, then proved the cheaper option was not worse with a frozen-suite comparison at 95% confidence. The rollout cut cost per conversation by 73% with no measurable quality loss across 840 agents, with a guarded apply and a one-command rollback.
How MerlinX keeps an agent honest
For a business selling on WhatsApp, a wrong price or a booking that was never made is worse than no answer. So MerlinX treats the model as the voice and the customer's data as the source of truth, and it checks that mechanically.
- The model cannot write a price. It points at a cell in the customer's data, and code renders the number. A typed price is refused even when it happens to be right, because a remembered price and a correct one look the same.
- Claims need receipts. The agent can only say something was booked or recorded if a tool returned proof in that same turn. A retry returns the same record, so a customer never gets a duplicate.
- The burst is the unit of work. People send three short messages, not one long one. MerlinX merges them into one bounded turn. If a newer message arrives before the reply goes out, the draft is dropped and the turn runs again, unless it has already acted.
- Intake survives a stalled database. Messages are verified and stored before anything else, with a fallback that keeps accepting them, because a channel provider will drop a subscription that keeps failing.
- Thinking and sending are separate. No database transaction stays open during a model call, and a failed send never reruns the model.
- Give a file, get an agent. Business files become structured tables the agent can search, each one read once and either checked or refused with a reason.
- Isolation lives in the database. One service and one PostgreSQL, with tenant separation enforced by row-level security rather than by application code remembering to filter.
Shipping it safely
- Release engineering. Releases ship in gated waves. UAT runs the identical image artifacts, verified by digest rather than rebuilt look-alikes, and nothing promotes until post-deploy assertions pass and a soak holds against the baseline error rate. Waves ship rollback-free, including unattended overnight runs.
- Governance at estate scale. I brought 35 Azure DevOps projects and about 224 repositories under one standard: an estate-wide branch-policy audit, then mandatory review gates on tier-one repositories, protected tags, a hardened deploy-render gate, break-glass access, and a scheduled drift audit. Every blocking finding in an independent security review was cleared.
Result
One retrieval platform serving 7 to 10 enterprise customers, an agentic platform with about ten active customers, and a 73% cut in cost per conversation that was proven before it was rolled out. Figures are from the August 2026 CV.
Stack
AWS (EKS, Bedrock), Azure (App Services, AKS, Functions, Service Bus, Key Vault), Python, PostgreSQL, C# and .NET, LangChain, LlamaIndex, Weaviate, Azure AI Search, Svelte and TypeScript, Azure DevOps.
What it demonstrates
Architecture that survives many customers, agents that are held to the facts by code rather than by a prompt, the discipline to prove a cost decision before rolling it out, and release engineering that lets a small team ship without fear.