mitulagr2 commited on
Commit
7bfaa43
·
1 Parent(s): acf6d8f

Update rag.py

Browse files
Files changed (1) hide show
  1. app/rag.py +2 -2
app/rag.py CHANGED
@@ -16,7 +16,7 @@ class ChatPDF:
16
 
17
  def __init__(self):
18
  self.model = ChatOllama(model="qwen:1.8b")
19
- self.text_splitter = RecursiveCharacterTextSplitter(chunk_size=1024, chunk_overlap=64)
20
  self.prompt = PromptTemplate.from_template(
21
  """
22
  You are an assistant for question-answering tasks. Use the following pieces of context
@@ -36,7 +36,7 @@ class ChatPDF:
36
  self.retriever = vector_store.as_retriever(
37
  search_type="similarity_score_threshold",
38
  search_kwargs={
39
- "k": 7,
40
  "score_threshold": 0.5,
41
  },
42
  )
 
16
 
17
  def __init__(self):
18
  self.model = ChatOllama(model="qwen:1.8b")
19
+ self.text_splitter = RecursiveCharacterTextSplitter(chunk_size=256, chunk_overlap=16)
20
  self.prompt = PromptTemplate.from_template(
21
  """
22
  You are an assistant for question-answering tasks. Use the following pieces of context
 
36
  self.retriever = vector_store.as_retriever(
37
  search_type="similarity_score_threshold",
38
  search_kwargs={
39
+ "k": 28,
40
  "score_threshold": 0.5,
41
  },
42
  )