| 1. Document Ingestion Pipeline | Data Engineer | REST /ingest, S3 events | Parse PDFs, chunk, embed, upsert to VDB | Swap parser (Unstructured.io, LlamaParse) or embedder (OpenAI → HuggingFace) via config |
| 2. Vector DB | Infra/SRE | gRPC / HTTP | Store & ANN-search embeddings | Switch Pinecone ↔ Weaviate ↔ pgvector via interface |
| 3. Retriever Service | ML Engineer | /retrieve | Query VDB, rerank, return top-k chunks | Replace reranker (Cohere, ColBERT) behind interface |
| 4. LLM Gateway | Backend | /generate | Prompt templating, token counting, fallback models | Swap OpenAI ↔ Claude ↔ OSS Llama-3 via adapter |
| 5. Chat Orchestrator | Backend Lead | /chat | Session mgmt, caching, guardrails, PII redaction | Can be rewritten in Go or Node without touching others |
| 6. API Gateway + Auth | DevOps | OpenAPI spec | Rate-limit, JWT/OIDC, WAF | Replace Kong → AWS API Gateway via IaC |
| 7. Web UI / CLI | Frontend | React / Next.js or simple Click CLI | Human-in-the-loop feedback, thumbs-up/down | Independent micro-frontends |
| 8. Observability | SRE | Prometheus metrics, OpenTelemetry traces | Latency, token usage, hallucination score | Swap Grafana → Datadog via config |
| 9. Test Harness | QA | PyTest + Locust + synthetic data | Unit, integration, load, red-team | Plug-and-play test suites |