From 54e40771bc3c9702af8271c5425814016ee3e599 Mon Sep 17 00:00:00 2001 From: Arid Hasan Date: Thu, 5 Sep 2024 23:58:29 -0300 Subject: [PATCH 1/2] update prompt MNQA AR --- assets/ar/QA/MultiNativQA_Llama3_8b_ZeroShot.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/assets/ar/QA/MultiNativQA_Llama3_8b_ZeroShot.py b/assets/ar/QA/MultiNativQA_Llama3_8b_ZeroShot.py index 3c39f28e..e9b2fc8c 100644 --- a/assets/ar/QA/MultiNativQA_Llama3_8b_ZeroShot.py +++ b/assets/ar/QA/MultiNativQA_Llama3_8b_ZeroShot.py @@ -27,17 +27,17 @@ def prompt(input_sample): # Define the question prompt question_prompt = f""" - Please use your expertise to answer the following Arabic question. You should only Answer in Arabic. - Provide your response in the following JSON format: {{"answer": "your answer"}}. - Please provide JSON output only. No additional text. + Please use your expertise to answer the following Arabic question. Answer in Arabic and rate your confidence level from 1 to 10. + Provide your response in the following JSON format: {{"answer": "your answer", "score": your confidence score}}. + Please provide JSON output only. No additional text. Answer should be limited to less or equal to {input_sample['length']} words. - Question: {input_sample} - Answer: + Question: {input_sample['question']} """ # Define the assistant prompt assistant_prompt = """ - I am an Arabic AI assistant specialized in providing detailed and accurate answers across various fields. I aim to deliver clear, concise, and relevant information. How can I assist you today? + I am an Arabic AI assistant specialized in providing detailed and accurate answers across various fields. + I aim to deliver clear, concise, and relevant information. How can I assist you today? """ return [ From 9226e05f2feb3c69b05d935653f7c7828abe10ea Mon Sep 17 00:00:00 2001 From: Arid Hasan Date: Fri, 6 Sep 2024 23:58:18 -0300 Subject: [PATCH 2/2] fix assistant prompt --- assets/ar/QA/MultiNativQA_Llama3_8b_ZeroShot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/ar/QA/MultiNativQA_Llama3_8b_ZeroShot.py b/assets/ar/QA/MultiNativQA_Llama3_8b_ZeroShot.py index e9b2fc8c..291e645f 100644 --- a/assets/ar/QA/MultiNativQA_Llama3_8b_ZeroShot.py +++ b/assets/ar/QA/MultiNativQA_Llama3_8b_ZeroShot.py @@ -36,8 +36,8 @@ def prompt(input_sample): # Define the assistant prompt assistant_prompt = """ - I am an Arabic AI assistant specialized in providing detailed and accurate answers across various fields. - I aim to deliver clear, concise, and relevant information. How can I assist you today? + You are an Arabic AI assistant specialized in providing detailed and accurate answers across various fields. + Your task is to deliver clear, concise, and relevant information. """ return [