All Case Studies
Case Study

RAG Application: AI Knowledge Base for Enterprise Documentation

A retrieval-augmented generation system that turns 10,000+ internal documents into an intelligent Q&A assistant with source citations and access controls.

Client: Confidential Enterprise (Fortune 500 subsidiary)

Timeline
21 days
Investment
$12,999
Key Result
New employee ramp time reduced from 90 to 30 days

Chat interface showing a question about company expense policy, with an AI response citing 3 specific documents. Source cards show document title, section, and confidence score. Sidebar shows conversation history.

The Challenge

The company had accumulated 10,000+ documents across three platforms over 8 years. Policies contradicted each other, process documentation was outdated, and new hires spent their first 3 months just learning where to find information. The IT team had tried building a search portal, but keyword search couldn't handle questions like 'What's the approval process for purchases over $5,000?' which required synthesizing information from 3 different documents. They needed an AI assistant that could understand natural language questions, find the right documents, and synthesize answers with citations so employees could verify the source.

Our Approach

We built a three-stage RAG pipeline. Stage 1: Ingestion. We built connectors for Confluence (REST API), SharePoint (Graph API), and Google Drive (API) that pulled documents, chunked them into semantic paragraphs, generated embeddings via OpenAI ada-002, and stored them in Pinecone with metadata (source, date, author, access level). Stage 2: Retrieval. When a user asked a question, we generated an embedding for the query, searched Pinecone for the top 10 most similar chunks, then used a reranking step with Claude to filter out irrelevant results and order by relevance. Stage 3: Generation. Claude synthesized an answer from the top chunks, citing each source with document title, section, and a confidence score. Access controls were enforced at retrieval time: the user's permissions were checked against each document's ACL before including it in the context. We built an admin dashboard for monitoring query logs, identifying frequently asked questions (potential documentation gaps), and tracking document freshness.

What We Built

Document ingestion pipeline for Confluence, SharePoint, and Google Drive.
Semantic search with Pinecone vector database and reranking.
AI Q&A assistant with source citations and confidence scores.
Role-based access controls mirroring existing document permissions.
Admin dashboard with query analytics and documentation gap detection.

Delivery Timeline

Day 1-4: Ingestion Pipeline

Connectors for Confluence, SharePoint, Google Drive. Chunking, embedding, and Pinecone indexing.

Day 5-8: Retrieval + Reranking

Vector search, Claude reranking, access control enforcement, source citation formatting.

Day 9-12: Chat Interface

Conversational UI, source cards, conversation history, follow-up question handling.

Day 13-16: Admin Dashboard

Query analytics, frequently asked questions, documentation gap alerts, document freshness tracking.

Day 17-19: Security + SSO

Azure AD integration, ACL sync, encryption audit, penetration testing.

Day 20-21: Launch

Production deployment, initial full index, user training, admin training.

Tech Stack

Next.js
Frontend
Hono
Backend
Claude AI
Answer Generation
OpenAI
Embeddings
Pinecone
Vector Database
BullMQ
Job Queue
PostgreSQL
Database
Azure AD
Auth

Architecture

frontend

Next.js with a chat interface and source citation cards.

backend

Hono on Railway with BullMQ for document processing queue.

auth

Azure AD SSO for enterprise single sign-on.

data

PostgreSQL for users and query logs. Pinecone for vector storage.

ai

OpenAI ada-002 for embeddings. Claude 3.5 Sonnet for answer generation.

Security

rbac

Document-level ACLs synced from source platforms. Enforced at retrieval time.

encryption

All data encrypted at rest and in transit. No document content stored in plain text.

audit

Every query logged with user, question, sources accessed, and timestamp.

compliance

SOC 2 aligned. No data leaves the company's cloud environment.

The Results

New hire ramp time
90 days30 days
IT help desk tickets (policy questions)
120/month25/month
Average answer time
Hours (searching manually)4.8 seconds
Our new hires used to spend weeks figuring out basic processes. Now they ask the AI assistant and get the answer with a link to the source document. It's like giving everyone a senior colleague who knows everything.
James Crawford
VP of Engineering

Key Takeaways

Reranking after vector search is critical. Raw cosine similarity returns too many false positives. A Claude reranking step improved answer quality by 40%.

Access controls must be enforced at retrieval time, not generation time. If a restricted document appears in the context, the AI will include it in the answer regardless of UI-level hiding.

Document freshness tracking prevents stale answers. We flag documents older than 6 months and surface a 'This source may be outdated' warning on answers.

Deliverables

Full source codeRAG pipeline with connectorsPinecone vector indexAdmin analytics dashboardSecurity audit reportUser and admin training

FAQ

Frequently Asked Questions

Related Case Studies

Want similar results?

Book a free 15-min scope review. Your vision, engineered for production in 14 days. Fixed price.

Book Scope Review