mitulagr2 commited on
Commit
fd96c29
·
1 Parent(s): 3f20396

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=2048, chunk_overlap=128)
20
  self.prompt = PromptTemplate.from_template(
21
  """
22
  You are an assistant for question-answering tasks. Use the following pieces of retrieved context to
@@ -37,7 +37,7 @@ class ChatPDF:
37
  self.retriever = vector_store.as_retriever(
38
  search_type="similarity_score_threshold",
39
  search_kwargs={
40
- "k": 15,
41
  "score_threshold": 0.5,
42
  },
43
  )
 
16
 
17
  def __init__(self):
18
  self.model = ChatOllama(model="qwen:1.8b")
19
+ self.text_splitter = RecursiveCharacterTextSplitter(chunk_size=128, chunk_overlap=16)
20
  self.prompt = PromptTemplate.from_template(
21
  """
22
  You are an assistant for question-answering tasks. Use the following pieces of retrieved context to
 
37
  self.retriever = vector_store.as_retriever(
38
  search_type="similarity_score_threshold",
39
  search_kwargs={
40
+ "k": 240,
41
  "score_threshold": 0.5,
42
  },
43
  )