Skip to content
~/dangtrinh.dev
← All work

Case study 02 · Vingroup

Build once. Empower many product teams.

A two-tier engineering model that separates reusable AI capabilities from product-specific workflows and business-system integrations.

Context

Business systems (internal portals, ERP, departmental workflows, documents) need AI, but each product team rebuilding retrieval, model access and agent runtimes duplicates effort and policy. Shared infrastructure reduces duplication while business teams keep ownership of domain logic.

Containers

  1. Web / Teams / ERP

    User interactions, evidence views, domain events.

    Clients
  2. Domain BFF

    Sessions, workflows and context; business-system connectors.

    Product layer
  3. Agent runtime

    LangGraph state, tool routing, interrupts.

    Platform core
  4. RAG engine

    Retrieval flow: evidence and response.

    Platform core
  5. Tool gateway

    Policy-aware MCP invocation and audit.

    Platform core
  6. Knowledge base + ingestion

    Parse, enrich, embed, index; Qdrant + lexical.

    Data

Calls

  • Web / Teams / ERP —domain requests→ Domain BFF
  • Domain BFF —versioned APIs→ Agent runtime
  • Agent runtime —retrieve→ RAG engine
  • Agent runtime —MCP→ Tool gateway
  • RAG engine —hybrid search→ Knowledge base + ingestion

Principles

ACLs are part of the index

Source permissions travel with document versions and become retrieval-time filters — never retrieve unauthorized passages and filter after generation.

Active snapshots

Build and validate a replacement index separately; promote only when ready and keep the earlier snapshot as a rollback target.

Models read; code verifies

The model composes answers from supplied evidence; code validates identifiers, spans and structured facts, and the system can abstain.

Agents reason; business rules decide

Irreversible decisions stay behind versioned rules, scoped tools and resumable human approvals.

Decisions

ADR-02

Shared platform vs. domain services

Centralize model access, indexing and retrieval controls; keep domain rules and integrations with product teams.

TRADE-OFF Reuse without leaking business ownership.

Decision

Durable asynchronous ingestion

Parsing and embedding are retryable, idempotent jobs with observable failure states; interactive queries read the published snapshot.

TRADE-OFF Freshness lag in exchange for safe, repeatable indexing.

My scope

  • Core engineering and squad-level coordination
  • Knowledge Base and advanced RAG service architecture
  • Agentic workflows and full-stack AI product interfaces
  • Integration of platform capabilities for internal teams

Architecture design model; component existence does not establish deployment maturity. No operational metrics are claimed.