Mario Ruiz Díaz
← All case studies

Case study · AI Systems

Emma Chat: an AI-native benefits assistant built for resolution, not containment

Agentic support for the employees of bswift's enterprise clients: personalized, claims-grounded answers, proactive guidance and smooth handoffs to human agents for complex moments.

Client
bswift
Industry
HR tech · Benefits administration
Role
Principal Engineer / Architect
80%
autonomous resolution rate (reported by bswift)
750K+
messages in 2025 (reported by bswift)
Emma Chat: an AI-native benefits assistant built for resolution, not containmentEMPLOYEEEXPERIENCEORCHESTRATION · LANGGRAPHRETRIEVE CONTEXTMODELS & QUALITYKNOWLEDGE & PLATFORMEmployeeBenefits portalEmma ChatNext.jsChat APIAWSSTARTClassify intentLangGraph entry nodeRetrieve docssemantic searchTraverse graphplan → coverageFetch live datatenant-scoped APICompose answergrounded on contextValidategrounding · policyRespondEscalatesummary + contextModel layerOpenAI · AnthropicEvaluationLangSmith tracingVector storePlans · policies · FAQsKnowledge graphNeo4j.NET business rulesClaims · eligibilityService centerHuman representativeslow confidenceLLM calls · traces

Scroll sideways to see the full diagram →

Emma Chat architecture. The LangGraph workflow routes each turn by intent, retrieves context in parallel, composes and validates a grounded answer, and escalates to a human when confidence is low.Download diagram (PNG) ↓

Context

bswift serves large employers, where supporting thousands of employees across health plans, eligibility, enrollment and claims is too complex to handle in-house. Its answer is a single portal where every employee gets end-to-end benefits support. Before Emma, that support ran through forms, phone and email: unified, but not intelligent.

The challenge

Build an assistant that actually resolves questions that depend on each employee's plan, eligibility and claims. The answers live across relational and non-relational stores, plan documents and real-time business rules in bswift's .NET platform, and every request must respect tenant isolation, permissions and governance for each employer.

The solution

A Next.js conversational interface backed by services on AWS, a model abstraction layer over OpenAI and Anthropic, and a LangGraph orchestration workflow. An entry node classifies the employee's intent and routes the conversation to the right retrieval strategy: documents, knowledge graph, structured data or live business rules.

  • Intent router

    LangGraph entry node that classifies each turn and selects the retrieval path, so sensitive flows follow explicit, testable routes.

  • Hybrid retrieval (GraphRAG)

    Embeddings of benefit plans, policies and FAQs in a vector store on AWS, combined with a Neo4j knowledge graph that links plans, coverages, policies and documents.

  • Live business rules

    Eligibility, claims and enrollment data fetched in real time through REST APIs from bswift's .NET backend, never copied into AI stores.

  • Tenant-aware governance

    Every tool call is scoped to the employer and the employee's permissions, enforced by the platform that owns the data.

  • Human handoff

    Escalation when confidence is low, the topic is sensitive or the employee asks for a person, passing a conversation summary and the retrieved context so nobody has to repeat themselves.

  • Evaluation loop

    LangSmith tracing, a golden-query regression set and human review to measure answer quality before and after every change.

Key decisions

  1. 01

    An explicit LangGraph workflow, not a free-form agent loop

    Benefits questions touch health and money. Explicit nodes and edges make every path observable, testable and governable, and keep sensitive flows deterministic.

    Alternatives considered A single ReAct-style agent with all tools; a custom orchestrator.

  2. 02

    Live business data stays behind the .NET APIs

    Eligibility and claims change constantly and are governed per employer. Querying them in real time keeps a single source of truth and leaves permission enforcement where it already lives.

    Alternatives considered Syncing structured data into the vector store.

  3. 03

    Graph plus vectors instead of vector-only RAG

    Plan documents reference each other (plan, coverage, policy, FAQ). Similarity search alone misses those relationships; the graph brings back the connected context that makes an answer correct.

    Alternatives considered Vector-only retrieval with larger chunks.

  4. 04

    A provider-agnostic model layer

    Choosing the best model per task across OpenAI and Anthropic, with fallback between providers and no lock-in as models evolve.

  5. 05

    Resolution over containment

    Success is a solved problem, not a deflected one. When the assistant cannot resolve a case safely, it escalates early with full context instead of keeping the employee in the bot.

What I did

  • Designed the end-to-end architecture as Principal Engineer.
  • Defined the LangGraph workflow: intent routing, retrieval paths and escalation.
  • Designed the hybrid retrieval strategy over Neo4j and the vector store.
  • Defined the integration contract with bswift's .NET platform, including tenancy, permissions and governance.
  • Set up the evaluation practice with LangSmith, golden queries and human review.

Outcomes

  • Launched publicly by bswift in February 2026 as the latest evolution of Emma Chat, powered by Emma Intelligence™.
  • 750,000+ messages across 150,000 chat sessions in 2025, as reported by bswift.
  • Personalized, plan-specific answers grounded in claims data instead of generic FAQ responses.
  • Seamless transfers to human representatives with full context preserved, so employees never repeat themselves.
  • Changes ship against a golden-query regression set, so answer quality is measured, not assumed.

Sources & press

Contact

Bring me a real problem.

A scaling issue, a risky migration, an AI workflow that must become reliable, or a team that needs sharper technical direction.

Founder-level conversation · Practical feedback · NDA available on request