From 5531d8147e52324a16c977f385715f934af5f246 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Mon, 5 Aug 2024 00:37:21 +0200 Subject: Fix broken stuff --- rag/generator/prompt.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'rag/generator') diff --git a/rag/generator/prompt.py b/rag/generator/prompt.py index cedf610..75966e8 100644 --- a/rag/generator/prompt.py +++ b/rag/generator/prompt.py @@ -29,11 +29,13 @@ class Prompt: return f"{self.query}\n\n{ANSWER_INSTRUCTION}" else: return ( - "Context information is below.\n" + "<|begin_of_text|><|start_header_id|>user<|end_header_id|>\n" + "Using the information contained in the context, give a comprehensive answer to the question.\n" + "If the answer cannot be deduced from the context, do not give an answer.\n\n" + "Context:\n" "---\n" f"{self.__context(self.documents)}\n\n" "---\n" - f"{ANSWER_INSTRUCTION}" - f"Query: {self.query.strip()}\n\n" - "Answer:" + f"Question: {self.query}<|eot_id|>\n" + "<|start_header_id|>assistant<|end_header_id|>\n\n" ) -- cgit v1.2.3-70-g09d2