RerankRunPipeline
Overview
The RerankRunPipeline
class is made for using reranker easily. To use this class, you can use Reranker
easily without extra work. For further information about reranker, please check out Reranker documentation.
In this pipeline, first retrieval retrieves passages. Then reranker reranks retrieved passages. Finally, put retrieved passages to LLM model.
Usage
Initialize
To create an instance of RerankRunPipeline
, you need to provide an instance of a Retrieval
class and Reranker
class. Optionally, you can specify which LLM model you want to use.
Run Pipeline
The run
variable is runnable of Langchain LCEL. So you can use all method for running pipeline, like invoke
, stream
, batch
, and so on.
If you want to get used passages or relevance scores of retrieved passages, you can use get_passages_and_run
method.
Last updated