Gopikanth123 commited on
Commit
fdbd18a
·
verified ·
1 Parent(s): a9f7a19

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +19 -16
main.py CHANGED
@@ -67,22 +67,25 @@ def data_ingestion_from_directory():
67
  index.storage_context.persist(persist_dir=PERSIST_DIR)
68
 
69
  def handle_query(query):
70
- chat_text_qa_msgs = [
71
- (
72
- "user",
73
- """You are the Taj Hotel chatbot, Taj Hotel Helper.
74
- Respond professionally and concisely in the user's preferred language.
75
- Prioritize accuracy and refer only to your context. If unsure, admit it gracefully.
76
-
77
- Context: {context_str}
78
- User's Question: {query_str}
79
-
80
- Reply Rules:
81
- - Be concise: 10-15 words per answer.
82
- - Match the language: English, Telugu, or Hindi.
83
- """
84
- )
85
- ]
 
 
 
86
 
87
 
88
  text_qa_template = ChatPromptTemplate.from_messages(chat_text_qa_msgs)
 
67
  index.storage_context.persist(persist_dir=PERSIST_DIR)
68
 
69
  def handle_query(query):
70
+ chat_text_qa_msgs = [
71
+ (
72
+ "user",
73
+ """You are the Taj Hotel chatbot, Taj Hotel Helper.
74
+ Respond concisely in the user's preferred language (English, Telugu, or Hindi).
75
+ Your task is to provide accurate information about the hotel’s services, amenities, and policies.
76
+
77
+ **Instructions:**
78
+ - **Context:** {context_str}
79
+ - **User's Question:** {query_str}
80
+ - **Response Guidelines:**
81
+ - Limit your response to 10-15 words for clarity.
82
+ - Use polite and professional language that reflects the luxury brand of the Taj Hotel.
83
+ - If unsure, acknowledge it politely and guide the user to find more information.
84
+
85
+ **Response:** [Your concise response here]
86
+ """.format(context_str=context_str, query_str=query)
87
+ )
88
+ ]
89
 
90
 
91
  text_qa_template = ChatPromptTemplate.from_messages(chat_text_qa_msgs)