Assessing vector-based retrieval in elasticsearch for financial document search and analysis

Altres autors/es

Universitat Politècnica de Catalunya. Departament d'Estadística i Investigació Operativa

Duarte López, Ariel

Data de publicació

2026-01-30



Resum

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.

Tipus de document

Bachelor thesis

Llengua

Anglès

Publicat per

Universitat Politècnica de Catalunya

Citació recomanada

Aquesta citació s'ha generat automàticament.

Drets

Open Access

Aquest element apareix en la col·lecció o col·leccions següent(s)