Skip to content

ADR-0022: RAG Chatbot as MVP Archetype #1

Accepted

Date: 2026-06-10

Context

The first Archetype establishes the architecture’s credibility. It must be high-demand, demonstrate the multi-language composition story, and exercise the AI/LLM slice that defines current enterprise demand.

Two candidates were considered:

  • RAG chatbot — high demand, harder to build manually, exercises cross-language story
  • Internal CRUD admin tool — easier to verify, broader applicability, smaller market signal

Decision

The MVP Archetype #1 is the RAG chatbot over a private corpus. The Archetype generates:

  • Python backend for document ingestion, embedding, vector storage
  • Java or TS backend for the chat API surface
  • React frontend with streaming chat UI
  • Containerized PostgreSQL with pgvector
  • Default LLM provider Adapter (Anthropic SDK, with alternatives)

The MVP Archetype #2 (CRUD admin tool — ADR-0023) follows immediately to provide validation against a simpler verification surface.

Rationale

  • Enterprise demand for RAG chatbots over private corpora is currently the highest single category.
  • Building a RAG chatbot is harder than building a CRUD admin, so the value of automation is higher.
  • Exercises Python (ingestion), Java/TS (backend), React (frontend), AI Adapters (LLM, vector DB) — proving the multi-language composition story from day one.
  • Demonstrates Almathal’s differentiation against pure-LLM tools (provenance, trust, license-clean stack).

Consequences

  • The MVP curation effort prioritizes AI/LLM Adapters and cross-language seams.
  • Verification of RAG chatbot output requires both functional tests (chat works) and quality tests (retrieval is sensible) — the latter is harder.
  • The Stitcher must handle streaming response patterns and citation rendering.
  • Pure-LLM fallback path is needed early because user variation in RAG requirements is high.

References

  • ADR-0021: AI/LLM Slice as First-Class Concern
  • ADR-0023: CRUD Admin Tool as MVP Archetype #2
  • ADR-0025: Java + TS/JS + Python Used Per Concern
  • Roadmap → MVP Scope