AI Engineering/Build/RAG & Retrieval

RAG & Retrieval

From documents to context: every stage is a design decision

  1. Documents
  2. Embedding
  3. Vector store
  4. Retrieval
  5. LLM
Pillar
Build
Technologies
PostgreSQL · pgvector · Milvus · Zilliz
01

The Pipeline

Retrieval-augmented generation is a pipeline, and answer quality is decided long before the LLM sees anything.

In
Documents
01
Parsing
02
Chunking
03
Embedding
04
Vector store
pgvector · Milvus · Zilliz
05
Retrieval
06
Context construction
Out
LLM

A standard RAG pipeline. Each stage has its own failure modes.

02

Vector Stores

  • PostgreSQL + pgvector — vector search next to relational data, in one database.
  • Milvus — a dedicated vector database.
  • Zilliz — managed Milvus.
03

When Not to Use RAG

Not every document problem is a retrieval problem. On structured engineering data, deterministic matching beats similarity search — see Engineering Document Intelligence.

04

Future Experiments

  • Hybrid search (keyword + vector)
  • Reranking
  • Context compression
  • Retrieval evaluation