Universitat Politècnica de Catalunya. Departament d'Estadística i Investigació Operativa
Duarte López, Ariel
2026-01-30
This study develops and evaluates a production-ready vector-based semantic retrieval system in Elasticsearch for financial document search, with a particular focus on Securities and Exchange Commission (SEC) filings. The work is motivated by the need for accuracy and traceability in financial analysis and is framed within a Retrieval-Augmented Generation (RAG) pipeline, where retrieval quality directly impacts the reliability of AI-assisted outputs and helps reduce hallucinations by grounding responses in authoritative documents. The system indexes document chunks as dense embeddings and compares multiple embedding models and retrieval strategies, including brute-force exact scoring (cosine similarity and dot product) and approximate nearest-neighbor search using Elasticsearch’s supported hierarchical navigable small world (HNSW) algorithm. Experiments are conducted in an Elasticsearch + Kibana environment deployed via Docker Compose and evaluated on three established financial retrieval benchmarks: SecQue Bench, FinGPT Bench, and FinDER Bench. Retrieval effectiveness is measured with Mean Reciprocal Rank (MRR), while efficiency is assessed through per-query latency to analyze speed–accuracy trade-offs across configurations. Results show that Qwen3-0.6B consistently achieves the highest retrieval effectiveness across datasets, with all-mpnet-base-v2 as the most competitive alternative. Additionally, HNSW reduces query latency relative to exact script-based scoring while maintaining very similar MRR in most configurations, indicating a favorable operational trade-off for real deployments. Overall, the project demonstrates that Elasticsearch and tis capabilities can support an efficient semantic retrieval layer for financial documents, and that embedding model selection primarily sets the upper bound on retrieval quality, while approximate retrieval methods improve responsiveness with minimal loss in effectiveness.
Bachelor thesis
Anglès
Àrees temàtiques de la UPC::Economia i organització d'empreses; Àrees temàtiques de la UPC::Informàtica::Sistemes d'informació::Emmagatzematge i recuperació de la informació; Financial engineering; Information storage and retrieval systems; Enginyeria financera; Informació--Sistemes d'emmagatzematge i recuperació
Universitat Politècnica de Catalunya
Open Access
Treballs acadèmics [82075]