Sales Enablement Content Copilot
A RAG copilot and retrieval API over a sales enablement content library — hybrid BM25 + vector + parent-child retrieval, with grounded, cited answers.







OVERVIEW
Turning a Content Library Into a Knowledge Layer
A sales enablement expert had built a deep library of blog posts, frameworks, and sales content — but users still had to know where to look. I built an AI copilot and retrieval API that lets anyone ask a question and get a grounded answer with links to the relevant source content.
The system extracts content from Google Drive, preserves its structure and metadata, enriches it with AI classification, and serves it through a hybrid RAG retrieval layer combining BM25 keyword search, vector search, and parent-child retrieval.
The key design choice was treating the content library as a knowledge layer, not a document repository — preserving document structure, taxonomy, context, and relationships between assets rather than just embedding chunks and hoping semantic search would work.
The Challenge
For a sales enablement corpus, retrieval quality depends on more than similarity. A useful copilot has to account for:
User intent and the sales lifecycle stage behind a question
Content type — a framework, a blog post, and a playbook answer questions differently
Passage-to-asset relationships, so a relevant chunk keeps its surrounding context
Whether the answer needs one source or several related sources
Access permissions, since content is tiered by membership level
Naive chat-over-documents fails on all of these. The challenge was building durable knowledge infrastructure: traceable to source documents, permission-aware, and measurable.
APPROACH
The Approach
I built the platform as a set of separated pipeline stages, developed spec-by-spec:
Sales enablement taxonomy: a structured classification of all content, with AI-proposed labels and human review before promotion
Data extraction: Google Drive sync (Docs, Slides, PDFs) with raw bytes archived to Cloud Storage, then outline-first hierarchical and structural chunking that preserves each document's corpus and outline path
AI enrichment: OpenAI structured classification plus chunk embeddings, with versioned prompts, idempotent runs, and a review queue for human approval
Hybrid retrieval: metadata filtering, then fused BM25 keyword and pgvector similarity search, then hierarchical parent-child expansion and reranking — with weights managed in versioned config
Copilot interface: a Next.js app with grounded answers, citations, recommended assets, follow-up suggestions, and thumbs-up/down feedback
Product intelligence: every user query, retrieval result, and piece of feedback is logged for evaluation and roadmap insight
Core architecture:
FastAPI knowledge API exposing search, answer, and admin endpoints
PostgreSQL with pgvector as the single store for relational metadata and embeddings
Google Drive as the content source, with Cloud Storage as the raw archive
PyMuPDF and pdfplumber for extraction; outline-first section chunking
OpenAI for classification and embeddings, with versioned prompt and retrieval configs
Next.js copilot and admin console (review queue, asset library, pipeline dashboard, taxonomy manager)
Membership-tier permissions enforced at retrieval time
Cloud Run services and jobs on Google Cloud Platform, with scheduled syncs and evaluation runs
Technical Stack
FastAPI
PostgreSQL + pgvector
OpenAI API
Next.js
Google Drive API
Python
Docker
Google Cloud Platform
RESULTS
Key Outcomes
A working copilot that answers questions from the site's content and links to the relevant source assets
A hybrid retrieval layer combining BM25, vector search, and parent-child retrieval — each covering a failure mode of the others
A reviewed, AI-assisted taxonomy across the full content library
An admin console for running and monitoring the whole ingestion-to-answer pipeline
Query, retrieval, and feedback logging that turns usage into product intelligence
Why This Matters
Most 'chat with your documents' builds stop at embedding chunks. This project shows what it takes to make retrieval trustworthy on a real, structured corpus:
BM25 handles precise sales terminology; vector search handles semantic matching; parent-child retrieval preserves context when a small chunk is relevant but the surrounding document matters
Structure, metadata, and taxonomy are retrieval features, not documentation niceties
Human review of AI classification keeps the knowledge layer accurate as it grows
This is where AI products are heading: not chat over documents, but workflow-aware copilots that sit between proprietary knowledge, business context, and the systems teams already use.
Looking Forward
Roadmap:
An external API and remote MCP server so other tools and agents can query the knowledge layer
Strategic upsells based on user intent captured in queries
Connections to sales experts when content alone is not enough
Integrations with sales platforms like Salesforce and Apollo.io
A recurring retrieval evaluation suite and taxonomy coverage reporting
Interested in building something similar?
We help organizations design scalable AI and analytics infrastructure for:
forecasting
growth analytics
operational automation
machine learning platforms
agentic AI workflows
cloud-native data systems
Let’s build systems that turn data into operational leverage.