Case study
OpsMind
An AI retrieval system using RAG + CAG for grounded answers with traceable sources.
Overview
OpsMind helps operations teams query internal documentation with an AI layer that combines retrieval-augmented generation (RAG) and context-augmented generation (CAG), so answers stay anchored to source records.
Problem
Operational data is difficult to retrieve when records are split across systems.
The core problem is retrieval quality: finding relevant operational information and preserving where it came from.
Keyword search misses related records when terminology differs across sources
AI answers are risky without grounded context and traceable sources
Solution
A RAG + CAG pipeline for operational document intelligence.
OpsMind separates ingestion, metadata storage, retrieval indexing, context assembly, and grounded generation.
RAG retrieval layer
Queries retrieve relevant document sections first so the answer stage uses grounded context instead of guesswork.
Document ingestion pipeline
Documents are parsed, normalized, split into indexed sections, and linked back to source metadata.
Split storage model
MySQL owns structured records and ingestion state. Redis owns the retrieval index for document sections.
CAG context assembly
Matching sections are ranked, assembled with metadata, and passed as structured context to the generation step.
Architecture
Backend design for grounded AI responses.
The architecture keeps durable metadata, RAG retrieval, CAG context assembly, and request handling in separate responsibilities.
FastAPI backend
Keep ingestion and query workflows behind explicit HTTP endpoints.
FastAPI provides typed request models, clear route boundaries, and a predictable orchestration layer for RAG and CAG flows.
MySQL database
Use relational storage for document metadata and ingestion state.
Documents, indexed sections, source references, and ingestion status need constraints and inspectable records.
Redis retrieval index
Use Redis for fast section lookup and keep it separate from the metadata database.
The RAG retrieval index can be rebuilt from MySQL-backed source records without becoming the system of record.
RAG/CAG execution boundary
Separate write-heavy ingestion from read-heavy retrieval and answer assembly.
Ingestion endpoints manage parsing and section creation. Query endpoints run retrieval, context assembly, and grounded response generation.
Features
RAG-based document retrieval
CAG-based context assembly
Source-linked response generation
Traceable citations in answers
Results
Grounded AI responses backed by retrieved source sections
Faster operational lookup across indexed documents
Consistent citations preserved from ingestion through final answer
Project note