RAGchain.reranker package
Subpackages
- RAGchain.reranker.importance package
- RAGchain.reranker.llm package
- RAGchain.reranker.pygaggle package
- RAGchain.reranker.tart package
- Submodules
- RAGchain.reranker.tart.modeling_enc_t5 module
EncT5ForSequenceClassification
EncT5ForSequenceClassification.deparallelize()
EncT5ForSequenceClassification.forward()
EncT5ForSequenceClassification.get_encoder()
EncT5ForSequenceClassification.get_input_embeddings()
EncT5ForSequenceClassification.parallelize()
EncT5ForSequenceClassification.set_input_embeddings()
EncT5ForSequenceClassification.training
- RAGchain.reranker.tart.tart module
- RAGchain.reranker.tart.tokenization_enc_t5 module
- Module contents
- RAGchain.reranker.time package
- RAGchain.reranker.upr package
Submodules
RAGchain.reranker.base module
- class RAGchain.reranker.base.BaseReranker
Bases:
Runnable
[RetrievalResult
,RetrievalResult
],ABC
- property InputType: Type[Input]
The type of input this runnable accepts specified as a type annotation.
- property OutputType: Type[RetrievalResult]
The type of output this runnable produces specified as a type annotation.
RAGchain.reranker.bm25 module
- class RAGchain.reranker.bm25.BM25Reranker(tokenizer_name: str = 'gpt2', *args, **kwargs)
Bases:
BaseReranker
BM25Reranker class for reranker based on BM25. You can rerank the passages with BM25 scores .
- invoke(input: Input, config: RunnableConfig | None = None) Output
Transform a single input into an output. Override to implement.
- Args:
input: The input to the runnable. config: A config to use when invoking the runnable.
The config supports standard keys like ‘tags’, ‘metadata’ for tracing purposes, ‘max_concurrency’ for controlling how much work to do in parallel, and other keys. Please refer to the RunnableConfig for more details.
- Returns:
The output of the runnable.