Hybrid Retrieval-Augmented Generation on Serverless PostgreSQL: A Comparative Evaluation of HyDE, Graph-Based, and Fusion Retrieval Strategies
We present a lightweight RAG architecture built entirely on PostgreSQL with pgvector and serverless edge functions. Our system implements and evaluates four retrieval strategies: hybrid search with Reciprocal Rank Fusion (RRF), Hypothetical Document Embeddings (HyDE), multi-query expansion, and graph-based retrieval over an automatically constructed knowledge graph. Evaluation on a 427-document Spanish-language corpus with 22 ground-truth pairs shows HyDE achieves the best performance (P@5: 0.595, MRR: 0.838, Hit Rate: 1.0), while graph-based retrieval excels on relational queries. We demonstrate that production-grade RAG systems can operate effectively on commodity serverless infrastructure.
Authors
- Karl J. Mollan Neyra
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-04-03
- DOI
- https://doi.org/10.5281/zenodo.19394029
- Primary Topic
- Information Retrieval and Search Behavior
- Type
- article
- Field-Weighted Citation Impact
- 0.00