Operations team, US

Custom RAG assistant trained on company documents

An internal assistant that answers staff questions from the company's own documentation, with citations — instead of generic, wrong answers.

Document Indexes
refund-policy.pdf
SLA-guidelines.pdf
User:

How do I request a refund under the guidelines?

Grounded AI:

Under Section 2.4, refunds must be requested within 14 days of setup.

Source: refund-policy.pdf#L24
Pinecone Vector Indices Partition
Document Chunk #422: SLA-guidelines.pdf

"...Critical Priority (P1) issues trigger active response windows within 2 hours. Normal priority..."

Vectors embeddings: [0.9982, -0.1249, 0.4018, ...] • cosine_similarity
RAG Pipeline QA Benchmark
Retrieval Relevance Precision:96.8% Accuracy
Faithfulness Accuracy:94.2% Accuracy
Response latency (average):1.18 seconds
Internal RAG Assistant
Platform
4 Weeks
Timeline
1 AI Dev, 1 UI Dev
Team Size
Pinecone Vector DB
Integration
Next.js, LangChain, OpenAI
Tech Stack
The Challenge Kicker

The Challenge

Staff wasted time hunting through scattered documentation, and a generic chatbot just made things up. The lack of grounded context meant AI summaries could not be relied upon.

  • Internal documentation scattered across Notion, Slack channels, and local PDFs.
  • Generic LLM models hallucinating critical operational procedures.
  • No baseline evaluation framework to measure if AI updates made answers better or worse.
Operations Bottleneck

Inaccurate answers and database information gaps.

Infrastructure Solved

Prompt templates citing vectors metadata.

The Solution Kicker

The Solution

We built a RAG pipeline over the company's documents — correct chunking, a tuned embedding strategy, and retrieval that returns sources with every answer. An eval set lets the team measure accuracy rather than guess at it.

  • Unified ingestion scripts that parse and clean files from Notion and Google Drive.
  • Smart chunking with semantic boundaries to preserve sentence and context structure.
  • Vector database storage returning exact document paths and page numbers.
Workflow

Our Approach

1

Document Audit

Identified and cataloged target document repositories and clean text structures.

2

Chunking Design

Evaluated semantic sentence chunking algorithms to preserve domain context.

3

Vector Indexing

Configured Pinecone index with cosine similarity metric and metadata filtering schemas.

4

Retrieval Tuning

Tuned hybrid search (keyword + vector embeddings) to boost search query match rates.

5

Chat UI Development

Built a clean Next.js chat layout displaying references alongside answers.

6

Evaluation Sandbox

Created a testing suite of 50 common questions to benchmark accuracy improvements.

Flowchart

User Journeys

Support Representative

Encounters complex client question about service policies
Types query into the internal RAG assistant search bar
Assistant responds in under 1 second with detailed references
Rep validates source links and replies to the customer confidently

Operations Lead

Uploads updated policy PDFs to the system document store
Checks evaluation dashboard to verify accuracy scores
Reviews query history logs to find missing topics in documentation
Technologies Used

Tech Stack

Frontend Client

  • Next.js (App Router)
  • Tailwind CSS
  • Framer Motion

AI Orchestration

  • LangChain
  • OpenAI API
  • RAG Pipeline

Vector Search

  • Pinecone DB
  • Cosine Similarity
  • Metadata filters

Evaluations & QA

  • Ragas framework
  • Grounding filters
Architecture & Code

Development Process

Semantic Chunking

Avoided generic token-count cutoffs by splitting chunks at logical section boundaries and header levels.

Grounding Guardrails

Programmed prompt layers to instruct LLM models to respond with 'I do not know' if confidence thresholds are missed.

Citation Links

Stored source URLs and page ranges in the vector metadata, enabling frontend UI rendering of direct links.

Accuracy Eval Set

Established regression tests using Ragas metrics to monitor faithfulness and answer relevance.

Outcome

Results & Impact

Measurable efficiency gains, reduced operations costs, and reliable integrations delivered.

100%
grounded citations
<1.2s
answer latency
+85%
search speed lookup

Building something ambitious, or fixing something that's gone sideways?

Tell us where you are and where you're trying to get to. We'll tell you honestly whether — and how — we can help.