Qdonnars commited on
Commit
4f499ad
·
1 Parent(s): 27180fb

updates prompts for french summary

Browse files
Files changed (3) hide show
  1. .gitignore +3 -3
  2. app.py +11 -7
  3. spinoza_project/prompt_Presse.yaml +3 -2
.gitignore CHANGED
@@ -1,8 +1,8 @@
1
  .env
2
- __pycache__/app.cpython-38.pyc
3
- __pycache__/app.cpython-39.pyc
4
- __pycache__/utils.cpython-38.pyc
5
 
6
  notebooks/
7
  *.pyc
8
  local_tests/
 
 
 
1
  .env
2
+ */__pycache__
 
 
3
 
4
  notebooks/
5
  *.pyc
6
  local_tests/
7
+
8
+ env/
app.py CHANGED
@@ -79,12 +79,16 @@ Based on the folowing question:
79
  And the following expert answer:
80
  {answers}
81
 
82
- Answer in French.
83
- When using legal answers, keep tracking of the name of the articles.
84
- When using ADEME answers, name the sources that are mainly used.
85
- List the different elements mentionned, and highlight the agreement points between the sources, as well as the contradictions or differences.
86
- Generate the answer as markdown, with an aerated layout, and headlines in bold
87
- Start by highlighting contradictions followed by a general summary and then go into detail that could be interesting for writing an article about.
 
 
 
 
88
  """
89
 
90
  synthesis_prompt = to_chat_instruction(synthesis_template, special_tokens)
@@ -316,7 +320,7 @@ init_prompt = """
316
  Hello, I am Spinoza, a conversational assistant designed to help you in your journalistic journey. I will answer your questions based **on the provided sources**.
317
 
318
  ⚠️ Limitations
319
- *Please note that this chatbot is in an early stage phase, it is not perfect and may sometimes give irrelevant answers. If you are not satisfied with the answer, please ask a more specific question or report your feedback to help us improve the system.*
320
 
321
  What do you want to learn ?
322
  """
 
79
  And the following expert answer:
80
  {answers}
81
 
82
+ - When using legal answers, keep tracking of the name of the articles.
83
+ - When using ADEME answers, name the sources that are mainly used.
84
+ - List the different elements mentionned, and highlight the agreement points between the sources, as well as the contradictions or differences.
85
+ - Contradictions don't lie in whether or not a subject is dealt with, but more in the opinion given or the way the subject is dealt with.
86
+ - Generate the answer as markdown, with an aerated layout, and headlines in bold
87
+ - When you use information from a passage, mention where it came from by using [Doc i] at the end of the sentence. i stands for the number of the document.",
88
+ - Do not use the sentence 'Doc i says ...' to say where information came from.",
89
+ - If the same thing is said in more than one document, you can mention all of them like this: [Doc i, Doc j, Doc k]",
90
+ - Start by highlighting contradictions, then do a general summary and finally get into the details that might be interesting for article writing. Where relevant, quote them.
91
+ - Awnser in French / Répond en Français
92
  """
93
 
94
  synthesis_prompt = to_chat_instruction(synthesis_template, special_tokens)
 
320
  Hello, I am Spinoza, a conversational assistant designed to help you in your journalistic journey. I will answer your questions based **on the provided sources**.
321
 
322
  ⚠️ Limitations
323
+ *Please note that this chatbot is in an early stage, it is not perfect and may sometimes give irrelevant answers. If you are not satisfied with the answer, please ask a more specific question or report your feedback to help us improve the system.*
324
 
325
  What do you want to learn ?
326
  """
spinoza_project/prompt_Presse.yaml CHANGED
@@ -70,14 +70,15 @@ question_answering_prompt:
70
  " - then clearly state that you have information about /other places/,",
71
  " - the, display information about /other places/",
72
  "- Always suggest as a conclusion other prompts closed to the original one that could lead the journalist to discover new data and information. For example, rephrase the original question, make it more precise, or change the topic of the question while remaining in the same theme. Use bullet points]",
 
73
  ]
74
  type: "prompt"
75
 
76
  reformulation_prompt:
77
  prompt: [
78
- "Reformulate the following user message to be a short standalone question in french.",
79
  "If the question is too vague, just say it as it is",
80
- "This question will be used to retrieve documents in a coroys of press articles, if needed reformulate it to increase chance to have relevant documents in this corpus.",
81
  "",
82
  "Exemples:",
83
  "---",
 
70
  " - then clearly state that you have information about /other places/,",
71
  " - the, display information about /other places/",
72
  "- Always suggest as a conclusion other prompts closed to the original one that could lead the journalist to discover new data and information. For example, rephrase the original question, make it more precise, or change the topic of the question while remaining in the same theme. Use bullet points]",
73
+ "-Awnser in French"
74
  ]
75
  type: "prompt"
76
 
77
  reformulation_prompt:
78
  prompt: [
79
+ "Reformulate the following user message to be a short standalone question in French.",
80
  "If the question is too vague, just say it as it is",
81
+ "This question will be used to retrieve documents in a list of press articles, if needed reformulate it to increase chance to have relevant documents in this corpus.",
82
  "",
83
  "Exemples:",
84
  "---",