Acuñapedia
RAG system with hybrid search that answers questions about government plans from PDFs, press articles and MySQL records.
- Client
- César Acuña campaign
- Year
- 2025 – 2026
- Service
- AI and automation
- Role
- Collaborative web development
- Format
- Web app
- Status
- Delivered

Answering questions about government plans from scattered sources.
The information was spread across PDFs, press articles and MySQL databases with press and public works records. A system was needed to answer questions about the government plans in real time from all of those sources.
A RAG system with hybrid search.
Acuñapedia brings PDFs, press articles and MySQL records into a knowledge base with hybrid search and an analyzer that detects the intent of each query.
We worked on it together with Irvin Acuña, who built the base architecture and containerization. We implemented the production optimizations, the advanced features and the ongoing development of the system.
What it includes
Hybrid search
Combines vector embeddings with BM25 and reranks results dynamically.
Query analyzer
Detects the intent and category of each query to adjust the context and the number of results retrieved.
MySQL sync
Automatic ingestion of press and public works records from relational databases.
Stack and architecture
- Python
- LangChain
- FAISS
- MySQL
- Next.js 15
- Grok AI 4.1
- Docker
- AWS EC2
- Frontend
- Next.js 15 with answers shown as they are generated.
- Backend
- Python and LangChain for document ingestion and the retrieval and answer flow.
- Data
- FAISS vector index combined with BM25 and sync from MySQL.
- Infrastructure
- Docker containers on AWS EC2, with a CPU-optimized deployment.
What we solved
Processing long PDFs
Adaptive chunking and asynchronous batch processing to avoid out-of-memory errors on large files.
Query analyzer accuracy
Trained the analyzer to detect context automatically and dynamically tuned BM25 weights with real data.
CPU deployment
Batches of 128 and hardware tuning to deploy on EC2 without relying exclusively on GPUs.
In detail
- Data sources
- 3
- Search
- Vector + BM25


