Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -82,11 +82,9 @@ def answer_query_with_similarity(query, file_contents):
|
|
82 |
|
83 |
template = """
|
84 |
### [INST] Instruction:Analyze the provided PDF and DOC documents focusing specifically on extracting factual content, mathematical data, and crucial information relevant to device specifications, including discription. Utilize the RAG model's retrieval capabilities to ensure accuracy and minimize the risk of hallucinations in the generated content. Present the findings in a structured and clear format, incorporating:
|
85 |
-
Device Specifications: List all relevant device specifications, including batch numbers, ensuring accuracy and attention to detail.
|
86 |
-
Mathematical Calculations: Perform and report any necessary mathematical calculations found within the documents, providing step-by-step explanations to ensure clarity.
|
87 |
-
Numerical Data Analysis: Extract and analyze numerical data from tables included in the documents, summarizing key findings and implications.
|
88 |
-
Factual Information: Highlight crucial factual information extracted from the text, ensuring it is presented in a straightforward and understandable manner.
|
89 |
Ensure the response is well-organized, using bullet points or numbered lists where applicable, to enhance readability and presentation. Avoid any form of hallucination by cross-referencing facts with the document content directly.
|
|
|
|
|
90 |
### Docs : {docs}
|
91 |
### Question : {question}
|
92 |
"""
|
|
|
82 |
|
83 |
template = """
|
84 |
### [INST] Instruction:Analyze the provided PDF and DOC documents focusing specifically on extracting factual content, mathematical data, and crucial information relevant to device specifications, including discription. Utilize the RAG model's retrieval capabilities to ensure accuracy and minimize the risk of hallucinations in the generated content. Present the findings in a structured and clear format, incorporating:
|
|
|
|
|
|
|
|
|
85 |
Ensure the response is well-organized, using bullet points or numbered lists where applicable, to enhance readability and presentation. Avoid any form of hallucination by cross-referencing facts with the document content directly.
|
86 |
+
Always act as a frinedly assistant, to improve the user experience and feel of the answer.
|
87 |
+
Only print the answer, in a well organised way, and always behave like a helpful assistant.
|
88 |
### Docs : {docs}
|
89 |
### Question : {question}
|
90 |
"""
|