Skip to content
Open access

Analysis of Threshold Similarity Effect on Dense Retrieval in Retrieval-Augmented Generation Systems Using the SQuAD Dataset

Jul 2026 · Journal of Artificial Intelligence and Data Science · 0 citations

TL;DR

The conclusions that can be drawn from this experiment are that threshold-based filtering of context significantly improves the performance of a RAG model.

Abstract

Retrieval-Augmented Generation (RAG), which combines text generation and document retrieval, is one of the more useful methods for maintaining big language model outputs based on actual, verifiable sources rather than the model's own stored knowledge. However, what is initially extracted from the retrieval stage has a significant impact on how well a RAG system responds to a query. Using the Stanford Question Answering Dataset (SQuAD) as the testbed, this study especially examines how the similarity threshold employed during dense retrieval affects both retrieval quality and, later on in the pipeline, the quality of the final answer. The multi-qa-mpnet-base-dot-v1 embedding model was used to encapsulate context passages and questions, which were then compared using cosine similarity. The answer generator was LLaMA 3.1 8B, which was accessed using the Groq API. Fifty questions selected from the SQuAD validation set were used to test eleven threshold values, ranging from 0.0 to 1.0 in steps of 0.1. The quality of retrieval was evaluated by the measures Recall, Precision, and Mean Reciprocal Rank (MRR). The generated answers were assessed by means of Exact Match (EM) and F1 Measure. The baseline performance (at 0.0 threshold) had F1 at 0.827 and EM at 0.72, while for the 0.3 threshold it became F1 at 0.848 and EM at 0.78. Once past the 0.5 threshold, all metrics showed a sharp drop. Overall, the conclusions that can be drawn from this experiment are that threshold-based filtering of context significantly improves the performance of a RAG model.

Read PDF

Similar papers

Open access Jul 2026

ADAPTIVE MULTI-STAGE VECTOR RETRIEVAL FOR RETRIEVAL-AUGMENTED GENERATION

The Adaptive Multi-Stage Vector Retrieval (AMSVR) framework is proposed, prioritising weighted, drift-resistant composition over uniform fusion, and offers tailored configurations: AMSVR-Scientific (dense + tuned hybrid) peaks at NDCG@10 = 0.7570 on SciFact, while AMSVR-Full (seven stages) targets broader, noisier corp...

Samsudeen Alabi Bankole, Yakub Kayode Saheed · 0 citations
Open access Jul 2026

Optimized Hybrid Retrieval-Augmented Generation Framework using Semantic Search and Re-ranking for Reliable LLM Responses

Evaluation on a multi-page technical PDF document shows that the hybrid retrieval and re-ranking stages together raise retrieval precision and reduce irrelevant or unsupported answers compared with retrieval limited to a single method, supporting the use of this approach for reliable, document-grounded question answeri...

Vishwa K Dave, K. Pallavi · 0 citations
Conference Jul 2026

An Intelligent PDF Question-Answering System; A Retrieval-Augmented Generation Approach

Due to the surge in digital document creation, intelligent systems that can effectively retrieve accurate information from unstructured PDF content have become a necessity. Current keyword-based search techniques lack semantic meaning, while large language models (LLMs), when utilized individually, produce hallucinated...

Mukesh Lakshmi Sai Medikonda, Kalva Vishnu Teja, K. Greeshma et al. · 0 citations
#small language model Review Open access Aug 2026

Query Optimization Techniques in Retrieval-Augmented Generation (RAG) Systems

Retrieval-Augmented Generation (RAG) helps language models give more accurate answers by using information from external documents. Instead of depending only on what the model learned during training, it can search for relevant information when needed. The quality of the retrieved information is important for getting g...

Ayush Aryan, Sudhakar Ranjan · 0 citations
Open access 2026

SAC-RAG: Semantic Adaptive Context Compression for Retrieval-Augmented Generation

Experimental results show that SAC-RAG reduces token consumption by 38%–58% at the cost of only a 1–2 percentage point EM drop, with EM actually improving after compression for reasoning-type questions, achieving the optimal quality–efficiency trade-off in terms of token consumption.

Deyu Zhang, Hongqiang Yu, Jinze Huo et al. · 0 citations
Conference Jul 2026

A Reproducible and Budget-Aware Framework for Evaluating Local Retrieval-Augmented Generation (RAG) Robustness to Perturbations

The idea of context is no longer considered secondary in the construction of language-model systems. With the use of local Retrieval-Augmented Generation, even a tiny modification of the prompt or the context might produce another set of retrievals, citations, and ultimately different answers; however, in practice, tes...

Rahul Reddy Gangapuram, William B. Andreopoulos · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.