Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -50,13 +50,12 @@ db_retriever = db.as_retriever(search_type="similarity", search_kwargs={"k": 2,
|
|
50 |
|
51 |
|
52 |
# Define prompt template
|
53 |
-
prompt_template = """
|
54 |
-
As a legal chatbot specializing in the Indian Penal Code (IPC), provide accurate and concise answers based on the context. Respond only if the answer can be derived from the given context; otherwise, reply: "The information is not available in the provided context." Use professional language.
|
55 |
-
|
56 |
CONTEXT: {context}
|
57 |
CHAT HISTORY: {chat_history}
|
58 |
QUESTION: {question}
|
59 |
ANSWER:
|
|
|
60 |
"""
|
61 |
prompt = PromptTemplate(template=prompt_template, input_variables=["context", "question", "chat_history"])
|
62 |
|
|
|
50 |
|
51 |
|
52 |
# Define prompt template
|
53 |
+
prompt_template = """<s>[INST]As a legal chatbot specializing in the Indian Penal Code, provide a concise and accurate answer based on the given context. Avoid unnecessary details or unrelated content. Only respond if the answer can be derived from the provided context; otherwise, say "The information is not available in the provided context."
|
|
|
|
|
54 |
CONTEXT: {context}
|
55 |
CHAT HISTORY: {chat_history}
|
56 |
QUESTION: {question}
|
57 |
ANSWER:
|
58 |
+
</s>[INST]
|
59 |
"""
|
60 |
prompt = PromptTemplate(template=prompt_template, input_variables=["context", "question", "chat_history"])
|
61 |
|