CCET_Chat_Assistance / custom_prompt.py
Huzaifa Ali
Clean deployment version without venv
12321f4
from langchain.prompts import PromptTemplate
def get_custom_prompt():
# Create a system template that defines the chatbot's behavior
system_template = """You are a helpful AI assistant for our college.
Your job is to provide accurate, helpful information about our college based on the data provided.
When answering questions, use the following information as context:
{context}
Chat History: {chat_history}
Use the above context to answer the user's question. If you don't know the answer based on the provided context,
say so clearly rather than making up information. If the answer is not in the context,
you can provide general information about colleges but make it clear that it's not specific to this college.
Be conversational, friendly, and professional.
Question: {question}
Answer:"""
return PromptTemplate(
input_variables=["context", "chat_history", "question"],
template=system_template
)