Project guide

Project Guide | Enterprise LLM Adoption Kit

Free LLM governance adoption checklist for RBAC, redaction, audits, and eval gates. This guide organizes the repository's original implementation notes for enterprise AI governance teams.

Reviewed 2026-07-28. This page is derived from checked-in repository evidence and links back to its source.

Enterprise LLM Adoption Kit

Production-grade governance toolkit for enterprise LLM deployments -- RBAC, prompt-injection detection, PII redaction, audit logging, eval harness, and multi-cloud LLM routing, all wired into a single FastAPI + React application with Kubernetes-ready infrastructure.

All rollout data and review scenarios are synthetic. The goal is a reviewable, runnable validation kit that demonstrates enterprise-grade LLM governance patterns end to end.

Technical review pack: `docs/architecture-pack.md`

Demo video: https://youtu.be/yMq03b0js0E

---

Three-Minute Proof

  1. Open `docs/architecture_assets/poc_success_criteria.md` to see the production test boundary.
  2. Inspect the governance path: RBAC, prompt-injection checks, PII redaction, audit logging, and eval gates.
  3. Run make verify to cover backend quality, smoke checks, and frontend build.
  4. Keep synthetic data and environment-gated live providers explicit in any technical review.

System Overview

LensCurrent answer
UsersEnterprise AI adoption, IT governance, security, platform, and operations teams that need controlled LLM rollout.
Technical pathValidate the demo, README, architecture notes, and quality gate before deeper workflow review.
System scopeRBAC, prompt-injection checks, PII redaction, audit logs, eval gates, Snowflake/Databricks adapters, and deployment scaffolding in one runnable kit.
Operating boundarySynthetic rollout scenarios by default; external providers and enterprise data adapters are environment-gated.
Evaluation pathmake verify, `docs/architecture-pack.md`, and `docs/architecture_assets/poc_success_criteria.md`.

Evaluation Path

---

Architecture Notes

Architecture

Every request passes through four governance layers before reaching the LLM. Each layer can short-circuit the request with a policy refusal, and every decision is audit-logged.

flowchart TB
    subgraph Client["Client Layer"]
        UI["React + Vite UI"]
        CLI["API / CLI Consumer"]
    end

    subgraph Gateway["API Gateway"]
        ING["TLS Ingress"] --> AUTH["JWT / OIDC Auth"]
        AUTH --> RL["Rate Limiter"]
    end

    subgraph Governance["Governance Pipeline -- 4 Layers"]
        direction TB
        RBAC["1. RBAC Enforcement<br/><i>Employee / Ops / Admin</i>"]
        INJ["2. Prompt Injection Detection<br/><i>keyword + regex heuristics</i>"]
        PII["3. PII Redaction<br/><i>email, phone, ID masking</i>"]
        SAFE["4. Safety Policy Engine<br/><i>22 regex patterns, ReDoS-safe</i>"]
        RBAC --> INJ --> PII --> SAFE
    end

    subgraph Core["Application Core"]
        RAG["RAG Retrieval<br/><i>ChromaDB + hash embeddings</i>"]
        LLM["LLM Router<br/><i>OpenAI / Ollama / Bedrock / Stub</i>"]
        TOOLS["Tool Executor<br/><i>allowlisted tools only</i>"]
        RAG --> LLM
        LLM --> TOOLS
    end

    subgraph Observability["Observability + Persistence"]
        AUDIT["Audit Logger<br/><i>SHA-256 enterprise hashing</i>"]
        PROM["Prometheus Metrics<br/><i>latency, tokens, usage, policy</i>"]
        OTEL["OpenTelemetry<br/><i>OTLP traces</i>"]
        DD["Datadog Integration"]
    end

    subgraph DataPlatform["Data Platform Integration"]
        SF["Snowflake<br/><i>eval + audit persistence</i>"]
        DB["Databricks<br/><i>MLflow + Delta Lake</i>"]
        EVAL["Eval Harness<br/><i>baseline diffs, red-team</i>"]
    end

    UI & CLI --> ING
    RL --> RBAC
    SAFE --> RAG
    LLM --> AUDIT & PROM & OTEL
    AUDIT --> SF & DB
    OTEL --> DD
    EVAL --> SF & DB

    style Governance fill:#fff3e0,stroke:#e65100
    style Observability fill:#e8f5e9,stroke:#2e7d32
    style DataPlatform fill:#e3f2fd,stroke:#1565c0

---

Tech Stack

LayerTechnologies
Backend APIPython 3.11+, FastAPI, Uvicorn, Pydantic
FrontendReact 18, Vite
AuthJWT (HS256) with key rotation, OIDC (RS256) via JWKS discovery
RAGChromaDB, deterministic hash embeddings, in-memory fallback
LLM ProvidersOpenAI, Ollama, AWS Bedrock, stub (offline deterministic)
EvalCustom harness -- accuracy, groundedness, helpfulness, safety scoring
StorageSQLite, Chroma, JSONL event logs
Data PlatformSnowflake (eval + audit), Databricks (MLflow + Delta Lake)
ObservabilityPrometheus, Grafana, OpenTelemetry (OTLP), Datadog-ready
InfrastructureDocker Compose, Kubernetes (HPA, TLS ingress, AlertManager), Terraform (AWS + GCP)
CI/CDGitHub Actions (CI, security scan, Docker publish, Cloudflare Pages deploy)
Securitypip-audit, Bandit, Trivy container scanning

---

One-command demo (recommended)

