Spaces:
Running
Running
harshitv804
commited on
Commit
•
d3b4295
1
Parent(s):
0d43a92
Update app.py
Browse files
app.py
CHANGED
@@ -53,10 +53,12 @@ embeddings = HuggingFaceEmbeddings(model_name="nomic-ai/nomic-embed-text-v1",mod
|
|
53 |
db = FAISS.load_local("ipc_vector_db", embeddings)
|
54 |
db_retriever = db.as_retriever(search_type="similarity",search_kwargs={"k": 4})
|
55 |
|
56 |
-
prompt_template = """Follow these instructions clearly. This is a chat template and
|
|
|
57 |
CONTEXT: {context}
|
58 |
CHAT HISTORY: {chat_history}
|
59 |
QUESTION: {question}
|
|
|
60 |
ANSWER:
|
61 |
"""
|
62 |
|
|
|
53 |
db = FAISS.load_local("ipc_vector_db", embeddings)
|
54 |
db_retriever = db.as_retriever(search_type="similarity",search_kwargs={"k": 4})
|
55 |
|
56 |
+
prompt_template = """Follow these instructions clearly. This is a chat template and As a legal chat bot specializing in Indian Penal Code queries, your primary objective is to provide accurate and concise information based on the user's questions. You will adhere strictly to the instructions provided, offering relevant context from the knowledge base while avoiding unnecessary details. Your responses will be brief, to the point, and in compliance with the established format. If a question falls outside the given context, you will refrain from utilizing the chat history and instead rely on your own knowledge base to generate an appropriate response. You will prioritize the user's query and refrain from posing additional questions. The aim is to deliver professional, precise, and contextually relevant information pertaining to the Indian Penal Code.
|
57 |
+
|
58 |
CONTEXT: {context}
|
59 |
CHAT HISTORY: {chat_history}
|
60 |
QUESTION: {question}
|
61 |
+
|
62 |
ANSWER:
|
63 |
"""
|
64 |
|