Skip to content

Commit

Permalink
Example/rag lotr (#98)
Browse files Browse the repository at this point in the history
* Create README.md

* Create app.py

FLARE chain using arvix paper q&a app

* Add files via upload

* Update README.md

* Create requirements.txt

* Update README.md

* Add files via upload

* Update README.md

* Update README.md

* Delete tutorials/Advance-RAG-FLARE_HyDE directory

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Create REDME.md

* Add files via upload

* Rename REDME.md to README.md

* Update README.md
  • Loading branch information
akashAD98 authored Dec 20, 2023
1 parent 012adc6 commit 9e50bbc
Show file tree
Hide file tree
Showing 3 changed files with 1,526 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ If you're looking for in-depth tutorial-like examples, checkout the [tutorials](
| [Improve RAG with Re-ranking](./examples/RAG_re_ranking/) | <a href="https://colab.research.google.com/github/lancedb/vectordb-recipes/blob/main/examples/RAG_re_ranking/main.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> |[![Medium](https://img.shields.io/badge/Medium-12100E?style=for-the-badge&logo=medium&logoColor=white)](https://blog.lancedb.com/simplest-method-to-improve-rag-pipeline-re-ranking-cf6eaec6d544)|
| [Improve RAG with FLARE](./examples/Advanced-RAG-with-FLARE) | <a href="https://colab.research.google.com/github/lancedb/vectordb-recipes/blob/main/examples/Advanced-RAG-with-FLARE/main.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> [![Python](https://img.shields.io/badge/python-3670A0?style=for-the-badge&logo=python&logoColor=ffdd54)](.examples/instruct-multitask/main.py) | [![Medium](https://img.shields.io/badge/Medium-12100E?style=for-the-badge&logo=medium&logoColor=white)](https://blog.lancedb.com/better-rag-with-active-retrieval-augmented-generation-flare-3b66646e2a9f)|
| [Improve RAG with HyDE](./examples/Advance-RAG-with-HyDE/) | <a href="https://colab.research.google.com/github/lancedb/vectordb-recipes/blob/main/examples/Advance-RAG-with-HyDE/main.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> |[![Medium](https://img.shields.io/badge/Medium-12100E?style=for-the-badge&logo=medium&logoColor=white)](https://blog.lancedb.com/advanced-rag-precise-zero-shot-dense-retrieval-with-hyde-0946c54dfdcb)|
| [Improve RAG with LOTR ](./examples/Advance_RAG_LOTR/) | <a href="https://colab.research.google.com/github/lancedb/vectordb-recipes/blob/main/examples/Advance_RAG_LOTR/main.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> |[![Medium](https://img.shields.io/badge/Medium-12100E?style=for-the-badge&logo=medium&logoColor=white)](https://blog.lancedb.com/better-rag-with-lotr-lord-of-retriever-23c8336b9a35)|
| [Advanced RAG: Parent Document Retriever](./examples/parent_document_retriever/) | <a href="https://colab.research.google.com/github/lancedb/vectordb-recipes/blob/main/examples/parent_document_retriever/main.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> |[![Medium](https://img.shields.io/badge/Medium-12100E?style=for-the-badge&logo=medium&logoColor=white)](https://blog.lancedb.com/modified-rag-parent-document-bigger-chunk-retriever-62b3d1e79bc6)|
| [Hybrid search BM25 & lancedb ](./examples/Hybrid_search_bm25_lancedb/) | <a href="https://colab.research.google.com/github/lancedb/vectordb-recipes/blob/main/examples/Hybrid_search_bm25_lancedb/main.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> |[![Medium](https://img.shields.io/badge/Medium-12100E?style=for-the-badge&logo=medium&logoColor=white)](https://blog.lancedb.com/hybrid-search-combining-bm25-and-semantic-search-for-better-results-with-lan-1358038fe7e6)|
| [Evaluating Prompts with Prompttools](./examples/prompttools-eval-prompts/) | <a href="https://colab.research.google.com/github/lancedb/vectordb-recipes/blob/main/examples/prompttools-eval-prompts/main.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> | |
Expand Down
21 changes: 21 additions & 0 deletions examples/Advance_RAG_LOTR/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
## Better RAG with LOTR - Lord of the Retriever

### Overview
This repository contains resources and code for enhancing Retrieval-Augmented Generation (RAG) systems using a novel approach termed LOTR (Lord of the Retriever). The primary focus is on addressing the 'Lost in the Middle' (LIM) challenge in RAG systems, particularly in the context of medical/healthcare data.

### Features
Advanced Retrieval Techniques: Utilizes multiple vector stores and the Merge Retriever approach to efficiently retrieve relevant documents.
LOTR - Merger Retriever: Combines results from various retrievers to form a comprehensive, relevant document list.
LongContextReorder (LOTR): Reorders information to ensure equal attention to all parts of the text.
Domain-Specific Embeddings: Incorporates specialized embeddings for medical and healthcare-related data.


## code

Colab walkthrough for LOTR <a href="https://colab.research.google.com/github/lancedb/vectordb-recipes/blob/main/examples/Advance_RAG_LOTR/main.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a>

### Learn deeper in Our Blog
For a deeper dive into the cutting-edge technologies of FLARE, and to access detailed technical knowledge, check out our Medium Blog.


[Read the Blog Post](https://medium.com/@aksdesai1998/better-rag-enhancing-ai-with-active-retrieval-augmented-generation-flare-3b66646e2a9f)
Loading

0 comments on commit 9e50bbc

Please sign in to comment.