Skip to content

Mega4alik/EmbbeddingsFtRAG

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EmbbeddingsFtRAG

Learn about the importance of Fine-tuning Embeddings for RAG applications at https://medium.com/@ailabs/fine-tuning-embeddings-for-rag-applications-272165a31b4a

Brief explanation

What if you could pre-train your embeddings to anticipate the kinds of questions your users might ask? Here’s the idea:

  1. Generate Question-Chunk Pairs: For each chunk of text in your dataset, generate multiple potential questions it could answer.
  2. Fine-Tune the Embedding Model: Train the model to pull embeddings of related questions and chunks closer together in multidimensional space while pushing unrelated ones further apart.

While this approach might seem like overfitting, it actually focuses on optimizing for generalization. It turns out, fine-tuning embeddings in this way equips the system to handle unseen queries with improved accuracy.

About

Fine-tuning Embeddings on closed-domain data for better RAG

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages