>_
ARSLAN VUZMAL LONEAI & Systems Engineer
Back to Selected Work Archive
RAG & Knowledge SystemsSTATUS: Live 1 0

SourceLatch Enterprise RAG

Source-grounded RAG knowledge assistant with vector search and access control

SourceLatch provides accurate, hallucination-free question answering across enterprise document repositories. Built with Next.js, Supabase, and pgvector, it chunks complex PDFs, spreadsheets, and technical docs, indexes semantic embeddings, and generates responses with direct paragraph-level citations.

01 // THE BUSINESS PROBLEM & SITUATION

Operational Context

Enterprise teams waste hours searching through siloed document collections, while generic AI assistants hallucinate unsourced answers that cannot be verified.

CLIENT / ENVIRONMENT: Designed for legal, compliance, and engineering teams requiring strict provenance and document-level citation guarantees.
02 // SYSTEM ARCHITECTURE & SOLUTION

What Was Built

Constructed an enterprise RAG system with document chunking, hybrid vector retrieval, permission filtering, and verifiable source citation badges.

SOURCELATCH // GROUNDED_RAGRetrieval & Citation Diagram
INGESTION
PDFs / Docs
VECTOR STORE
pgvector / Supabase
HYBRID SEARCH
Cosine + BM25
GENERATION
Direct Citations
SYSTEMS_ARCHITECTURE_EXPLODER // LAYERED_STACKFULL-STACK SYSTEM DECOUPLING
Frontend Layer
Next.js 16 App Router, React 19, Tailwind CSS, TypeScript
API & Middleware
FastAPI, Pydantic Schema Validation, Rate Limiters
Orchestration
LangGraph Multi-Agent Supervisor & State Machines
Model Providers
OpenAI GPT-4o, Anthropic Claude 3.5, Vision AI
Data Stores
PostgreSQL (Prisma), Qdrant Vector Store, Redis Caching
Observability
LangSmith traces, Pydantic audit logs, Error retries
03 // ENGINEERING CONTRIBUTION & FEATURES

Exact Contribution

  • Built multi-format document ingestion pipeline with semantic chunking
  • Implemented pgvector similarity search with metadata-based access control filtering
  • Engineered citation attribution engine mapping every claim to source document pages
  • Developed modern Next.js knowledge base management dashboard

Key Capabilities Built

Multi-Format Document Ingestion (PDF, DOCX, TXT)
Hybrid Semantic & Keyword Vector Retrieval
Direct Page & Paragraph Source Citations
Role-Based Document Access Permissions
Human-in-the-Loop Escalation for Low-Confidence Queries
DATA_PROVENANCE_TIMELINE // AUDIT_TRACETRACE_ID: #TR-992041
14:22:01.002Source Ingestion
Received webhook payloadOK
14:22:01.045Schema Validation
Pydantic structured field checkOK
14:22:01.210LangGraph Reasoning
Evaluated criteria rulesOK
14:22:01.350Human Audit Check
Confidence threshold evaluationPASSED
14:22:01.480Database Commit
Created audit record in PostgreSQLCOMMITTED
*Illustrative system trace — demonstration data, not a client result.
04 // EXECUTION PIPELINE

Step-by-Step Workflow

STEP 01Operator uploads document corpus to encrypted storage.
STEP 02Ingestion worker extracts text, parses hierarchy, and generates vector embeddings.
STEP 03User enters natural language query into the search interface.
STEP 04Retriever fetches top semantic chunks filtered by user permission roles.
STEP 05Model generates structured answer with clickable source citations.
05 // ENGINEERING LESSONS & OUTCOMES

Technical Challenges Overcome

  • Balancing chunk overlap to preserve tables and code snippets across page breaks.
  • Ensuring strict isolation between departmental document collections.

Measurable Outcomes

Sub-second query retrieval across extensive document corpora.
Zero ungrounded factual claims through strict citation verification prompt design.
Live deployment accessible with instant search capabilities.

Lessons & Engineering Rules

  • "RAG systems must enforce access control at the database vector retrieval layer rather than filtering post-generation."
  • "Displaying exact page numbers and highlighting excerpt text builds immense confidence with non-technical users."
NEXT RELATED CASE STUDY

Orchestrion Multi-Agent Studio

View Study
PROJECT METADATA
ARSLAN'S ROLERAG & Search Engineer
YEAR & STATUS2025 // Live
CATEGORYRAG & Knowledge Systems
TECHNOLOGY STACK
TypeScriptNext.jspgvectorPostgreSQLSupabaseSemantic SearchTailwind CSS
GITHUB METRICS
Stars: 1
Forks: 0
Verified GitHub Update: 8/20/2026

Need a similar solution?

If your business faces similar data, automation, or software bottlenecks, let's discuss your requirements.

Start a Conversation