diff options
author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2024-08-05 00:37:21 +0200 |
---|---|---|
committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2024-08-05 00:37:21 +0200 |
commit | 5531d8147e52324a16c977f385715f934af5f246 (patch) | |
tree | 8688c70a4cfc1ee617c9533a401530bd15556bf9 /rag/generator | |
parent | 5142aaaa356549ba7e7e9cdacf365326191831ac (diff) |
Fix broken stuff
Diffstat (limited to 'rag/generator')
-rw-r--r-- | rag/generator/prompt.py | 10 |
1 files changed, 6 insertions, 4 deletions
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" ) |