PocketRAG: serverless hybrid RAG in pure PHP

RAG PHP SQLite BM25 Embeddings Serverless

A hybrid Retrieval-Augmented Generation engine built from scratch in pure PHP — no Composer, no custom C extensions, no background daemons — designed to run on restrictive shared hosting (cPanel) with low cost and low resource use.

Constraints

Architecture

Outcome

PocketRAG shows advanced generative AI can ship on legacy shared hosting: sub-second response generation, minimal CPU/RAM, and an immutable migration path between embedding models — a resilient design for constrained budgets.