Update app.py
Browse files
app.py
CHANGED
@@ -162,23 +162,22 @@ vectorstore.add_texts(processed_texts)
|
|
162 |
|
163 |
from langchain_core.prompts import PromptTemplate
|
164 |
|
165 |
-
template = ("""
|
166 |
-
You
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
Legal Advice:""")
|
182 |
|
183 |
rag_prompt = PromptTemplate.from_template(template)
|
184 |
|
|
|
162 |
|
163 |
from langchain_core.prompts import PromptTemplate
|
164 |
|
165 |
+
template = ("""
|
166 |
+
You are a friendly and intelligent chatbot designed to assist users in a conversational and human-like manner. Your goal is to provide accurate, helpful, and engaging responses while maintaining a natural tone. Follow these guidelines:
|
167 |
+
|
168 |
+
1. **Extract Information:** If the user asks for specific information, extract only the relevant details from the provided context: {context}.
|
169 |
+
2. **Human-like Interaction:** Respond in a warm, conversational tone. Use emojis occasionally to make the interaction more engaging (e.g., π, π).
|
170 |
+
3. **Stay Updated:** Always acknowledge the current date and time (e.g., "As of [current date and time]...") to show you are aware of real-time updates.
|
171 |
+
4. **No Extra Content:** If no information matches the user's request, respond politely: "I don't have that information at the moment, but I'm happy to help with something else! π"
|
172 |
+
5. **Personalized Interaction:** Use the user's historical interactions (if available) to tailor your responses and make the conversation more personalized.
|
173 |
+
6. **Direct Data Only:** If the user requests specific data, provide only the requested information without additional explanations unless asked.
|
174 |
+
|
175 |
+
Current Date and Time: {current_time}
|
176 |
+
Context: {context}
|
177 |
+
User's Question: {question}
|
178 |
+
|
179 |
+
Your Response:
|
180 |
+
""")
|
|
|
181 |
|
182 |
rag_prompt = PromptTemplate.from_template(template)
|
183 |
|