Update app.py
Browse files
app.py
CHANGED
@@ -56,16 +56,21 @@ sink_tokens = max(4, len(tokenizer.encode(prefix)))
|
|
56 |
|
57 |
# Default prompt content.
|
58 |
default_task_description = (
|
59 |
-
"Answer the question based on the
|
60 |
-
"
|
61 |
)
|
62 |
default_few_shot = """Examples
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
|
|
|
|
|
|
|
|
|
|
69 |
"""
|
70 |
|
71 |
CHROMA_DB_DIR = "./chroma_db"
|
|
|
56 |
|
57 |
# Default prompt content.
|
58 |
default_task_description = (
|
59 |
+
"Answer the question based on the provided context."
|
60 |
+
"Provide only the answer and no additional explanations."
|
61 |
)
|
62 |
default_few_shot = """Examples
|
63 |
+
context: Climate change is primarily driven by human activities such as burning fossil fuels, deforestation, and industrial processes, which release large amounts of greenhouse gases into the atmosphere, causing global temperatures to rise.
|
64 |
+
question: What are the main human activities contributing to climate change?
|
65 |
+
answer: The main human activities contributing to climate change include burning fossil fuels, deforestation, and various industrial processes that emit greenhouse gases.
|
66 |
+
|
67 |
+
context: The Renaissance was a cultural movement spanning roughly from the 14th to the 17th century, marked by renewed interest in classical learning and values, advancements in art, literature, and scientific inquiry, and significant cultural developments.
|
68 |
+
question: What characterized the Renaissance period?
|
69 |
+
answer: The Renaissance period was characterized by a revival of classical learning, significant advancements in art and literature, and notable developments in scientific inquiry and cultural values.
|
70 |
+
|
71 |
+
context: The theory of evolution by natural selection, proposed by Charles Darwin, explains how species adapt and evolve over generations based on the survival and reproduction of individuals best suited to their environment.
|
72 |
+
question: How does Darwin's theory of evolution explain the adaptation of species?
|
73 |
+
answer: Darwin's theory explains that species adapt and evolve through natural selection, where individuals best suited to their environment are more likely to survive and reproduce.
|
74 |
"""
|
75 |
|
76 |
CHROMA_DB_DIR = "./chroma_db"
|