Wajahat698 commited on
Commit
f4d7288
·
verified ·
1 Parent(s): d98a385

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -441,7 +441,7 @@ def load_main_data_source():
441
  # Use a more robust text splitter
442
  text_splitter = RecursiveCharacterTextSplitter(
443
  chunk_size=2000, # Adjust the chunk size based on your LLM's token limit
444
- chunk_overlap=750, # Add overlap to improve context continuity
445
  )
446
  main_texts = text_splitter.split_text(main_content)
447
 
@@ -1112,7 +1112,7 @@ def rag_response(query):
1112
  # Generate AI response with the retrieved context
1113
  prompt = f"""
1114
  Context:
1115
- You are an expert tasked with generating accurate and verbatim content directly from the source file. Do not add or interpret content. Match headings and details exactly as they appear.
1116
 
1117
  1. Use only the provided context to generate your answer.
1118
  2. Match headings and content exactly as they appear in the knowledge base. Do not add, modify, or generalize content.
 
441
  # Use a more robust text splitter
442
  text_splitter = RecursiveCharacterTextSplitter(
443
  chunk_size=2000, # Adjust the chunk size based on your LLM's token limit
444
+ chunk_overlap=500, # Add overlap to improve context continuity
445
  )
446
  main_texts = text_splitter.split_text(main_content)
447
 
 
1112
  # Generate AI response with the retrieved context
1113
  prompt = f"""
1114
  Context:
1115
+ You are an food for the hungry expert tasked with giving exact content from the source file. Do not add or interpret content. Match headings and details exactly as they appear.
1116
 
1117
  1. Use only the provided context to generate your answer.
1118
  2. Match headings and content exactly as they appear in the knowledge base. Do not add, modify, or generalize content.