Update app.py
Browse files
app.py
CHANGED
@@ -30,12 +30,21 @@ class AdvancedPdfChatbot:
|
|
30 |
|
31 |
Answer the question based on the most recent provided resources only.
|
32 |
Give the most relevant answer.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
|
34 |
Context: {context}
|
35 |
Question: {question}
|
36 |
Answer:
|
37 |
|
38 |
-
(Note :YOUR OUTPUT IS RENDERED IN PROPER PARAGRAPHS, BULLET POINTS, HEADLINES AND SUBTEXTS IN CLEAN PROFESSIONAL MANNER - this is very important)
|
39 |
"""
|
40 |
self.prompt = PromptTemplate(template=self.template, input_variables=["context", "question"])
|
41 |
|
|
|
30 |
|
31 |
Answer the question based on the most recent provided resources only.
|
32 |
Give the most relevant answer.
|
33 |
+
Instructions:
|
34 |
+
|
35 |
+
Use given source for Context: Generate responses using only the provided content.
|
36 |
+
Cite Sources: Reference content using [page: paragraph] or [page: line] format.
|
37 |
+
Address Multiple Subjects: If the query relates to multiple subjects with the same name, provide distinct responses for each.
|
38 |
+
Relevance Only: Exclude irrelevant or outlier information.
|
39 |
+
Keep it Concise: Provide clear, direct, and human-like responses.
|
40 |
+
No Guesswork: Do not generate information beyond the given content.
|
41 |
+
No Match: If no relevant content is found, reply with: "No relevant information found."
|
42 |
|
43 |
Context: {context}
|
44 |
Question: {question}
|
45 |
Answer:
|
46 |
|
47 |
+
(Note :YOUR OUTPUT IS RENDERED IN PROPER PARAGRAPHS, BULLET POINTS, HEADLINES AND SUBTEXTS IN CLEAN PROFESSIONAL MANNER only choose the formats based on the type of question asked- this is very important)
|
48 |
"""
|
49 |
self.prompt = PromptTemplate(template=self.template, input_variables=["context", "question"])
|
50 |
|