From 75be0914f6bd2cdeda1539f83b38fcbc854d5cfa Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Tue, 23 Apr 2024 22:08:03 +0200 Subject: Add reranking as a separate step --- rag/generator/abstract.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'rag/generator/abstract.py') diff --git a/rag/generator/abstract.py b/rag/generator/abstract.py index 1beacfb..439c1b5 100644 --- a/rag/generator/abstract.py +++ b/rag/generator/abstract.py @@ -16,3 +16,7 @@ class AbstractGenerator(type): @abstractmethod def generate(self, prompt: Prompt) -> Generator[Any, Any, Any]: pass + + @abstractmethod + def rerank(self, prompt: Prompt) -> Prompt: + return prompt -- cgit v1.2.3-70-g09d2