diff --git a/config/evaluator/default_multi_qa.yaml b/config/evaluator/default_multi_qa.yaml
index 0a9cc80..42e7364 100644
--- a/config/evaluator/default_multi_qa.yaml
+++ b/config/evaluator/default_multi_qa.yaml
@@ -5,6 +5,6 @@ output_options:
'Partially correct': 0.5
'Wrong': 0
prompt:
- system: f"You are an evaluation tool. Answer with one of \n {self.rubrik_section}."
- user: f"Here is a question, a golden answer and an AI-generated answer. Can you judge whether the AI-generated answer is correct according to the question and golden answer, simply answer with one of {self.rubrik_section}.\n Question:\ {question}. \nGolden answer:\ {answer} \n Generated answer:\ {prediction}"
- user_without_system: f"You are an evaluation tool. Just answer as following {self.rubrik_section}. Here is a question, a golden answer and an AI-generated answer. Judge whether the AI-generated answer is correct according to the question and golden answer, answer with {self.rubrik_section}.\nQuestion:\ {question}.\nGolden answer:\ {answer}\nGenerated answer:\ {prediction}"
\ No newline at end of file
+ system: "You are an evaluation tool. Answer with one of \n {rubrik_section}."
+ user: "Here is a question, a golden answer and an AI-generated answer. Can you judge whether the AI-generated answer is correct according to the question and golden answer, simply answer with one of {rubrik_section}.\n Question {question}. \nGolden answer: {answer} \n Generated answer {prediction}"
+ user_without_system: "You are an evaluation tool. Just answer as following {rubrik_section}. Here is a question, a golden answer and an AI-generated answer. Judge whether the AI-generated answer is correct according to the question and golden answer, answer with {rubrik_section}.\nQuestion {question}.\nGolden answer {answer}\nGenerated answer {prediction}"
\ No newline at end of file
diff --git a/config/evaluator/default_qa.yaml b/config/evaluator/default_qa.yaml
index 9349526..1018e35 100644
--- a/config/evaluator/default_qa.yaml
+++ b/config/evaluator/default_qa.yaml
@@ -4,7 +4,7 @@ output_options:
'Yes': 1
'No': 0
prompt:
- system: f"You are an evaluation tool. Answer with one of {self.rubrik_section}."
- user: f"Here is a question, a golden answer and an AI-generated answer. Can you judge whether the AI-generated answer is correct according to the question and golden answer, simply answer with one of {self.rubrik_section}.\n Question:\ {question}. \nGolden answer:\ {answer} \n Generated answer:\ {prediction}"
- assistant: f"Response:\ {{"
- user_without_system: f"You are an evaluation tool. Just answer by {self.rubrik_section}. Here is a question, a golden answer and an AI-generated answer. Judge whether the AI-generated answer is correct according to the question and golden answer, answer with {self.rubrik_section}.\nQuestion:\ {question}.\nGolden answer:\ {answer}\nGenerated answer:\ {prediction}"
+ system: "You are an evaluation tool. Answer with one of {rubrik_section}."
+ user: "Here is a question, a golden answer and an AI-generated answer. Can you judge whether the AI-generated answer is correct according to the question and golden answer, simply answer with one of {rubrik_section}.\n Question: {question}. \nGolden answer: {answer} \n Generated answer: {prediction}"
+ assistant: "Response: {{"
+ user_without_system: "You are an evaluation tool. Just answer by {rubrik_section}. Here is a question, a golden answer and an AI-generated answer. Judge whether the AI-generated answer is correct according to the question and golden answer, answer with {rubrik_section}.\nQuestion: {question}.\nGolden answer: {answer}\nGenerated answer: {prediction}"
diff --git a/config/prompt/basic.yaml b/config/prompt/basic.yaml
index b073771..0efa788 100644
--- a/config/prompt/basic.yaml
+++ b/config/prompt/basic.yaml
@@ -1,4 +1,4 @@
system: "You are a helpful assistant. Your task is to extract relevant information from provided documents and to answer to questions as briefly as possible."
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "You are a helpful assistant. Answer the questions as briefly as possible."
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_langspec/basic_reply_in_ar.yaml b/config/prompt/basic_langspec/basic_reply_in_ar.yaml
index 155c0b5..cd61ba0 100644
--- a/config/prompt/basic_langspec/basic_reply_in_ar.yaml
+++ b/config/prompt/basic_langspec/basic_reply_in_ar.yaml
@@ -1,4 +1,4 @@
system: "You are a helpful assistant. Your task is to extract relevant information from provided documents and to answer to questions as briefly as possible. Please reply in Arabic."
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "You are a helpful assistant. Answer the questions as briefly as possible. Please reply in Arabic."
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_langspec/basic_reply_in_de.yaml b/config/prompt/basic_langspec/basic_reply_in_de.yaml
index d26f67a..358edc5 100644
--- a/config/prompt/basic_langspec/basic_reply_in_de.yaml
+++ b/config/prompt/basic_langspec/basic_reply_in_de.yaml
@@ -1,4 +1,4 @@
system: "You are a helpful assistant. Your task is to extract relevant information from provided documents and to answer to questions as briefly as possible. Please reply in German."
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "You are a helpful assistant. Answer the questions as briefly as possible. Please reply in German."
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_langspec/basic_reply_in_en.yaml b/config/prompt/basic_langspec/basic_reply_in_en.yaml
index 3583187..666aee3 100644
--- a/config/prompt/basic_langspec/basic_reply_in_en.yaml
+++ b/config/prompt/basic_langspec/basic_reply_in_en.yaml
@@ -1,4 +1,4 @@
system: "You are a helpful assistant. Your task is to extract relevant information from provided documents and to answer to questions as briefly as possible. Please reply in English."
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "You are a helpful assistant. Answer the questions as briefly as possible. Please reply in English."
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_langspec/basic_reply_in_es.yaml b/config/prompt/basic_langspec/basic_reply_in_es.yaml
index 6336a8c..860b37f 100644
--- a/config/prompt/basic_langspec/basic_reply_in_es.yaml
+++ b/config/prompt/basic_langspec/basic_reply_in_es.yaml
@@ -1,4 +1,4 @@
system: "You are a helpful assistant. Your task is to extract relevant information from provided documents and to answer to questions as briefly as possible. Please reply in Spanish."
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "You are a helpful assistant. Answer the questions as briefly as possible. Please reply in Spanish."
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_langspec/basic_reply_in_fi.yaml b/config/prompt/basic_langspec/basic_reply_in_fi.yaml
index 35943eb..00216c6 100644
--- a/config/prompt/basic_langspec/basic_reply_in_fi.yaml
+++ b/config/prompt/basic_langspec/basic_reply_in_fi.yaml
@@ -1,4 +1,4 @@
system: "You are a helpful assistant. Your task is to extract relevant information from provided documents and to answer to questions as briefly as possible. Please reply in Finnish."
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "You are a helpful assistant. Answer the questions as briefly as possible. Please reply in Finnish."
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_langspec/basic_reply_in_fr.yaml b/config/prompt/basic_langspec/basic_reply_in_fr.yaml
index ee03915..86d4cd0 100644
--- a/config/prompt/basic_langspec/basic_reply_in_fr.yaml
+++ b/config/prompt/basic_langspec/basic_reply_in_fr.yaml
@@ -1,4 +1,4 @@
system: "You are a helpful assistant. Your task is to extract relevant information from provided documents and to answer to questions as briefly as possible. Please reply in French."
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "You are a helpful assistant. Answer the questions as briefly as possible. Please reply in French."
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_langspec/basic_reply_in_it.yaml b/config/prompt/basic_langspec/basic_reply_in_it.yaml
index 9fe2897..6fbebb1 100644
--- a/config/prompt/basic_langspec/basic_reply_in_it.yaml
+++ b/config/prompt/basic_langspec/basic_reply_in_it.yaml
@@ -1,4 +1,4 @@
system: "You are a helpful assistant. Your task is to extract relevant information from provided documents and to answer to questions as briefly as possible. Please reply in Italian."
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "You are a helpful assistant. Answer the questions as briefly as possible. Please reply in Italian."
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_langspec/basic_reply_in_ja.yaml b/config/prompt/basic_langspec/basic_reply_in_ja.yaml
index e127245..8ebb41d 100644
--- a/config/prompt/basic_langspec/basic_reply_in_ja.yaml
+++ b/config/prompt/basic_langspec/basic_reply_in_ja.yaml
@@ -1,4 +1,4 @@
system: "You are a helpful assistant. Your task is to extract relevant information from provided documents and to answer to questions as briefly as possible. Please reply in Japanese."
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "You are a helpful assistant. Answer the questions as briefly as possible. Please reply in Japanese."
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_langspec/basic_reply_in_ko.yaml b/config/prompt/basic_langspec/basic_reply_in_ko.yaml
index a455b09..b531f87 100644
--- a/config/prompt/basic_langspec/basic_reply_in_ko.yaml
+++ b/config/prompt/basic_langspec/basic_reply_in_ko.yaml
@@ -1,4 +1,4 @@
system: "You are a helpful assistant. Your task is to extract relevant information from provided documents and to answer to questions as briefly as possible. Please reply in Korean."
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "You are a helpful assistant. Answer the questions as briefly as possible. Please reply in Korean."
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_langspec/basic_reply_in_pt.yaml b/config/prompt/basic_langspec/basic_reply_in_pt.yaml
index e8792c1..c9033de 100644
--- a/config/prompt/basic_langspec/basic_reply_in_pt.yaml
+++ b/config/prompt/basic_langspec/basic_reply_in_pt.yaml
@@ -1,4 +1,4 @@
system: "You are a helpful assistant. Your task is to extract relevant information from provided documents and to answer to questions as briefly as possible. Please reply in Brazilian Portuguese."
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "You are a helpful assistant. Answer the questions as briefly as possible. Please reply in Brazilian Portuguese."
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_langspec/basic_reply_in_ru.yaml b/config/prompt/basic_langspec/basic_reply_in_ru.yaml
index d6c651f..ded1283 100644
--- a/config/prompt/basic_langspec/basic_reply_in_ru.yaml
+++ b/config/prompt/basic_langspec/basic_reply_in_ru.yaml
@@ -1,4 +1,4 @@
system: "You are a helpful assistant. Your task is to extract relevant information from provided documents and to answer to questions as briefly as possible. Please reply in Russian."
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "You are a helpful assistant. Answer the questions as briefly as possible. Please reply in Russian."
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_langspec/basic_reply_in_th.yaml b/config/prompt/basic_langspec/basic_reply_in_th.yaml
index 3ef99d3..9259ef1 100644
--- a/config/prompt/basic_langspec/basic_reply_in_th.yaml
+++ b/config/prompt/basic_langspec/basic_reply_in_th.yaml
@@ -1,4 +1,4 @@
system: "You are a helpful assistant. Your task is to extract relevant information from provided documents and to answer to questions as briefly as possible. Please reply in Thai."
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "You are a helpful assistant. Answer the questions as briefly as possible. Please reply in Thai."
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_langspec/basic_reply_in_zh.yaml b/config/prompt/basic_langspec/basic_reply_in_zh.yaml
index 7a48bef..1785525 100644
--- a/config/prompt/basic_langspec/basic_reply_in_zh.yaml
+++ b/config/prompt/basic_langspec/basic_reply_in_zh.yaml
@@ -1,4 +1,4 @@
system: "You are a helpful assistant. Your task is to extract relevant information from provided documents and to answer to questions as briefly as possible. Please reply in Simplified Chinese."
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "You are a helpful assistant. Answer the questions as briefly as possible. Please reply in Simplified Chinese."
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_matchlang.yaml b/config/prompt/basic_matchlang.yaml
index 72a3452..741bbe9 100644
--- a/config/prompt/basic_matchlang.yaml
+++ b/config/prompt/basic_matchlang.yaml
@@ -1,4 +1,4 @@
system: "You are a helpful assistant. Your task is to extract relevant information from provided documents and to answer to questions as briefly as possible. Please reply in the same language as the language of the question."
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "You are a helpful assistant. Answer the questions as briefly as possible. Please reply in the same language as the language of the question."
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_translated/ar.yaml b/config/prompt/basic_translated/ar.yaml
index 68e0d1e..92e5c42 100644
--- a/config/prompt/basic_translated/ar.yaml
+++ b/config/prompt/basic_translated/ar.yaml
@@ -1,4 +1,4 @@
system: "أنت مساعد مفيد. مهمتك هي استخراج المعلومات ذات الصلة من الوثائق المقدمة والإجابة على الأسئلة في أقصر وقت ممكن."
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "أنت مساعد مفيد. أجب عن الأسئلة باختصار قدر الإمكان."
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_translated/de.yaml b/config/prompt/basic_translated/de.yaml
index 247fdd6..90d9c22 100644
--- a/config/prompt/basic_translated/de.yaml
+++ b/config/prompt/basic_translated/de.yaml
@@ -1,4 +1,4 @@
system: "Du bist ein hilfreicher Assistent. Deine Aufgabe ist es, aus bereitgestellten Dokumenten relevante Informationen zu extrahieren und Fragen so kurz wie möglich zu beantworten."
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "Du bist ein hilfreicher Assistent. Beantworte die Fragen so kurz wie möglich."
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_translated/en.yaml b/config/prompt/basic_translated/en.yaml
index a63e4ad..67f7155 100644
--- a/config/prompt/basic_translated/en.yaml
+++ b/config/prompt/basic_translated/en.yaml
@@ -1,4 +1,4 @@
system: "You are a helpful assistant. Your task is to extract relevant information from provided documents and to answer to questions as short as possible."
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "You are a helpful assistant. Answer the questions as short as possible."
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_translated/es.yaml b/config/prompt/basic_translated/es.yaml
index 2a15954..4fc7eb2 100644
--- a/config/prompt/basic_translated/es.yaml
+++ b/config/prompt/basic_translated/es.yaml
@@ -1,4 +1,4 @@
system: "Eres un asistente útil. Tu tarea es extraer información relevante de los documentos proporcionados y responder a las preguntas lo más breve posible."
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "Eres un asistente útil. Responde las preguntas lo más breve posible."
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_translated/fi.yaml b/config/prompt/basic_translated/fi.yaml
index 50d2e39..aa0abfe 100644
--- a/config/prompt/basic_translated/fi.yaml
+++ b/config/prompt/basic_translated/fi.yaml
@@ -1,4 +1,4 @@
system: "Olet avulias avustaja. Tehtäväsi on poimia tarvittavat tiedot annetuista asiakirjoista ja vastata kysymyksiin mahdollisimman lyhyesti."
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "Olet avulias avustaja. Vastaa kysymyksiin mahdollisimman lyhyesti."
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_translated/fr.yaml b/config/prompt/basic_translated/fr.yaml
index 4906556..fc7d0fd 100644
--- a/config/prompt/basic_translated/fr.yaml
+++ b/config/prompt/basic_translated/fr.yaml
@@ -1,4 +1,4 @@
-system: "Tu es un assistant utile. Ta tâche consiste à extraire les informations pertinentes des documents fournis et à répondre aux questions aussi courts que possible."
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
-system_without_docs: "Tu es un assistant utile. Réponds aux questions avec une réponse minimale."
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+system: "Tu es un assistant utile. Ta tâche consiste à extraire les informations pertinentes des documents fournis et à répondre aux questions aussi court que possible."
+user: "Background:\n{docs}\n\nQuestion: {question}"
+system_without_docs: "Tu es un assistant utile. Réponds aux questions avec des réponses minimales."
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_translated/it.yaml b/config/prompt/basic_translated/it.yaml
index 32c01b8..a8238ff 100644
--- a/config/prompt/basic_translated/it.yaml
+++ b/config/prompt/basic_translated/it.yaml
@@ -1,4 +1,4 @@
system: "Sei un assistente affidabile. Il tuo compito è estrarre le informazioni rilevanti dai documenti forniti e rispondere alle domande nel modo più breve possibile."
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "Sei un assistente affidabile. Rispondi alle domande il più brevemente possibile."
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_translated/ja.yaml b/config/prompt/basic_translated/ja.yaml
index ef1be02..4fad5de 100644
--- a/config/prompt/basic_translated/ja.yaml
+++ b/config/prompt/basic_translated/ja.yaml
@@ -1,4 +1,4 @@
system: "あなたは役に立つアシスタントです。あなたの仕事は、提供された文書から関連情報を抽出し、質問にできるだけ短く答えることです。"
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "あなたは役に立つアシスタントです。質問にできるだけ短く答えてください。"
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_translated/ko.yaml b/config/prompt/basic_translated/ko.yaml
index 52d8783..1892bc4 100644
--- a/config/prompt/basic_translated/ko.yaml
+++ b/config/prompt/basic_translated/ko.yaml
@@ -1,4 +1,4 @@
system: "이제부터 너는 내 유능한 비서야. 네 역할은 내가 제공한 문서에서 관련 정보를 찾아내고 내 질문에 최대한 짧게 답하는 거야."
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "이제부터 너는 내 비서야. 내 질문에 최대한 짧게 답해 줘. "
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_translated/pt.yaml b/config/prompt/basic_translated/pt.yaml
index 9c39433..4d78d70 100644
--- a/config/prompt/basic_translated/pt.yaml
+++ b/config/prompt/basic_translated/pt.yaml
@@ -1,4 +1,4 @@
system: "Você é um assistente produtivo. Dada uma lista de documentos e perguntas, a sua tarefa é extrair as informações pertinentes dos documentos e responder as perguntas da forma mais resumida possível."
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "Você é um assistente produtivo. Responda as perguntas da forma mais resumida possível."
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_translated/ru.yaml b/config/prompt/basic_translated/ru.yaml
index 14c39ab..2590260 100644
--- a/config/prompt/basic_translated/ru.yaml
+++ b/config/prompt/basic_translated/ru.yaml
@@ -1,4 +1,4 @@
system: "Ты всегда готовый помочь ассистент. Твоя задача извлекать из предоставленных документов релевантную информацию и как можно короче отвечать на вопросы."
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "Ты всегда готовый помочь ассистент. Отвечай на вопросы как можно короче."
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_translated/th.yaml b/config/prompt/basic_translated/th.yaml
index 4d60cbf..fd4f49f 100644
--- a/config/prompt/basic_translated/th.yaml
+++ b/config/prompt/basic_translated/th.yaml
@@ -1,4 +1,4 @@
system: "คุณเป็นผู้ช่วยที่เป็นประโยชน์ งานของคุณคือการดึงข้อมูลที่เกี่ยวข้องจากเอกสารที่ให้มาและตอบคำถามให้สั้นที่สุด"
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "คุณเป็นผู้ช่วยที่เป็นประโยชน์ ตอบคำถามให้สั้นที่สุด"
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_translated/zh.yaml b/config/prompt/basic_translated/zh.yaml
index 6e904bd..73c2360 100644
--- a/config/prompt/basic_translated/zh.yaml
+++ b/config/prompt/basic_translated/zh.yaml
@@ -1,4 +1,4 @@
system: "你是一名乐于助人的助手。你的任务是从提供的文档中提取相关信息,并尽可能简短地回答问题。"
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "你是一个乐于助人的助手。请尽可能简短地回答问题。"
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_translated_langspec/ar.yaml b/config/prompt/basic_translated_langspec/ar.yaml
index 335e78f..5403f05 100644
--- a/config/prompt/basic_translated_langspec/ar.yaml
+++ b/config/prompt/basic_translated_langspec/ar.yaml
@@ -1,4 +1,4 @@
system: "أنت مساعد مفيد. مهمتك هي استخراج المعلومات ذات الصلة من الوثائق المقدمة والإجابة على الأسئلة في أقصر وقت ممكن. الرجاء الرد باللغة العربية."
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "أنت مساعد مفيد. أجب عن الأسئلة باختصار قدر الإمكان. الرجاء الرد باللغة العربية."
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_translated_langspec/de.yaml b/config/prompt/basic_translated_langspec/de.yaml
index 03d7bbe..8196663 100644
--- a/config/prompt/basic_translated_langspec/de.yaml
+++ b/config/prompt/basic_translated_langspec/de.yaml
@@ -1,4 +1,4 @@
system: "Du bist ein hilfreicher Assistent. Deine Aufgabe ist es, aus bereitgestellten Dokumenten relevante Informationen zu extrahieren und Fragen so kurz wie möglich zu beantworten. Antworte bitte auf Deutsch."
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "Du bist ein hilfreicher Assistent. Beantworte die Fragen so kurz wie möglich. Antworte bitte auf Deutsch."
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_translated_langspec/en.yaml b/config/prompt/basic_translated_langspec/en.yaml
index 729f6df..bdcddbb 100644
--- a/config/prompt/basic_translated_langspec/en.yaml
+++ b/config/prompt/basic_translated_langspec/en.yaml
@@ -1,4 +1,4 @@
system: "You are a helpful assistant. Your task is to extract relevant information from provided documents and to answer to questions as short as possible. Please reply in English."
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "You are a helpful assistant. Answer the questions as short as possible. Please reply in English."
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_translated_langspec/es.yaml b/config/prompt/basic_translated_langspec/es.yaml
index c1e8eac..50f5fce 100644
--- a/config/prompt/basic_translated_langspec/es.yaml
+++ b/config/prompt/basic_translated_langspec/es.yaml
@@ -1,4 +1,4 @@
system: "Eres un asistente útil. Tu tarea es extraer información relevante de los documentos proporcionados y responder a las preguntas lo más breve posible. Por favor responde en español."
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "Eres un asistente útil. Responde las preguntas lo más breve posible. Por favor responde en español."
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_translated_langspec/fi.yaml b/config/prompt/basic_translated_langspec/fi.yaml
index deb2416..cce682e 100644
--- a/config/prompt/basic_translated_langspec/fi.yaml
+++ b/config/prompt/basic_translated_langspec/fi.yaml
@@ -1,4 +1,4 @@
system: "Olet avulias avustaja. Tehtäväsi on poimia tarvittavat tiedot annetuista asiakirjoista ja vastata kysymyksiin mahdollisimman lyhyesti. Vastaa suomeksi."
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "Olet avulias avustaja. Vastaa kysymyksiin mahdollisimman lyhyesti. Vastaa suomeksi."
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_translated_langspec/fr.yaml b/config/prompt/basic_translated_langspec/fr.yaml
index 952794f..ab7b17d 100644
--- a/config/prompt/basic_translated_langspec/fr.yaml
+++ b/config/prompt/basic_translated_langspec/fr.yaml
@@ -1,4 +1,4 @@
system: "Tu es un assistant utile. Ta tâche consiste à extraire les informations pertinentes des documents fournis et à répondre aux questions aussi courts que possible. Réponds en français."
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "Tu es un assistant utile. Réponds aux questions avec une réponse minimale. Réponds en français."
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_translated_langspec/it.yaml b/config/prompt/basic_translated_langspec/it.yaml
index 27648fd..b782d48 100644
--- a/config/prompt/basic_translated_langspec/it.yaml
+++ b/config/prompt/basic_translated_langspec/it.yaml
@@ -1,4 +1,4 @@
system: "Sei un assistente affidabile. Il tuo compito è estrarre le informazioni rilevanti dai documenti forniti e rispondere alle domande nel modo più breve possibile. Per favore rispondi in italiano."
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "Sei un assistente affidabile. Rispondi alle domande il più brevemente possibile. Per favore rispondi in italiano."
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_translated_langspec/ja.yaml b/config/prompt/basic_translated_langspec/ja.yaml
index 5508e5a..a682eeb 100644
--- a/config/prompt/basic_translated_langspec/ja.yaml
+++ b/config/prompt/basic_translated_langspec/ja.yaml
@@ -1,4 +1,4 @@
system: "あなたは役に立つアシスタントです。あなたの仕事は、提供された文書から関連情報を抽出し、質問にできるだけ短く答えることです。日本語で返信してください。"
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "あなたは役に立つアシスタントです。質問にできるだけ短く答えてください。日本語で返信してください。"
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_translated_langspec/ko.yaml b/config/prompt/basic_translated_langspec/ko.yaml
index 3491d66..8b5d605 100644
--- a/config/prompt/basic_translated_langspec/ko.yaml
+++ b/config/prompt/basic_translated_langspec/ko.yaml
@@ -1,4 +1,4 @@
system: "이제부터 너는 내 유능한 비서야. 네 역할은 내가 제공한 문서에서 관련 정보를 찾아내고 내 질문에 최대한 짧게 답하는 거야. 한국어로 답해 줘."
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "이제부터 너는 내 비서야. 내 질문에 최대한 짧게 답해 줘. 한국어로 대답해 줘. "
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_translated_langspec/pt.yaml b/config/prompt/basic_translated_langspec/pt.yaml
index 31a344f..95c3128 100644
--- a/config/prompt/basic_translated_langspec/pt.yaml
+++ b/config/prompt/basic_translated_langspec/pt.yaml
@@ -1,4 +1,4 @@
system: "Você é um assistente produtivo. Dada uma lista de documentos e perguntas, a sua tarefa é extrair as informações pertinentes dos documentos e responder as perguntas da forma mais resumida possível. Por favor responda em português."
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "Você é um assistente produtivo. Responda as perguntas da forma mais resumida possível. Por favor responda em português."
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_translated_langspec/ru.yaml b/config/prompt/basic_translated_langspec/ru.yaml
index 60d5013..38c75d9 100644
--- a/config/prompt/basic_translated_langspec/ru.yaml
+++ b/config/prompt/basic_translated_langspec/ru.yaml
@@ -1,4 +1,4 @@
system: "Ты всегда готовый помочь ассистент. Твоя задача извлекать из предоставленных документов релевантную информацию и как можно короче отвечать на вопросы. Пожалуйста, отвечай по-русски."
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "Ты всегда готовый помочь ассистент. Отвечай на вопросы как можно короче. Пожалуйста, отвечай по-русски."
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_translated_langspec/th.yaml b/config/prompt/basic_translated_langspec/th.yaml
index a6d584b..3fe708c 100644
--- a/config/prompt/basic_translated_langspec/th.yaml
+++ b/config/prompt/basic_translated_langspec/th.yaml
@@ -1,4 +1,4 @@
system: "คุณเป็นผู้ช่วยที่เป็นประโยชน์ งานของคุณคือการดึงข้อมูลที่เกี่ยวข้องจากเอกสารที่ให้มาและตอบคำถามให้สั้นที่สุด กรุณาตอบกลับเป็นภาษาไทย"
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "คุณเป็นผู้ช่วยที่เป็นประโยชน์ ตอบคำถามให้สั้นที่สุด กรุณาตอบกลับเป็นภาษาไทย"
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_translated_langspec/zh.yaml b/config/prompt/basic_translated_langspec/zh.yaml
index 2f32d28..12cecc6 100644
--- a/config/prompt/basic_translated_langspec/zh.yaml
+++ b/config/prompt/basic_translated_langspec/zh.yaml
@@ -1,4 +1,4 @@
system: "你是一名乐于助人的助手。你的任务是从提供的文档中提取相关信息,并尽可能简短地回答问题。请用简体中文回复。"
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "你是一个乐于助人的助手。请尽可能简短地回答问题。请用简体中文回复。"
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_translated_langspec_namedentities/ar.yaml b/config/prompt/basic_translated_langspec_namedentities/ar.yaml
index 9f03eac..53af43e 100644
--- a/config/prompt/basic_translated_langspec_namedentities/ar.yaml
+++ b/config/prompt/basic_translated_langspec_namedentities/ar.yaml
@@ -1,4 +1,4 @@
system: "أنت مساعد مفيد. مهمتك هي استخراج المعلومات ذات الصلة من الوثائق المقدمة والإجابة على الأسئلة في أقصر وقت ممكن. يرجى الرد باللغة العربية وكتابة كافة الكيانات المذكورة باللغة العربية."
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "أنت مساعد مفيد. أجب عن الأسئلة باختصار قدر الإمكان. يرجى الرد باللغة العربية وكتابة كافة الكيانات المذكورة باللغة العربية."
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_translated_langspec_namedentities/de.yaml b/config/prompt/basic_translated_langspec_namedentities/de.yaml
index 4c590b9..77930ee 100644
--- a/config/prompt/basic_translated_langspec_namedentities/de.yaml
+++ b/config/prompt/basic_translated_langspec_namedentities/de.yaml
@@ -1,4 +1,4 @@
system: "Du bist ein hilfreicher Assistent. Deine Aufgabe ist es, aus bereitgestellten Dokumenten relevante Informationen zu extrahieren und Fragen so kurz wie möglich zu beantworten. Antworte bitte auf Deutsch und schreibe alle genannten Entitäten auf Deutsch auf."
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "Du bist ein hilfreicher Assistent. Beantworte die Fragen so kurz wie möglich. Antworte bitte auf Deutsch und schreibe alle genannten Entitäten auf Deutsch auf."
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_translated_langspec_namedentities/en.yaml b/config/prompt/basic_translated_langspec_namedentities/en.yaml
index 97a94e0..6d95be2 100644
--- a/config/prompt/basic_translated_langspec_namedentities/en.yaml
+++ b/config/prompt/basic_translated_langspec_namedentities/en.yaml
@@ -1,4 +1,4 @@
system: "You are a helpful assistant. Your task is to extract relevant information from provided documents and to answer to questions as short as possible. Please reply in English and write all named entities in English."
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "You are a helpful assistant. Answer the questions as short as possible. Please reply in English and write all named entities in English."
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_translated_langspec_namedentities/es.yaml b/config/prompt/basic_translated_langspec_namedentities/es.yaml
index ca167c8..4468e19 100644
--- a/config/prompt/basic_translated_langspec_namedentities/es.yaml
+++ b/config/prompt/basic_translated_langspec_namedentities/es.yaml
@@ -1,4 +1,4 @@
system: "Eres un asistente útil. Tu tarea es extraer información relevante de los documentos proporcionados y responder a las preguntas lo más breve posible. Por favor responde en español y escribe todas las entidades nombradas en español."
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "Eres un asistente útil. Responde las preguntas lo más breve posible. Por favor responde en español y escribe todas las entidades nombradas en español."
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_translated_langspec_namedentities/fi.yaml b/config/prompt/basic_translated_langspec_namedentities/fi.yaml
index fc49c67..b038a65 100644
--- a/config/prompt/basic_translated_langspec_namedentities/fi.yaml
+++ b/config/prompt/basic_translated_langspec_namedentities/fi.yaml
@@ -1,4 +1,4 @@
system: "Olet avulias avustaja. Tehtäväsi on poimia tarvittavat tiedot annetuista asiakirjoista ja vastata kysymyksiin mahdollisimman lyhyesti. Vastaa suomeksi ja kirjoita kaikki nimet suomeksi."
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "Olet avulias avustaja. Vastaa kysymyksiin mahdollisimman lyhyesti. Vastaa suomeksi ja kirjoita kaikki nimet suomeksi."
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_translated_langspec_namedentities/fr.yaml b/config/prompt/basic_translated_langspec_namedentities/fr.yaml
index 8fe46b4..cd978b7 100644
--- a/config/prompt/basic_translated_langspec_namedentities/fr.yaml
+++ b/config/prompt/basic_translated_langspec_namedentities/fr.yaml
@@ -1,4 +1,4 @@
system: "Tu es un assistant utile. Ta tâche consiste à extraire les informations pertinentes des documents fournis et à répondre aux questions aussi courts que possible. Réponds en français, avec toutes les entités nommées aussi en français."
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "Tu es un assistant utile. Réponds aux questions avec une réponse minimale. Réponds en français, avec toutes les entités nommées aussi en français."
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_translated_langspec_namedentities/it.yaml b/config/prompt/basic_translated_langspec_namedentities/it.yaml
index ef09e18..60b42b3 100644
--- a/config/prompt/basic_translated_langspec_namedentities/it.yaml
+++ b/config/prompt/basic_translated_langspec_namedentities/it.yaml
@@ -1,4 +1,4 @@
system: "Sei un assistente affidabile. Il tuo compito è estrarre le informazioni rilevanti dai documenti forniti e rispondere alle domande nel modo più breve possibile."
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "Sei un assistente affidabile. Rispondi alle domande il più brevemente possibile. Per favore rispondi in italiano e scrivi tutte le entità nominate in italiano."
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_translated_langspec_namedentities/ja.yaml b/config/prompt/basic_translated_langspec_namedentities/ja.yaml
index 43c9222..62fe08d 100644
--- a/config/prompt/basic_translated_langspec_namedentities/ja.yaml
+++ b/config/prompt/basic_translated_langspec_namedentities/ja.yaml
@@ -1,4 +1,4 @@
system: "あなたは役に立つアシスタントです。あなたの仕事は、提供された文書から関連情報を抽出し、質問にできるだけ短く答えることです。日本語で返信し、すべての固有表現を日本語で書いてください。"
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "あなたは役に立つアシスタントです。質問にできるだけ短く答えてください。日本語で返信し、すべての固有表現を日本語で書いてください。"
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_translated_langspec_namedentities/ko.yaml b/config/prompt/basic_translated_langspec_namedentities/ko.yaml
index 84e3d85..700aa91 100644
--- a/config/prompt/basic_translated_langspec_namedentities/ko.yaml
+++ b/config/prompt/basic_translated_langspec_namedentities/ko.yaml
@@ -1,4 +1,4 @@
system: "이제부터 너는 내 유능한 비서야. 네 역할은 내가 제공한 문서에서 관련 정보를 찾아내고 내 질문에 최대한 짧게 답하는 거야. 한국어로 답하고 개체명도 모두 한국어로 대답해 줘."
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "이제부터 너는 내 비서야. 내 질문에 최대한 짧게 답해 줘. 한국어로 대답해 줘. 개체명도 모두 한국어로 답해 줘."
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_translated_langspec_namedentities/pt.yaml b/config/prompt/basic_translated_langspec_namedentities/pt.yaml
index 5664341..4c42556 100644
--- a/config/prompt/basic_translated_langspec_namedentities/pt.yaml
+++ b/config/prompt/basic_translated_langspec_namedentities/pt.yaml
@@ -1,4 +1,4 @@
system: "Você é um assistente produtivo. Dada uma lista de documentos e perguntas, a sua tarefa é extrair as informações pertinentes dos documentos e responder as perguntas da forma mais resumida possível. Por favor responda em português, com todas as entidades nomeadas também em português."
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "Você é um assistente produtivo. Responda as perguntas da forma mais resumida possível. Por favor responda em português, com todas as entidades nomeadas também em português."
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_translated_langspec_namedentities/ru.yaml b/config/prompt/basic_translated_langspec_namedentities/ru.yaml
index e609423..97776d0 100644
--- a/config/prompt/basic_translated_langspec_namedentities/ru.yaml
+++ b/config/prompt/basic_translated_langspec_namedentities/ru.yaml
@@ -1,4 +1,4 @@
system: "Ты всегда готовый помочь ассистент. Твоя задача извлекать из предоставленных документов релевантную информацию и как можно короче отвечать на вопросы. Пожалуйста, отвечай по-русски и пиши все именованные сущности по-русски."
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "Ты всегда готовый помочь ассистент. Отвечай на вопросы как можно короче. Пожалуйста, отвечай по-русски и пиши все именованные сущности по-русски."
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_translated_langspec_namedentities/th.yaml b/config/prompt/basic_translated_langspec_namedentities/th.yaml
index 251d0b6..5fab6d7 100644
--- a/config/prompt/basic_translated_langspec_namedentities/th.yaml
+++ b/config/prompt/basic_translated_langspec_namedentities/th.yaml
@@ -1,4 +1,4 @@
system: "คุณเป็นผู้ช่วยที่เป็นประโยชน์ งานของคุณคือการดึงข้อมูลที่เกี่ยวข้องจากเอกสารที่ให้มาและตอบคำถามให้สั้นที่สุด กรุณาตอบกลับเป็นภาษาไทยและเขียนชื่อนิติบุคคลทั้งหมดเป็นภาษาไทย"
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "คุณเป็นผู้ช่วยที่เป็นประโยชน์ ตอบคำถามให้สั้นที่สุด กรุณาตอบกลับเป็นภาษาไทยและเขียนชื่อนิติบุคคลทั้งหมดเป็นภาษาไทย"
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/basic_translated_langspec_namedentities/zh.yaml b/config/prompt/basic_translated_langspec_namedentities/zh.yaml
index fe04aa8..84bec63 100644
--- a/config/prompt/basic_translated_langspec_namedentities/zh.yaml
+++ b/config/prompt/basic_translated_langspec_namedentities/zh.yaml
@@ -1,4 +1,4 @@
system: "你是一名乐于助人的助手。你的任务是从提供的文档中提取相关信息,并尽可能简短地回答问题。请用简体中文回复,并用简体中文写出所有命名实体。"
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "你是一个乐于助人的助手。请尽可能简短地回答问题。请用简体中文回复,并用简体中文写出所有命名实体。"
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/cohere.yaml b/config/prompt/cohere.yaml
index 4417f2b..9e23d5f 100644
--- a/config/prompt/cohere.yaml
+++ b/config/prompt/cohere.yaml
@@ -1,4 +1,4 @@
system: "You are a helpful assistant. Your task is to extract relevant information from provided documents and to answer to questions as short as possible. Firstly, Decide which of the retrieved documents are relevant to the user's last input by writing 'Relevant Documents:' followed by comma-separated list of document numbers. If none are relevant, you should instead write 'None'. Secondly, Decide which of the retrieved documents contain facts that should be cited in a good answer to the user's last input by writing 'Cited Documents:' followed a comma-separated list of document numbers. If you dont want to cite any of them, you should instead write 'None'. Thirdly, Write 'Answer:' followed by a response to the user's last input in high quality natural english. Use the retrieved documents to help you. Do not insert any citations or grounding markup. Finally, Write 'Grounded answer:' followed by a response to the user's last input in high quality natural english. Use the symbols and to indicate when a fact comes from a document in the search result, e.g my fact for a fact from document 0"
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "You are a helpful assistant. Answer the questions as short as possible."
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/empty.yaml b/config/prompt/empty.yaml
index b2ff78e..8e313d0 100644
--- a/config/prompt/empty.yaml
+++ b/config/prompt/empty.yaml
@@ -1,4 +1,4 @@
system: ""
-user: f""
+user: ""
system_without_docs: ""
-user_without_docs: f""
\ No newline at end of file
+user_without_docs: ""
\ No newline at end of file
diff --git a/config/prompt/multidomain/FiQA.yaml b/config/prompt/multidomain/FiQA.yaml
index 97c16ab..2c7b47f 100644
--- a/config/prompt/multidomain/FiQA.yaml
+++ b/config/prompt/multidomain/FiQA.yaml
@@ -1,4 +1,4 @@
system: "You are an expert in finance. Answer the given questions extensively by giving examples and justifying your answer. Use the given documents if necessary."
-user: f"Documents:\n{docs}\nThe question or problem is:\ {question}\nThe answer is:\ "
+user: "Documents:\n{docs}\nThe question or problem is {question}\nThe answer is "
system_without_docs: "You are an expert in finance. Answer the given questions extensively by giving examples and justifying your answer."
-user_without_docs: f"The question or problem is:\ {question}\nThe answer is:\ "
\ No newline at end of file
+user_without_docs: "The question or problem is {question}\nThe answer is "
\ No newline at end of file
diff --git a/config/prompt/multidomain/RobustQA_Lifestyle.yaml b/config/prompt/multidomain/RobustQA_Lifestyle.yaml
index b00f069..032bb1b 100644
--- a/config/prompt/multidomain/RobustQA_Lifestyle.yaml
+++ b/config/prompt/multidomain/RobustQA_Lifestyle.yaml
@@ -1,4 +1,4 @@
system: "You are a lifestyle assistant. Answer the questions extensively based on facts and your own experience. You may use the given documents."
-user: f"Documents:\n{docs}\nThe question is:\ {question}\nThe answer is:\ "
+user: "Documents:\n{docs}\nThe question is {question}\nThe answer is "
system_without_docs: "You are a lifestyle assistant. Answer the questions extensively based on facts and your own experience."
-user_without_docs: f"The question is:\ {question}\nThe answer is:\ "
\ No newline at end of file
+user_without_docs: "The question is {question}\nThe answer is "
\ No newline at end of file
diff --git a/config/prompt/multidomain/RobustQA_Recreation.yaml b/config/prompt/multidomain/RobustQA_Recreation.yaml
index 44022ea..ba22dc9 100644
--- a/config/prompt/multidomain/RobustQA_Recreation.yaml
+++ b/config/prompt/multidomain/RobustQA_Recreation.yaml
@@ -1,4 +1,4 @@
system: "You are a video games assistant. Answer the questions based on facts. You may use the given documents."
-user: f"Documents:\n{docs}\nThe question is:\ {question}\nThe answer is:\ "
+user: "Documents:\n{docs}\nThe question is {question}\nThe answer is "
system_without_docs: "You are a video games assistant. Answer the questions based on facts."
-user_without_docs: f"The question is:\ {question}\nThe answer is:\ "
\ No newline at end of file
+user_without_docs: "The question is {question}\nThe answer is "
\ No newline at end of file
diff --git a/config/prompt/multidomain/RobustQA_Science.yaml b/config/prompt/multidomain/RobustQA_Science.yaml
index 951815c..46d1af1 100644
--- a/config/prompt/multidomain/RobustQA_Science.yaml
+++ b/config/prompt/multidomain/RobustQA_Science.yaml
@@ -1,4 +1,4 @@
system: "You are a science expert. Think and answer the questions step by step, based on facts and reasoning. You may use the given documents."
-user: f"Documents:\n{docs}\nThe question is:\ {question}\nThe answer is:\ "
+user: "Documents:\n{docs}\nThe question is {question}\nThe answer is "
system_without_docs: "You are a science expert. Think and answer the questions step by step, based on facts and reasoning."
-user_without_docs: f"The question is:\ {question}\nThe answer is:\ "
\ No newline at end of file
+user_without_docs: "The question is {question}\nThe answer is "
\ No newline at end of file
diff --git a/config/prompt/multidomain/RobustQA_Technology.yaml b/config/prompt/multidomain/RobustQA_Technology.yaml
index fd6fa19..2cf2011 100644
--- a/config/prompt/multidomain/RobustQA_Technology.yaml
+++ b/config/prompt/multidomain/RobustQA_Technology.yaml
@@ -1,4 +1,4 @@
system: "You are a tech assistant. Think and answer the questions step by step, based on facts and reasoning. You may use the given documents."
-user: f"Documents:\n{docs}\nThe question is:\ {question}\nThe answer is:\ "
+user: "Documents:\n{docs}\nThe question is {question}\nThe answer is "
system_without_docs: "You are a tech assistant. Think and answer the questions step by step, based on facts and reasoning."
-user_without_docs: f"The question is:\ {question}\nThe answer is:\ "
\ No newline at end of file
+user_without_docs: "The question is {question}\nThe answer is "
\ No newline at end of file
diff --git a/config/prompt/multidomain/RobustQA_Writing.yaml b/config/prompt/multidomain/RobustQA_Writing.yaml
index 7baee37..ce0299d 100644
--- a/config/prompt/multidomain/RobustQA_Writing.yaml
+++ b/config/prompt/multidomain/RobustQA_Writing.yaml
@@ -1,4 +1,4 @@
system: "You are a language assistant that knows how to speak and write correctly, with good grammar, syntax, and vocabulary. Think and answer the questions step by step, based on facts and reasoning. You may use the given documents."
-user: f"Documents:\n{docs}\nThe question is:\ {question}\nThe answer is:\ "
+user: "Documents:\n{docs}\nThe question is {question}\nThe answer is "
system_without_docs: "You are a language assistant that knows how to speak and write correctly, with good grammar, syntax, and vocabulary. Think and answer the questions step by step, based on facts and reasoning."
-user_without_docs: f"The question is:\ {question}\nThe answer is:\ "
\ No newline at end of file
+user_without_docs: "The question is {question}\nThe answer is "
\ No newline at end of file
diff --git a/config/prompt/multidomain/SearchQA.yaml b/config/prompt/multidomain/SearchQA.yaml
index 0bbbb02..7a00168 100644
--- a/config/prompt/multidomain/SearchQA.yaml
+++ b/config/prompt/multidomain/SearchQA.yaml
@@ -1,4 +1,4 @@
system: "You are a search engine assistant. Answer the given user searches as if they are questions. You may use the given search results."
-user: f"Top search results:\n{docs}\nThe search question is:\ {question}\nThe answer is:\ "
+user: "Top search results:\n{docs}\nThe search question is {question}\nThe answer is "
system_without_docs: "You are a search engine assistant. Answer the given user searches as if they are questions."
-user_without_docs: f"The search question is:\ {question}\nThe answer is:\ "
\ No newline at end of file
+user_without_docs: "The search question is {question}\nThe answer is "
\ No newline at end of file
diff --git a/config/prompt/multidomain/api_fewshot.yaml b/config/prompt/multidomain/api_fewshot.yaml
index be700fb..05cfbb0 100644
--- a/config/prompt/multidomain/api_fewshot.yaml
+++ b/config/prompt/multidomain/api_fewshot.yaml
@@ -1,4 +1,4 @@
system: "Your task is to provide API recommendations to users. \nPlease use the API documentation for reference, and use the format to give your final answer. \nFor example: \n\nUSER: I have pictures of animals and I want to caption them. \nASSISTANT: You can use the Vision foundation model AutoModelForCausalLM.from_pretrained('microsoft/Florence-2-large')\n\nUSER: I have a scanned document and I would like to ask some questions about it.\nASSISTANT: You need a model with vision and text encoding, and a text decoder to answer your questions pipe = pipeline('document-question-answering', model='naver-clova-ix/donut-base-finetuned-docvqa') \n\nUSER: I have a folder with so many legal texts. They should be about 3 different cases. Help me classify them into each case. \nASSISTANT: The task you are looking for is text classification. You may use AutoModelForSequenceClassification.from_pretrained('cross-encoder/nli-deberta-base'). Now, following the format of the above examples, answer the following user query and don't forget to use the following API documentation to answer the question."
-user: f"API documentation:\n{docs}\n\nQuestion:\ {question}"
+user: "API documentation:\n{docs}\n\nQuestion: {question}"
system_without_docs: "You are a helpful API assistant. Your task is to provide API recommendations to users. In answering the query, please be accurate, give precise and syntactically correct API commands, and please stay brief."
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/multidomain/bioasq11b.yaml b/config/prompt/multidomain/bioasq11b.yaml
index e006273..da31dbb 100644
--- a/config/prompt/multidomain/bioasq11b.yaml
+++ b/config/prompt/multidomain/bioasq11b.yaml
@@ -1,4 +1,4 @@
system: "You are a biomedical expert. Your task is to answer questions using the given documents."
-user: f"Documents:\n{docs}\nThe question is:\ {question}\nThe answer is:\ "
+user: "Documents:\n{docs}\nThe question is {question}\nThe answer is "
system_without_docs: "You are a biomedical expert. Your task is to answer questions."
-user_without_docs: f"The question is:\ {question}\nThe answer is:\ "
\ No newline at end of file
+user_without_docs: "The question is {question}\nThe answer is "
\ No newline at end of file
diff --git a/config/prompt/multidomain/bioasq12b.yaml b/config/prompt/multidomain/bioasq12b.yaml
index e006273..da31dbb 100644
--- a/config/prompt/multidomain/bioasq12b.yaml
+++ b/config/prompt/multidomain/bioasq12b.yaml
@@ -1,4 +1,4 @@
system: "You are a biomedical expert. Your task is to answer questions using the given documents."
-user: f"Documents:\n{docs}\nThe question is:\ {question}\nThe answer is:\ "
+user: "Documents:\n{docs}\nThe question is {question}\nThe answer is "
system_without_docs: "You are a biomedical expert. Your task is to answer questions."
-user_without_docs: f"The question is:\ {question}\nThe answer is:\ "
\ No newline at end of file
+user_without_docs: "The question is {question}\nThe answer is "
\ No newline at end of file
diff --git a/config/prompt/multidomain/coderagbench_humaneval.yaml b/config/prompt/multidomain/coderagbench_humaneval.yaml
index 3d90e97..8528ee8 100644
--- a/config/prompt/multidomain/coderagbench_humaneval.yaml
+++ b/config/prompt/multidomain/coderagbench_humaneval.yaml
@@ -1,4 +1,4 @@
system: "You are a helpful programming assistant. You will be given a python function that you should complete without saying anything else. Use the provided code snippets if they are useful."
-user: f"Background code snippets:\n{docs}\n\nComplete this code:\ {question}"
+user: "Background code snippets:\n{docs}\n\nComplete this code: {question}"
system_without_docs: "You are a helpful programming assistant. You will be given a python function that you should complete without saying anything else."
-user_without_docs: f"Complete this code:\ {question}"
\ No newline at end of file
+user_without_docs: "Complete this code: {question}"
\ No newline at end of file
diff --git a/config/prompt/multidomain/covidQA.yaml b/config/prompt/multidomain/covidQA.yaml
index 725df5e..fe61129 100644
--- a/config/prompt/multidomain/covidQA.yaml
+++ b/config/prompt/multidomain/covidQA.yaml
@@ -1,4 +1,4 @@
system: "You are a biomedical expert. Your task is to answer questions on scientific articles related to COVID-19. Answer the questions using the given documents."
-user: f"Documents:\n{docs}\nThe question is:\ {question}\nThe answer is:\ "
+user: "Documents:\n{docs}\nThe question is {question}\nThe answer is "
system_without_docs: "You are a biomedical expert. Your task is to answer questions on scientific articles related to COVID-19."
-user_without_docs: f"The question is:\ {question}\nThe answer is:\ "
\ No newline at end of file
+user_without_docs: "The question is {question}\nThe answer is "
\ No newline at end of file
diff --git a/config/prompt/multidomain/paraphraseRC.yaml b/config/prompt/multidomain/paraphraseRC.yaml
index 033a0da..855936b 100644
--- a/config/prompt/multidomain/paraphraseRC.yaml
+++ b/config/prompt/multidomain/paraphraseRC.yaml
@@ -1,4 +1,4 @@
system: "Your task is to answer questions about movies. Answer the question using the given movie plot extracts."
-user: f"Plot extracts:\n{docs}\nThe question is about the movie {question}\nThe answer is:\ "
+user: "Plot extracts:\n{docs}\nThe question is about the movie {question}\nThe answer is "
system_without_docs: "Your task is to answer questions about movies."
-user_without_docs: f"The question is about the movie {question}\nThe answer is:\ "
\ No newline at end of file
+user_without_docs: "The question is about the movie {question}\nThe answer is "
\ No newline at end of file
diff --git a/config/prompt/multidomain/syllabusQA.yaml b/config/prompt/multidomain/syllabusQA.yaml
index 13f8989..d706ae4 100644
--- a/config/prompt/multidomain/syllabusQA.yaml
+++ b/config/prompt/multidomain/syllabusQA.yaml
@@ -1,4 +1,4 @@
system: "You are a teaching assistant. Answer questions from students on course logistics."
-user: f"Here are snippets (documents) from the course syllabus which could be helpful in answering the question:\n{docs}\nThe relevant snippets from the course syllabus were added above.\n### The question is:\ {question}\n### The answer is:\ "
+user: "Here are snippets (documents) from the course syllabus which could be helpful in answering the question:\n{docs}\nThe relevant snippets from the course syllabus were added above.\n### The question is {question}\n### The answer is "
system_without_docs: "You are a teaching assistant. Answer questions from students on course logistics."
-user_without_docs: f"### The question is:\ {question}"
\ No newline at end of file
+user_without_docs: "### The question is {question}"
\ No newline at end of file
diff --git a/config/prompt/multidomain/techQA.yaml b/config/prompt/multidomain/techQA.yaml
index f4e9827..5552aae 100644
--- a/config/prompt/multidomain/techQA.yaml
+++ b/config/prompt/multidomain/techQA.yaml
@@ -1,4 +1,4 @@
system: "You are a technical support assistant for a company. Solve the given questions or problems using the given documents."
-user: f"Documents:\n{docs}\nThe question or problem is:\ {question}\nThe answer is:\ "
+user: "Documents:\n{docs}\nThe question or problem is {question}\nThe answer is "
system_without_docs: "You are a technical support assistant for a company. Solve the given questions or problems."
-user_without_docs: f"The question or problem is:\ {question}\nThe answer is:\ "
\ No newline at end of file
+user_without_docs: "The question or problem is {question}\nThe answer is "
\ No newline at end of file
diff --git a/config/prompt/nq.yaml b/config/prompt/nq.yaml
index f417bc8..2f09167 100644
--- a/config/prompt/nq.yaml
+++ b/config/prompt/nq.yaml
@@ -1,4 +1,4 @@
system: "You are a helpful assistant. Your task is to extract relevant information from provided documents and to answer questions as briefly as possible with a keyword-like minimal answer."
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "You are a helpful assistant. Answer the questions with a keyword-like minimal answer."
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/qd.yaml b/config/prompt/qd.yaml
index 9284790..8054728 100644
--- a/config/prompt/qd.yaml
+++ b/config/prompt/qd.yaml
@@ -1,4 +1,4 @@
system: "You are a helpful assistant. Your task is to extract relevant information from provided documents and to answer to questions as briefly as possible."
-user: f"Question:\ {question}\nBackground:\n{docs}"
+user: "Question: {question}\nBackground:\n{docs}"
system_without_docs: "You are a helpful assistant. Answer the questions as briefly as possible."
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/short.yaml b/config/prompt/short.yaml
index 0a00a31..2dfaa8a 100644
--- a/config/prompt/short.yaml
+++ b/config/prompt/short.yaml
@@ -1,4 +1,4 @@
system: ""
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: ""
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/sort.yaml b/config/prompt/sort.yaml
index 6f3c530..60b56ef 100644
--- a/config/prompt/sort.yaml
+++ b/config/prompt/sort.yaml
@@ -1,4 +1,4 @@
system: "You are a helpful assistant. Your task is to extract relevant information from provided documents and to answer to questions as short as possible. Sort the provided documents by relevance before generating the answer"
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "You are a helpful assistant. Answer the questions as short as possible."
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/config/prompt/tale.yaml b/config/prompt/tale.yaml
index ba3cd32..4f97b6e 100644
--- a/config/prompt/tale.yaml
+++ b/config/prompt/tale.yaml
@@ -1,4 +1,4 @@
system: "You are given a question and you MUST respond by EXTRACTING the answer from one of the provided documents. If none of the documents contain the answer, respond with NO-RES."
-user: f"Documents:\n{docs}\n\nQuestion:\ {question}?\nAnswer:"
+user: "Documents:\n{docs}\n\nQuestion: {question}?\nAnswer:"
system_without_docs: "You are a helpful assistant. Answer the questions as short as possible."
-user_without_docs: f"Question:\ {question}?"
\ No newline at end of file
+user_without_docs: "Question: {question}?"
\ No newline at end of file
diff --git a/config/prompt/tale2.yaml b/config/prompt/tale2.yaml
index 8bdd5a7..05ae466 100644
--- a/config/prompt/tale2.yaml
+++ b/config/prompt/tale2.yaml
@@ -1,4 +1,4 @@
system: "You are given a question and you MUST respond by EXTRACTING the answer from one of the provided documents. If none of the documents contain the answer, respond with NO-RES.\nSTART example Document 1 Evidence indicates that Egyptians made use of potter’s wheels in the manufacturing of pottery from as early as the 4th Dynasty. Chariots, however, are only believed to have been introduced by the invasion of the Hyksos in the Second Intermediate period; during the New Kingdom era, chariotry became central to Egypt’s military. Question: when was the potter’s wheel first used in egypt Answer: 4th Dynasty Proof: Evidence indicates that Egyptians made use of potter’s wheels in the manufacturing of pottery from as early as the 4th Dynasty. END example"
-user: f"Documents:\n{docs}\n\nQuestion:\ {question}?\nAnswer:"
+user: "Documents:\n{docs}\n\nQuestion: {question}?\nAnswer:"
system_without_docs: "You are a helpful assistant. Answer the questions as short as possible."
-user_without_docs: f"Question:\ {question}?"
\ No newline at end of file
+user_without_docs: "Question: {question}?"
\ No newline at end of file
diff --git a/config/prompt/xrag.yaml b/config/prompt/xrag.yaml
index 9079fa1..1e7ce1a 100644
--- a/config/prompt/xrag.yaml
+++ b/config/prompt/xrag.yaml
@@ -1,4 +1,4 @@
system: "Refer to the background document and answer the questions:\n\n"
-user: f"Background:\n{docs}\n\nQuestion:\ {question}"
+user: "Background:\n{docs}\n\nQuestion: {question}"
system_without_docs: "You are a helpful assistant. Answer the questions as short as possible."
-user_without_docs: f"Question:\ {question}"
\ No newline at end of file
+user_without_docs: "Question: {question}"
\ No newline at end of file
diff --git a/models/evaluators/llm.py b/models/evaluators/llm.py
index f91378e..0ef0aae 100644
--- a/models/evaluators/llm.py
+++ b/models/evaluators/llm.py
@@ -40,7 +40,8 @@ def __init__(self, model_config: dict, batch_size: int = None, config: str = "de
self.llm.max_new_tokens = eval_config['max_new_tokens']
if not batch_size == None:
self.llm.batch_size = batch_size
- self.system_prompt = eval(self.prompt.system).replace(':\ ', ': ')
+ self.system_prompt = self.prompt.system.format(rubrik_section=self.rubrik_section)
+
#FIXME: what shall we do if label corrsponds to multiple tokens?
self.output_ids = [self.llm.tokenizer.encode(opt, add_special_tokens=False) for opt in sorted(self.options)]
self.output_values = torch.tensor([self.options[opt] for opt in sorted(self.options)]).float()
@@ -62,28 +63,38 @@ def __del__(self):
def create_instruction(self,sample):
answer = sample['reference']
- question=sample['question']
- prediction=sample['candidate']
+ question = sample['question']
+ prediction = sample['candidate']
if 'response' in sample:
response = sample['response']
else:
response = None
prefix = []
if getattr(self.llm.tokenizer, "chat_template") is not None and 'system' in self.llm.tokenizer.chat_template:
- prefix = [{'role': 'system',
- 'content': self.system_prompt}]
- prefix.extend([{'role': 'user',
- 'content': eval(self.prompt.user).replace(':\ ', ': ')}]
+ prefix = [{
+ 'role': 'system',
+ 'content': self.system_prompt
+ }]
+ prefix.extend([{
+ 'role': 'user',
+ 'content': self.prompt.user.format(rubrik_section=self.rubrik_section,
+ question=question,
+ answer=answer,
+ prediction=prediction)}]
)
else:
- prefix = ([{'role': 'user',
- 'content': eval(self.prompt.user_without_system).replace(':\ ', ': ')}]
- )
+ prefix = ([{
+ 'role': 'user',
+ 'content': self.prompt.user_without_system.format(rubrik_section=self.rubrik_section,
+ question=question,
+ answer=answer,
+ prediction=prediction)
+ }])
if 'assistant' in self.prompt:
prefix.extend([{'role': 'assistant',
- 'content': eval(self.prompt.assistant).replace(':\ ', ': ')}]
- )
+ 'content': self.prompt.assistant}]
+ )
if not response is None:
prefix.extend([{'role': 'assistant',
'content': response}]
diff --git a/models/evaluators/llm_ollama.py b/models/evaluators/llm_ollama.py
index 662e862..f18223a 100644
--- a/models/evaluators/llm_ollama.py
+++ b/models/evaluators/llm_ollama.py
@@ -4,17 +4,17 @@
CC BY-NC-SA 4.0 license
'''
-from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
from tqdm import tqdm
import torch
-import re
import numpy as np
-from langchain_community.llms import Ollama
import ollama
-from langchain_core.prompts import ChatPromptTemplate
import omegaconf
+
+from langchain_community.llms import Ollama
+from langchain_core.prompts import ChatPromptTemplate
from models.evaluators.utils import *
+
class OllamaEval:
"""
- uses existing ollama server for inference, need to specify the url of the server via basic_url parameter
@@ -31,22 +31,21 @@ def __init__(self, model_name, batch_size=1, config="default_qa", basic_url="htt
self.rubrik_section = ", ".join(["{{"+opt+"}}" for opt in self.options])
#self.rubrik_section = "\n - ".join(sorted([f"{opt} answer" for opt in self.options]))
- self.system_prompt = eval(self.prompt.system)
+ self.system_prompt = self.prompt.system.format(rubrik_section=self.rubrik_section)
self.output_values = torch.tensor([self.options[opt] for opt in sorted(self.options)]).float()
self.model_name = model_name
- self.model = Ollama(model=model_name, base_url=f"{basic_url}", temperature=0, system=eval(self.prompt.system))
+ self.model = Ollama(model=model_name, base_url=f"{basic_url}", temperature=0, system=self.system_prompt)
def create_instruction(self,sample):
answer = ", ".join(sample['reference']).replace("{", "").replace("}","")
- question=sample['question'].replace("{", "").replace("}","")
- #need to remove "{}"
- prediction=sample['candidate'].replace("{", "").replace("}","")
+ question = sample['question'].replace("{", "").replace("}","")
+ prediction = sample['candidate'].replace("{", "").replace("}","")
template = ChatPromptTemplate.from_messages([
- ("user", eval(self.prompt.user)),
+ ("user", self.prompt.user),
("ai", ' Response: '),
])
- return template.invoke({'answer':answer, 'question':question, 'prediction':prediction, 'self.rubrik_section':self.rubrik_section})
+ return template.invoke({'answer': answer, 'question': question, 'prediction': prediction, 'rubrik_section': self.rubrik_section})
diff --git a/models/evaluators/vllm.py b/models/evaluators/vllm.py
index 45b1a3f..0f78413 100644
--- a/models/evaluators/vllm.py
+++ b/models/evaluators/vllm.py
@@ -39,7 +39,7 @@ def __init__(self, model_config: dict, batch_size: int = None, config: str = "de
if not batch_size == None:
self.llm.batch_size = batch_size
self.llm.max_new_tokens = eval_config['max_new_tokens']
- self.system_prompt = eval(self.prompt.system).replace(':\ ', ': ')
+ self.system_prompt = self.prompt.system.format(rubrik_section=self.rubrik_section)
self.output_ids = [self.llm.tokenizer.encode(opt, add_special_tokens=False)[-1] for opt in sorted(self.options)]
self.output_values = torch.tensor([self.options[opt] for opt in sorted(self.options)]).float()
@@ -57,16 +57,22 @@ def create_instruction(self,sample):
prefix = [{'role': 'system',
'content': self.system_prompt}]
prefix.extend([{'role': 'user',
- 'content': eval(self.prompt.user).replace(':\ ', ': ')}]
+ 'content': self.prompt.user.format(rubrik_section=self.rubrik_section,
+ question=question,
+ answer=answer,
+ prediction=prediction)}]
)
else:
prefix = ([{'role': 'user',
- 'content': eval(self.prompt.user_without_system).replace(':\ ', ': ')}]
+ 'content': self.prompt.user_without_system.format(rubrik_section=self.rubrik_section,
+ question=question,
+ answer=answer,
+ prediction=prediction)}]
)
if 'assistant' in self.prompt:
prefix.extend([{'role': 'assistant',
- 'content': eval(self.prompt.assistant).replace(':\ ', ': ')}]
+ 'content': self.prompt.assistant}]
)
if not response is None:
prefix.extend([{'role': 'assistant',
diff --git a/models/generators/generator.py b/models/generators/generator.py
index aebef39..23804eb 100644
--- a/models/generators/generator.py
+++ b/models/generators/generator.py
@@ -87,8 +87,8 @@ def compile_prompt(self, system_prompt: str, user_prompt: str, question: str, do
label_start_index = None
if self.tokenizer.chat_template is None:
- user_prompt_with_values = eval(user_prompt).replace(':\ ', ': ')
- # we add the 'reponse incitation' to non chat template
+ user_prompt_with_values = user_prompt.format(question=question, docs=docs)
+ # we add the 'reponse incitation' to non chat-template
prompt = f"{system_prompt}\n{user_prompt_with_values}" + self.get_response()
if label is not None:
# Compute prompt size in tokens without labels.
@@ -98,7 +98,7 @@ def compile_prompt(self, system_prompt: str, user_prompt: str, question: str, do
else:
messages = [
{"role": "system", "content": system_prompt},
- {"role": "user", "content": eval(user_prompt).replace(':\ ', ': ')}
+ {"role": "user", "content": user_prompt.format(question=question, docs=docs)}
]
try:
# Handle the label
diff --git a/models/generators/llm.py b/models/generators/llm.py
index af9a72f..f55c273 100644
--- a/models/generators/llm.py
+++ b/models/generators/llm.py
@@ -146,8 +146,10 @@ def generate(self, instr_tokenized):
return decoded
def __del__(self):
- gc.collect()
- torch.cuda.empty_cache()
+ if "gc" in globals() and gc:
+ gc.collect()
+ if "torch" in globals() and torch and torch.cuda.is_available():
+ torch.cuda.empty_cache()
def get_no_loss_start_index(self,
ids: torch.LongTensor,
diff --git a/models/generators/llm_openai.py b/models/generators/llm_openai.py
index 74e7271..9f027f5 100644
--- a/models/generators/llm_openai.py
+++ b/models/generators/llm_openai.py
@@ -122,6 +122,6 @@ def compile_prompt(self, system_prompt, user_prompt, question, docs=None):
"""
instr_prompt = [
{"role": "system", "content": system_prompt},
- {"role": "user", "content": eval(user_prompt).replace(':\ ', ': ')}
+ {"role": "user", "content": user_prompt.format(question=question, docs=docs)}
]
return instr_prompt
\ No newline at end of file