Model: jaredmerlo/jared-adjusted
Author: jaredmerlo
Pipeline: sentence-similarity
Library: sentence-transformers
Tags: sentence-transformers, safetensors, bert, sentence-similarity, feature-extraction, generated_from_trainer, dataset_size:11, loss:MatryoshkaLoss, loss:MultipleNegativesRankingLoss, en, arxiv:1908.10084, arxiv:2205.13147, arxiv:1705.00652, base_model:BAAI/bge-base-en-v1.5, base_model:finetune:BAAI/bge-base-en-v1.5, license:apache-2.0, text-embeddings-inference, endpoints_compatible, region:us
Base models (finetune): id: BAAI/bge-base-en-v1.5
Card metadata: language: en
license: apache-2.0
tags: sentence-transformers, sentence-similarity, feature-extraction, generated_from_trainer, dataset_size:11, loss:MatryoshkaLoss, loss:MultipleNegativesRankingLoss
base_model: BAAI/bge-base-en-v1.5
widget: source_sentence: cy by precomputing and storing the likelihood
of query terms, ranking documents based on their sum.
2.3
Retriever and Generator Fine-tuning
Fine-tuning within the RAG framework is crucial for optimizing both retrievers and generators. Some
research focuses on fine-tuning the generator to better utilize retriever context [30–32], ensuring
faithful and robust generated content. Others fine-tune the retriever to learn to retrieve beneficial
passages for the generator [33–35]. Holistic approaches treat RAG as an integrated system, fine-tuning
both retriever and generator together to enhance overall performance [36–38], despite increased
complexity and integration challenges.
Several surveys have extensively discussed current RAG systems, covering aspects like text genera-
tion [7, 8], integration with LLMs [6, 39], multimodal [40], and AI-generated content [41]. While
these surveys provide comprehensive overviews of existing RAG methodologies, selecting the appro-
3
Which city will the nex
sentences:  Small-sized blocks are used to match queries, and larger blocks that include contextual information are returned . We use the LLM-Embedder [20] model as an embedding model to demonstrate the effectiveness of advanced chunking techniques . Techniques like small-to-big and sliding window improve quality by maintaining context .,  Chunking balances preserving text semantics with simplicity and efficiency . Larger chunks provide more context, enhancing the process time but increasing process time . Smaller chunks improve retrieval recall and reduce time but may lack sufficient context . Faithfulness measures whether the response is hallucinated or matches the retrieved texts .,  Some research focuses on fine-tuning the generator to better utilize retriever context [30–32] Others fine-tune the retriever to learn to retrieve beneficial passages for the generator [33–35] Holistic approaches treat RAG as an integrated system ., source_sentence: d I 
want to choose the cheapest mode of transportation, 
should I drive or take a plane?           < Decision making >
I had a quarrel with my parents because they oppose my 
relationship with my boyfriend, but we genuinely love 
each other. How should I persuade my parents to accept 
our relationship?            
 
   < Suggestion >
Figure 2: Classification of retrieval requirements for different tasks. In cases where information is
not provided, we differentiate tasks based on the functions of the model.
priate algorithm for practical implementation remains challenging. In this paper, we focus on best
practices for applying RAG methods, advancing the understanding and application of RAG in LLMs.
3
RAG Workflow
In this section, we detail the components of the RAG workflow. For each module, we review
commonly used approaches and select the default and alternative methods for our final pipeline.
Section 4 will discuss best practices. Figure 1 presents the workflow and methods for each 
sentences:  Chunking documents into smaller segments is crucial for enhancing retrieval precision . This process can be applied at various levels of granularity, such as token, and semantic levels . Table 2: Results for different embedding models on namespace-Pt/msmarco. ge-large-en [12],  Not all queries require retrieval-augmented due to the inherent capabilities of LLMs . Retrieval is generally recommended when knowledge beyond the model’s parameters is needed . For instance, an LLM trained up to 2023 can handle a translation request for “Sora was developed by OpenAI” without retrieval .,  The RAG algorithm for practical implementation remains challenging . In this paper, we focus on best practices for applying RAG methods . Figure 1 presents the workflow and methods for each task . Figure 2: Classification of retrieval requirements for different tasks . In cases where information is not provided, we differentiate tasks based on the functions of the model ., source_sentence: ategorize
Model
Metrics
Acc Prec Rec
F1
BERT-base-multilingual 0.95 0.96 0.94 0.95
Table 1: Results of the Query Classifier.
15 tasks based on whether they provide suffi-
cient information, with specific tasks and exam-
ples illustrated in Figure 2. For tasks entirely
based on user-given information, we denote as
“sufficient”, which need not retrieval; otherwise,
we denote as “insufficient”, and retrieval may
be necessary. We train a classifier to automate
this decision-making process. Experimental de-
tails are presented in Appendix A.1. Section 4
explores the impact of query classification on the workflow, comparing scenarios with and without
classification.
4
Embedding Model
namespace-Pt/msmarco
MRR@1 MRR@10 MRR@100
R@1
R@10 R@100
BAAI/LLM-Embedder [20]
24.79
37.58
38.62
24.07
66.45
90.75
BAAI/bge-base-en-v1.5 [12]
23.34
35.80
36.94
22.63
64.12
90.13
BAAI/bge-small-en-v1.5 [12]
23.27
35.78
36.89
22.65
63.92
89.80
BAAI/bge-large-en-v1.5 [12]
24.63
37.48
38.59
23.91
65.57
90.60
BAAI/b
sentences:  15 tasks based on whether they provide suffi-cient information, with specific tasks and exam-type exam-ples illustrated in Figure 2 . For tasks entirely.given information, we denote as “sufficient” and “insufficient”, which need not retrieval . We train a classifier to automate the decision-making process .,  An open source embedding model is three times smaller than that of BAAI/bge-large-en [12] The size of the two databases is comparable to that of the latter . We select an appropriate vector database for our research based on several key criptions .,  Washington played a crucial role in the American                 Revolutionary War, leading the                 Continental Army against the British. "Please continue writing the above paragraph . Write an article about the geography of Europe, focusing . on the changes in rainfall in the western part of the . western part . of the  southeastern Europe.   If you're currently a computer science student and your computer system encounters a malfunction, what should . you do?
pipeline_tag: sentence-similarity
library_name: sentence-transformers
Likes: 0 | All-time downloads: 39
Created: 2025-04-24 21:40:46