diff --git a/documentation/tutorial.md b/documentation/tutorial.md index 725fe5fc..55f0c383 100644 --- a/documentation/tutorial.md +++ b/documentation/tutorial.md @@ -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) diff --git a/documentation/tutorials/retriever/disable_reranker.md b/documentation/tutorials/retriever/disable_reranker.md new file mode 100644 index 00000000..5ed1e17f --- /dev/null +++ b/documentation/tutorials/retriever/disable_reranker.md @@ -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() +```