Skip to content

Commit 06d6be5

Browse files
committed
small fix to COT prompt
1 parent 8394927 commit 06d6be5

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

recipes/finetuning/datasets/raft_dataset.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,12 @@ def raft_tokenize(q_a_pair, tokenizer):
6161
system_prompt = "You are a helpful chatbot who can provide an answer to every questions from the user given a relevant context."
6262
user_prompt = """
6363
Question: {question}\nContext: {context}\n
64-
Answer this question using the information given by multiple documents in the context above. Here are things to pay attention to:
64+
Answer this question using the information given by multiple documents in the context above. Here are the things to pay attention to:
6565
- The context contains many documents, each document starts with <DOCUMENT> and ends </DOCUMENT>.
6666
- First provide step-by-step reasoning on how to answer the question.
6767
- In the reasoning, if you need to copy paste some sentences from the context, include them in ##begin_quote## and ##end_quote##. This would mean that things outside of ##begin_quote## and ##end_quote## are not directly copy paste from the context.
6868
- End your response with final answer in the form <ANSWER>: $answer, the answer should less than 60 words.
69-
You MUST begin your final answer with the tag "<ANSWER>
69+
You MUST begin your final answer with the tag "<ANSWER>:".
7070
""".format(question=question, context=documents)
7171

7272
chat = [

recipes/use_cases/end2end-recipes/raft/raft.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ COT_prompt_template: >
22
<|begin_of_text|><|start_header_id|>system<|end_header_id|> You are a helpful chatbot who can provide an answer to every questions from the user given a relevant context.<|eot_id|>
33
<|start_header_id|>user<|end_header_id|>
44
Question: {question}\nContext: {context}\n
5-
Answer this question using the information given by multiple documents in the context above. Here are things to pay attention to:
5+
Answer this question using the information given by multiple documents in the context above. Here are the things to pay attention to:
66
- The context contains many documents, each document starts with <DOCUMENT> and ends </DOCUMENT>.
77
- First provide step-by-step reasoning on how to answer the question.
88
- In the reasoning, if you need to copy paste some sentences from the context, include them in ##begin_quote## and ##end_quote##. This would mean that things outside of ##begin_quote## and ##end_quote## are not directly copy paste from the context.
99
- End your response with final answer in the form <ANSWER>: $answer, the answer should less than 60 words.
10-
You MUST begin your final answer with the tag "<ANSWER> <|eot_id|><|start_header_id|>assistant<|end_header_id|>
10+
You MUST begin your final answer with the tag "<ANSWER>:". <|eot_id|><|start_header_id|>assistant<|end_header_id|>
1111
1212
question_prompt_template: >
1313
<|begin_of_text|><|start_header_id|>system<|end_header_id|> You are a synthetic question-answer pair generator. Given a chunk of context about

recipes/use_cases/end2end-recipes/raft/raft_eval_config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ RAG_prompt_template: >
2222
<|begin_of_text|><|start_header_id|>system<|end_header_id|> You are a helpful chatbot who can provide an answer to every questions from the user given a relevant context.<|eot_id|>
2323
<|start_header_id|>user<|end_header_id|>
2424
Question: {question}\nContext: {context}\n
25-
Answer this question using the information given by multiple documents in the context above. Here are things to pay attention to:
25+
Answer this question using the information given by multiple documents in the context above. Here are the things to pay attention to:
2626
- The context contains many documents, each document starts with <DOCUMENT> and ends </DOCUMENT>.
2727
- First provide step-by-step reasoning on how to answer the question.
2828
- In the reasoning, if you need to copy paste some sentences from the context, include them in ##begin_quote## and ##end_quote##. This would mean that things outside of ##begin_quote## and ##end_quote## are not directly copy paste from the context.
2929
- End your response with final answer in the form <ANSWER>: $answer, the answer should less than 60 words.
30-
You MUST begin your final answer with the tag "<ANSWER> <|eot_id|><|start_header_id|>assistant<|end_header_id|>
30+
You MUST begin your final answer with the tag "<ANSWER>:". <|eot_id|><|start_header_id|>assistant<|end_header_id|>
3131
eval_file: "./eval_llama.json"
3232

3333
model_name: "raft-8b"

0 commit comments

Comments
 (0)