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

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
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Hybrid Retrieval-Augmented Generation on Serverless PostgreSQL: A Comparative Evaluation of HyDE, Graph-Based, and Fusion Retrieval Strategies

Karl J. Mollan Neyra
Zenodo (CERN European Organization for Nuclear Research)
Information Retrieval and Search Behavior
article

Hybrid Retrieval-Augmented Generation on Serverless PostgreSQL: A Comparative Evaluation of HyDE, Graph-Based, and Fusion Retrieval Strategies

Karl J. Mollan Neyra
article en

Abstract

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.

Zenodo (CERN European Organization for Nuclear Research)
Industry, innovation and infrastructure
Openalex Percentile: Top 19%
Information Retrieval and Search Behavior
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.