Spaces:
Runtime error
Runtime error
LOUIS SANNA
commited on
Commit
·
dfcff8d
1
Parent(s):
c6c35dc
feat(prompts): remove climate
Browse files- climateqa/prompts.py +7 -13
- climateqa/qa_logging.py +1 -1
climateqa/prompts.py
CHANGED
@@ -1,16 +1,10 @@
|
|
1 |
-
# If the message is not relevant to climate change (like "How are you", "I am 18 years old" or "When was built the eiffel tower"), return N/A
|
2 |
-
|
3 |
reformulation_prompt = """
|
4 |
-
Reformulate the following user message to be a short standalone question in English, in the context of an educational discussion
|
5 |
---
|
6 |
query: La technologie nous sauvera-t-elle ?
|
7 |
question: Can technology help humanity mitigate the effects of climate change?
|
8 |
language: French
|
9 |
---
|
10 |
-
query: what are our reserves in fossil fuel?
|
11 |
-
question: What are the current reserves of fossil fuels and how long will they last?
|
12 |
-
language: English
|
13 |
-
---
|
14 |
query: what are the main causes of climate change?
|
15 |
question: What are the main causes of climate change in the last century?
|
16 |
language: English
|
@@ -21,13 +15,13 @@ query: {query}
|
|
21 |
answer:"""
|
22 |
|
23 |
system_prompt = """
|
24 |
-
You are
|
25 |
-
You are given a question and extracted passages of
|
26 |
"""
|
27 |
|
28 |
|
29 |
answer_prompt = """
|
30 |
-
You are
|
31 |
|
32 |
Guidelines:
|
33 |
- If the passages have useful facts or numbers, use them in your answer.
|
@@ -50,7 +44,7 @@ Answer in {language} with the passages citations:
|
|
50 |
|
51 |
|
52 |
audience_prompts = {
|
53 |
-
"children": "6 year old children that don't know anything about science and
|
54 |
-
"general": "the general public who know the basics
|
55 |
-
"experts": "expert and
|
56 |
}
|
|
|
|
|
|
|
1 |
reformulation_prompt = """
|
2 |
+
Reformulate the following user message to be a short standalone question in English, in the context of an educational discussion.
|
3 |
---
|
4 |
query: La technologie nous sauvera-t-elle ?
|
5 |
question: Can technology help humanity mitigate the effects of climate change?
|
6 |
language: French
|
7 |
---
|
|
|
|
|
|
|
|
|
8 |
query: what are the main causes of climate change?
|
9 |
question: What are the main causes of climate change in the last century?
|
10 |
language: English
|
|
|
15 |
answer:"""
|
16 |
|
17 |
system_prompt = """
|
18 |
+
You are an AI Assistant, you will act as an expert and answer questions.
|
19 |
+
You are given a question and extracted passages of relevant sources. Provide a clear and structured answer based on the passages provided, the context and the guidelines.
|
20 |
"""
|
21 |
|
22 |
|
23 |
answer_prompt = """
|
24 |
+
You are an AI Assistant. You are given a question and extracted passages of relevant sources. Provide a clear and structured answer based on the passages provided, the context and the guidelines.
|
25 |
|
26 |
Guidelines:
|
27 |
- If the passages have useful facts or numbers, use them in your answer.
|
|
|
44 |
|
45 |
|
46 |
audience_prompts = {
|
47 |
+
"children": "6 year old children that don't know anything about science and need metaphors to learn",
|
48 |
+
"general": "the general public who know the basics and want to learn more about it without technical terms. Still use references to passages.",
|
49 |
+
"experts": "expert and scientists that are not afraid of technical terms",
|
50 |
}
|
climateqa/qa_logging.py
CHANGED
@@ -46,7 +46,7 @@ def get_azure_blob_client():
|
|
46 |
"account_name": os.environ["BLOB_ACCOUNT_NAME"],
|
47 |
}
|
48 |
account_url = os.environ["BLOB_ACCOUNT_URL"]
|
49 |
-
file_share_name = "
|
50 |
# I don't know why this is necessary, but it cause an error otherwise when running build_index.py
|
51 |
from azure.storage.fileshare import ShareServiceClient
|
52 |
|
|
|
46 |
"account_name": os.environ["BLOB_ACCOUNT_NAME"],
|
47 |
}
|
48 |
account_url = os.environ["BLOB_ACCOUNT_URL"]
|
49 |
+
file_share_name = "anything-question-answering"
|
50 |
# I don't know why this is necessary, but it cause an error otherwise when running build_index.py
|
51 |
from azure.storage.fileshare import ShareServiceClient
|
52 |
|