git clone https://github.com/KIM3310/enterprise-llm-adoption-kit.git
cd enterprise-llm-adoption-kit
make demo-local        # auto-selects Ollama if available, otherwise stub

Manual setup


## 1. Backend
make backend-install
cd app/backend && .venv/bin/python -m app

## 2. Frontend (separate terminal)
cd app/frontend
npm install && npm run dev        # starts on http://localhost:5173


## 3. Verify everything
make verify                       # syntax, deps, pytest, smoke, frontend build

Docker

cd infra && docker-compose up --build

## Backend: http://localhost:8000   Frontend: http://localhost:5173

Kubernetes

kubectl create namespace llm-adoption
kubectl apply -f infra/k8s/secret.yaml
kubectl apply -f infra/k8s/

---

Key Capabilities

CapabilityDescriptionCode
RBACRole-to-access-group mapping enforced at RAG retrieval time (Employee / Ops / Admin)`app/backend/app/rbac.py`
Prompt Injection DetectionKeyword heuristics flag known injection patterns before LLM invocation`app/backend/app/injection.py`
Safety Policy Engine22 regex patterns targeting exfiltration, escalation, and adversarial prompts (ReDoS-safe)`app/backend/app/safety.py`
PII RedactionEmail, phone, and ID masking with per-category event tracking`app/backend/app/redaction.py`
Audit LoggingStructured JSON logs with SHA-256 hashing in enterprise mode and auto-retention pruning`app/backend/app/audit.py`
RAG RetrievalChromaDB + deterministic hash embeddings with RBAC-filtered document access`app/backend/app/rag.py`
Eval HarnessAccuracy, groundedness, helpfulness, safety scoring with baseline diffs and red-team datasets`evals/runner/`
LLMOps MetricsRequest latency, token counts, usage tracking, policy events via Prometheus`app/backend/app/metrics.py`
Circuit BreakerLLM provider failure isolation with configurable threshold and cooldown`app/backend/app/llm_adapter.py`
Multi-provider LLMHot-swappable runtime config across OpenAI, Ollama, Bedrock, and stub backends`app/backend/app/llm_adapter.py`
Snowflake IntegrationEval results and audit logs persisted to Snowflake (env-var gated)`app/backend/app/snowflake_adapter.py`
Databricks IntegrationMLflow experiment tracking and Delta audit tables in Unity Catalog`app/backend/app/databricks_adapter.py`
OpenTelemetryOTLP trace export with Datadog-ready integration`app/backend/app/telemetry.py`

---

Core API

EndpointDescription
POST /auth/loginIssue JWT (local_jwt or OIDC mode)
POST /uc1/architectureLLM-assisted architecture query (RBAC-gated RAG)
POST /uc2/log-intelLog intelligence and root cause generation
GET /audit/summaryGovernance and audit log summary
GET /metricsPrometheus metrics (requests, latency, tokens, usage, policy events)
GET /healthRuntime posture and diagnostics
GET /ops/service-briefOperational service brief and readiness summary
GET /ops/resource-packResource pack for review and evidence

---

Snowflake / Databricks Integration

Snowflake -- set SNOWFLAKE_ACCOUNT to activate. Stores eval results and audit logs; supports query_eval_history(), query_audit_history(), aggregate reporting.

Databricks -- set DATABRICKS_HOST to activate. MLflow experiment tracking per eval run; Delta audit tables in Unity Catalog; databricks-cli or service-principal OAuth auth.

See `.env.example` for the full configuration surface.

---

Datadog-Ready Pack

---

Project Structure

enterprise-llm-adoption-kit/
  app/
    backend/               # FastAPI backend (RBAC, RAG, safety, audit, LLM adapters)
      app/
        main.py            # FastAPI app with governance middleware
        rbac.py            # Role-to-access-group mapping
        safety.py          # 22-pattern safety policy engine
        injection.py       # Prompt injection detection
        redaction.py       # PII redaction engine
        audit.py           # Structured audit logging with SHA-256 hashing
        auth.py            # JWT/OIDC authentication
        llm_adapter.py     # Multi-provider LLM router with circuit breaker
        rag.py             # ChromaDB RAG with RBAC-filtered retrieval
        snowflake_adapter.py
        databricks_adapter.py
        metrics.py         # Prometheus metric definitions
        telemetry.py       # OpenTelemetry instrumentation
        config.py          # 60+ env vars, type-safe parsing
    frontend/              # React + Vite UI
  evals/
    runner/                # Eval harness (run_eval, eval_gate, baseline)
    datasets/              # Test datasets (initial, red-team, Korean)
    reports/               # Generated eval reports and diffs
  infra/
    k8s/                   # Kubernetes manifests (HPA, TLS, AlertManager)
    aws/terraform/         # AWS ECS + ALB Terraform module
    gcp/terraform/         # GCP Terraform module
    docker-compose.yml     # Local multi-service orchestration
    monitoring/            # Grafana dashboard + AlertManager rules
  tests/                   # 30+ test files, 84% backend coverage
  docs/                    # Architecture, ops, blueprint, Datadog, evals docs
  scripts/                 # Demo runners, quality gates, release ops

---

Technical Proof Boundary

---

Operating Commands

---

CI/CD

GHCR Docker image published on every push to main. Security scan (pip-audit, bandit, Trivy) runs on schedule. Frontend auto-deploys to Cloudflare Pages.

---

Related Projects

For governed NL-to-SQL analytics, see Nexus-Hive. For the data pipeline layer, see lakehouse-contract-lab.

Cloud + AI Architecture

Enterprise Productization

System Architecture

Service Architecture

Search And Service Surface