Skip to content

Commit

Permalink
tutorial on disabling reranker
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyash2106 committed Aug 1, 2024
1 parent 5803b56 commit f23e98f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions documentation/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
1. [Optimizing FAISS for large-scale data](https://github.com/autogluon/autogluon-rag/tree/main/documentation/tutorials/vector_db/optimizing_faiss.md)

## Retriever Module
1. [Disable the reranker and only use embedding model for retrieval](https://github.com/autogluon/autogluon-rag/tree/main/documentation/tutorials/retriever/disable_reranker.md)

## Generator Module
1. [Change generator after initializing RAG pipeline](https://github.com/autogluon/autogluon-rag/tree/main/documentation/tutorials/generator/change_generator.md)
20 changes: 20 additions & 0 deletions documentation/tutorials/retriever/disable_reranker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
## This is a tutorial on disabling the reranker and only use embedding model for retrieval.

The reranker is an optional sub-module that can be used within the retriever module to rerank the retrieved text from the Vector DB.
There are two ways to configure the reranker.

One way is through the config file:
```python
retriever:
use_reranker: true
reranker_model_name: BAAI/bge-large-en
reranker_model_platform: huggingface
reranker_model_platform_args: null
```

The alternate way is through code:
Refer to [this](https://github.com/autogluon/autogluon-rag/tree/main/documentation/tutorials/general/setting_parameters.md) tutorial on how to modify arguments through code after instantiating an `AutoGluonRAG` object.
```python
agrag.use_reranker = False
agrag.initialize_retriever_module()
```

0 comments on commit f23e98f

Please sign in to comment.