Spaces:
Runtime error
Runtime error
Commit ·
22cdb21
1
Parent(s): 1fa5f16
Update app.py
Browse files- Modification du prompt
app.py
CHANGED
|
@@ -111,7 +111,7 @@ def ask_ai_upload(doc, question):
|
|
| 111 |
|
| 112 |
# Define the query & the querying method
|
| 113 |
query_engine = index.as_query_engine(optimizer=SentenceEmbeddingOptimizer(percentile_cutoff=0.8), similarity_top_k=7)
|
| 114 |
-
query = 'Answer the question truthfully based on the text provided. Use bullet points.
|
| 115 |
response = query_engine.query(query)
|
| 116 |
|
| 117 |
return response.response
|
|
@@ -136,7 +136,7 @@ def ask_ai_choose(doc, question):
|
|
| 136 |
|
| 137 |
# Define the query & the querying method
|
| 138 |
query_engine = index.as_query_engine(optimizer=SentenceEmbeddingOptimizer(percentile_cutoff=0.8), similarity_top_k=7)
|
| 139 |
-
query = 'Answer the question truthfully based on the text provided. Use bullet points.
|
| 140 |
response = query_engine.query(query)
|
| 141 |
|
| 142 |
return response.response
|
|
|
|
| 111 |
|
| 112 |
# Define the query & the querying method
|
| 113 |
query_engine = index.as_query_engine(optimizer=SentenceEmbeddingOptimizer(percentile_cutoff=0.8), similarity_top_k=7)
|
| 114 |
+
query = 'Answer the question truthfully based on the text provided. Use bullet points. Write a step by step explanation and generate an answer as detailed and precise as possible. The task is:' + str(question)
|
| 115 |
response = query_engine.query(query)
|
| 116 |
|
| 117 |
return response.response
|
|
|
|
| 136 |
|
| 137 |
# Define the query & the querying method
|
| 138 |
query_engine = index.as_query_engine(optimizer=SentenceEmbeddingOptimizer(percentile_cutoff=0.8), similarity_top_k=7)
|
| 139 |
+
query = 'Answer the question truthfully based on the text provided. Use bullet points. Write a step by step explanation and generate an answer as detailed and precise as possible. The task is:' + str(question)
|
| 140 |
response = query_engine.query(query)
|
| 141 |
|
| 142 |
return response.response
|