AHSAN RIAZ
WORK/RAG knowledge system

RAG / Internal AI

Answers based on company documents, with the source attached

Company document search

Category: RAG / Internal AI
Stack: RAG · Supabase · pgvector · Google Drive · LLMs
[SYSTEM ARCHITECTURE MAP]RAG / Internal AI
Ingestion — scheduledQuery — real timeGoogle DriveCompany documentsChunk & cleanStructured segmentsGenerate embeddingsPer chunkSupabase + pgvectorShared vector storeTeam asks a questionChat interfaceEmbed the questionSame modelAnswer + source linkGrounded in documentsMatch & retrieve

Ingestion runs on the left: Google Drive documents are chunked, embedded, and stored in Supabase with pgvector. Query runs on the right: a question is embedded, matched against the same shared vector store, and answered with a source link attached.

The operational problem

Company material needed to be searchable without losing the link to the original source.

How the system handles it

Google Drive documents are processed, chunked, embedded, stored in Supabase with pgvector, and retrieved before the assistant answers.

ENGINEERING DECISIONS

Logic & boundary design

01 / AI Judgment

Unstructured data processing, context extraction, and reasoning.

02 / Rules Engine

Deterministic conditions, status routing, and strict validation.

03 / Human Review

Final approval triggers, manual overrides, and audit checkpoints.

04 / Custom Code

API fallbacks, database connectors, and custom Python integrations.

SYSTEM OUTCOME

Answers stay grounded in company material and return links to source documents.

Have a similar operational workflow?

Show me how your team handles this today, and we can map what the automated system should look like.

Book a discovery call→