In the previous article, we looked at different retrieval strategies—BM25, Vector Search, Hybrid Search, SQL, and LLM-powered retrieval. The next logical question is:
Where does the information actually come from?
The answer is a Knowledge Base.
Knowledge bases have become the foundation of many RAG and AI applications. Every major cloud provider now offers a managed knowledge base service, but regardless of the implementation, they all follow a very similar architecture.
At a high level, a knowledge base consists of six stages:
Data Sources
↓
Connectors
↓
Indexing Pipeline
↓
Indexes
(Vector • Metadata • Keyword)
↓
Retrieval
↓
LLM
π Connectors
The first step is getting data into the knowledge base.
Common connectors include:
S3
SharePoint
Confluence
Google Drive
Salesforce
Web crawlers
Custom APIs
The connector continuously discovers new or updated documents and feeds them into the indexing pipeline.
π️ Indexing Pipeline
Before documents become searchable, they pass through an indexing pipeline.
Typical steps include:
Text extraction
Chunking
Metadata extraction
Embedding generation
Index creation
This is where raw documents are transformed into searchable knowledge.
π Indexes
Most knowledge bases maintain multiple indexes, each optimized for a different retrieval strategy.
Vector Index for semantic search
Metadata Index for filtering
Keyword Index (BM25) for exact matching
Different queries may use one index—or combine multiple indexes—depending on the retrieval strategy.
π Retrieval
When a user submits a query, the retrieval layer determines the best way to find relevant information.
Depending on the use case, it may use:
BM25
Vector Search
Hybrid Search
Metadata filters are often applied before returning the most relevant chunks.
(If you're interested in when to use each retrieval strategy, see my previous article on BM25, Vector Search, Hybrid Search, SQL, and LLM-powered retrieval.)
π€ Generation
The retrieved chunks are passed to an LLM as context.
The LLM doesn't search your documents directly—it generates an answer using the retrieved context.
This is the Generation in Retrieval-Augmented Generation (RAG).
☁️ Managed Knowledge Bases
Most cloud providers package this entire pipeline into a managed service.
You typically configure:
Connectors
Chunking strategy
Embedding model
Indexes
Retrieval settings
The platform manages ingestion, indexing, synchronization, and retrieval.
Although services differ in their connectors, indexing options, and extensibility, the underlying architecture remains largely the same.
π― Final Thought
A knowledge base is much more than a vector database.
It's an end-to-end pipeline that ingests content, transforms it into searchable indexes, retrieves relevant context, and provides it to an LLM.
Understanding this architecture makes it much easier to understand where managed knowledge bases fit—and why some organizations eventually choose to build their own.
No comments:
Post a Comment