Update app.py
Browse files
app.py
CHANGED
@@ -53,8 +53,8 @@ def load_preprocessed_vectorstore():
|
|
53 |
|
54 |
text_splitter = RecursiveCharacterTextSplitter(
|
55 |
separators=["\n\n", "\n", ". ", " ", ""],
|
56 |
-
chunk_size=
|
57 |
-
chunk_overlap=
|
58 |
)
|
59 |
|
60 |
document_chunks = text_splitter.split_documents(documents)
|
@@ -75,7 +75,7 @@ def get_context_retriever_chain(vector_store):
|
|
75 |
prompt = ChatPromptTemplate.from_messages([
|
76 |
MessagesPlaceholder(variable_name="chat_history"),
|
77 |
("human", "{input}"),
|
78 |
-
("system", """Given the chat history and the latest user question, which might reference context in the chat history, Answer the question
|
79 |
by taking reference from the document.
|
80 |
If the question is directly addressed within the provided document, provide a relevant answer.
|
81 |
If the question is not explicitly addressed in the document, return the following message:
|
|
|
53 |
|
54 |
text_splitter = RecursiveCharacterTextSplitter(
|
55 |
separators=["\n\n", "\n", ". ", " ", ""],
|
56 |
+
chunk_size=500,
|
57 |
+
chunk_overlap=150
|
58 |
)
|
59 |
|
60 |
document_chunks = text_splitter.split_documents(documents)
|
|
|
75 |
prompt = ChatPromptTemplate.from_messages([
|
76 |
MessagesPlaceholder(variable_name="chat_history"),
|
77 |
("human", "{input}"),
|
78 |
+
("system", """You are an expert english tutor, your task is to help users to learn english. Given the chat history and the latest user question, which might reference context in the chat history, Answer the question
|
79 |
by taking reference from the document.
|
80 |
If the question is directly addressed within the provided document, provide a relevant answer.
|
81 |
If the question is not explicitly addressed in the document, return the following message:
|