Update app.py
Browse files
app.py
CHANGED
@@ -26,8 +26,7 @@ Original Query: {query}
|
|
26 |
Document Context: {context}
|
27 |
Enhanced Query Requirements:
|
28 |
- Restructure for optimal comprehension
|
29 |
-
- Rewrite the
|
30 |
-
- Use specific structure; response should include paragraphs, bullet points, headlines, and subtexts
|
31 |
Refined Query:"""
|
32 |
)
|
33 |
self.refinement_chain = LLMChain(
|
@@ -119,7 +118,7 @@ If the answer isn't directly available, explain why. """,
|
|
119 |
|
120 |
context_hints = self._extract_document_type()
|
121 |
refined_query = self.query_refiner.refine_query(query, context_hints)
|
122 |
-
|
123 |
result = self.chain({"question": refined_query})
|
124 |
return result['answer']
|
125 |
|
|
|
26 |
Document Context: {context}
|
27 |
Enhanced Query Requirements:
|
28 |
- Restructure for optimal comprehension
|
29 |
+
- Rewrite the question to the best context and structure of output desired
|
|
|
30 |
Refined Query:"""
|
31 |
)
|
32 |
self.refinement_chain = LLMChain(
|
|
|
118 |
|
119 |
context_hints = self._extract_document_type()
|
120 |
refined_query = self.query_refiner.refine_query(query, context_hints)
|
121 |
+
print(refined_query,context_hints)
|
122 |
result = self.chain({"question": refined_query})
|
123 |
return result['answer']
|
124 |
|