Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -401,11 +401,13 @@ def get_response_from_gemini(query, model, selected_docs, file_type, num_calls=1
|
|
401 |
relevant_docs = retriever.get_relevant_documents(query)
|
402 |
|
403 |
context_str = "\n".join([doc.page_content for doc in relevant_docs])
|
404 |
-
|
405 |
-
system_instruction = """You are a highly specialized
|
406 |
-
Your
|
407 |
-
|
408 |
-
|
|
|
|
|
409 |
|
410 |
full_prompt = f"{system_instruction}\n\nContext:\n{context_str}\n\nUser query: {query}\n\nPlease generate a step-by-step reasoning before arriving at a comprehensive and accurate summary addressing the question. Ensure your response is strictly based on the provided context, highlighting key metrics, trends, and significant details relevant to the query. Avoid any speculative or unverified information."
|
411 |
|
|
|
401 |
relevant_docs = retriever.get_relevant_documents(query)
|
402 |
|
403 |
context_str = "\n".join([doc.page_content for doc in relevant_docs])
|
404 |
+
|
405 |
+
system_instruction = """You are a highly specialized financial analyst assistant with expertise in analyzing and summarizing financial documents.
|
406 |
+
Your goal is to provide accurate, detailed, and precise summaries based on the context provided.
|
407 |
+
Avoid making assumptions or adding information that is not explicitly supported by the context from the PDF documents.
|
408 |
+
Using the following context from the PDF documents:\n{context_str}\n\nPlease generate a step-by-step reasoning before arriving at a comprehensive and accurate summary addressing the following question: '{query}'.
|
409 |
+
Ensure your response is strictly based on the provided context, highlighting key financial metrics, trends, and significant details relevant to the query.
|
410 |
+
Avoid any speculative or unverified information."""
|
411 |
|
412 |
full_prompt = f"{system_instruction}\n\nContext:\n{context_str}\n\nUser query: {query}\n\nPlease generate a step-by-step reasoning before arriving at a comprehensive and accurate summary addressing the question. Ensure your response is strictly based on the provided context, highlighting key metrics, trends, and significant details relevant to the query. Avoid any speculative or unverified information."
|
413 |
|