#222 · Primary category: Knowledge Base & RAG

finetune-embedding

Fine-Tuning Embedding for RAG with Synthetic Data

Project last updated:09/11/23

GitHub Stars

527

Forks

75

Contributors

3

License

Other

Why we included this project

Teams working on retrieval-augmented generation over private or specialized documents often hit a wall with general-purpose embedding models, which miss the exact phrasing users actually type. This set of notebooks walks through a workaround: use an LLM to generate hypothetical questions for each text chunk, so you get positive query-document pairs without manual labeling. Then fine-tune an open embedding model on those pairs with a ranking loss and compare retrieval against the base model and OpenAI's embedding. The authors test it on financial PDFs and show retrieval improves noticeably. One caveat: the code is dated, and the maintainers folded the abstractions into the main LlamaIndex repository, so treat this as a learning reference for the technique rather than something to deploy directly.

Articles for this project

No articles for this project yet.

To suggest a topic or contribute an article, contact us.

Related projects in this category