Agentic RAG · platform operations

Platform Copilot

A retrieval-augmented copilot that answers operational questions about an AI/ML platform — grounded strictly in the platform's own runbooks, ADRs, and design docs, and citing its sources.

About this page. This is a static showcase. The interactive service runs a full hybrid-search + LangGraph-agent stack (OpenSearch · PostgreSQL · Redis · a served LLM) — hosting that live on Hugging Face needs a PRO Space, so this page instead shows example answers grounded in the platform's documents and cited to them, illustrating how the copilot responds. The live service generates these at query time; the complete, runnable code is in the repository.

What it does

Ask an operational question; get a concise, grounded answer with sources.

Grounded + cited

Answers only from the indexed corpus and cite each source as [n]; says "I don't know" when the docs don't cover it.

Hybrid retrieval

Keyword (BM25-style) and vector (embedding) arms fused with Reciprocal Rank Fusion, so both exact terms and meaning match.

Agentic loop

A LangGraph agent guards scope, retrieves, grades relevance, rewrites and retries before answering — not a single-shot prompt.

Observable

Redis response cache, trace/cost sink, and an ingestion job scheduled with Airflow — built as a service, not a notebook.

Example answers

Illustrative answers grounded in the platform's own docs, with citations. Click a question to expand. The live service generates these at query time.

What are the first steps when a demand-forecaster drift alert fires?

Work the DriftHigh runbook in order [1]: 1. Open the monitoring dashboard and confirm which input features breached PSI (> 0.2). 2. Check the feature-materialization job ran on schedule and did not error. 3. Compare the current input distribution against the training baseline. 4. If features are stale or wrong, fix ingestion first — do not retrain on bad data. If it is a genuine demand shift, trigger the weekly training DAG to refresh the model and confirm the new candidate clears the promotion gate before it serves traffic [2]. If the gate keeps rejecting candidates or error stays elevated, page the platform on-call and open an incident [3].

Sources

[1]Runbook — Demand Forecaster Drift Alert > First steps
[2]Runbook — Demand Forecaster Drift Alert > Resolution
[3]Runbook — Demand Forecaster Drift Alert > Escalation
Why was Kubernetes chosen as the platform substrate instead of serverless?

So one scheduler can run every workload — CPU APIs, GPU LLM serving, batch and distributed training, and Airflow — which is what makes GPU cost control (priority classes, preemption, quotas) possible at all [1]. It also gives a declarative topology, so disaster recovery becomes "re-apply config", and it runs KServe and Ray natively [1]. Managed serverless GPU endpoints were considered and rejected: weak multi-tenant GPU economics, vendor lock-in, and no shared substrate for training + Airflow + serving — and the shared substrate is precisely the platform's value [2].

Sources

[1]ADR-001 — Kubernetes (AKS) as the platform substrate > Decision / Consequences
[2]ADR-001 — Kubernetes (AKS) as the platform substrate > Alternatives considered
How does the platform decide whether a workload runs on CPU or GPU?

Placement is derived from the workload, not requested by the caller [1]. The platform maps a model's framework to a compute pool: GPU-bound runtimes (vLLM, Transformers) go to the GPU pool; everything else (LightGBM, sklearn/ONNX) goes to the CPU pool [1]. The GPU nodes carry a nvidia.com/gpu=present:NoSchedule taint, so only workloads that actually need a GPU — and therefore tolerate that taint — ever land there; a cheap CPU model can't silently occupy a $3/hr GPU node [2].

Sources

[1]AI Platform — Architecture > 4. Compute placement
[2]GPU Infrastructure Design > 1. Two pools, one cluster
Why is vLLM the default LLM serving engine?

Two properties decide it [1]: PagedAttention, which nearly eliminates KV-cache fragmentation so more sequences fit per GPU, and continuous batching, which lets new requests join the running batch instead of waiting for it to drain. Together that is roughly a 5–8× throughput gain over vanilla HuggingFace generation on the same GPU. The cost model shows that throughput gain is about a 7× reduction in cost per request — so it is an economics decision, not just a latency one [2]. Vanilla HF is kept only as the benchmark baseline; TGI and TensorRT-LLM are candidate backends behind the same interface [3].

Sources

[1]ADR-002 — vLLM as the default LLM serving engine > Decision
[2]AI Platform — Cost Model (FinOps) > Worked cost/request
[3]ADR-002 — vLLM as the default LLM serving engine > Alternatives considered

How it works

Retrieve → ground → generate → cite, behind a FastAPI service.

question │ ▼ guardrail (scope check) │ ▼ hybrid retrieve ──► keyword arm ─┐ ├─► RRF fusion ─► top-k chunks ► vector arm ─┘ │ ▼ grounded prompt (numbered context) │ ▼ LLM ──► grade → rewrite → retry (agent) │ ▼ answer + citations [n]
FastAPIOpenSearch (BM25+kNN) PostgreSQLRedisLangGraph sentence-transformersGradioAirflow Docker + K8s

Run the real thing

The full interactive service, with tests, lives in the repository.

git clone https://github.com/hastikacheddy/ai-workload-platform cd ai-workload-platform/platform-copilot docker compose up -d # OpenSearch · PostgreSQL · Redis python scripts/ingest.py # index the corpus python scripts/ui.py # Gradio chat → http://127.0.0.1:7861

Code & corpus: github.com/hastikacheddy/ai-workload-platform/platform-copilot