Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -491,7 +491,8 @@ def get_response_with_search(query, model, num_calls=3, temperature=0.1):
|
|
| 491 |
|
| 492 |
initial_prompt = f"""Using the following context from web search results:
|
| 493 |
{context}
|
| 494 |
-
Write a detailed and complete
|
|
|
|
| 495 |
Stick closely to the information provided in the context and avoid making unsupported claims."""
|
| 496 |
|
| 497 |
try:
|
|
@@ -503,7 +504,7 @@ Stick closely to the information provided in the context and avoid making unsupp
|
|
| 503 |
# Generate critique
|
| 504 |
critique = critique_response(initial_response, context, query, model)
|
| 505 |
|
| 506 |
-
final_prompt = f"""Given the following initial response, context, critique, and original query, provide a revised response that addresses the identified issues and sticks closely to the information provided in the context while fully answering the user's query.
|
| 507 |
|
| 508 |
User Query: {query}
|
| 509 |
|
|
|
|
| 491 |
|
| 492 |
initial_prompt = f"""Using the following context from web search results:
|
| 493 |
{context}
|
| 494 |
+
Write a detailed and complete research document that fulfills the following user request: '{query}'
|
| 495 |
+
After writing the document, please provide a list of sources used in your response.
|
| 496 |
Stick closely to the information provided in the context and avoid making unsupported claims."""
|
| 497 |
|
| 498 |
try:
|
|
|
|
| 504 |
# Generate critique
|
| 505 |
critique = critique_response(initial_response, context, query, model)
|
| 506 |
|
| 507 |
+
final_prompt = f"""Given the following initial response, context, critique, and original query, provide a revised response that addresses the identified issues and sticks closely to the information provided in the context while fully answering the user's query in a detailed and complete research document that fulfills the user request, After writing the document, please provide a list of sources used in your response.
|
| 508 |
|
| 509 |
User Query: {query}
|
| 510 |
|