How to increase the number of relevant chunks returned by TXTSearchTool?

I have a simple RAG testcase and I want to increase the number of chunks returned by the search tool. How can I do that?

rag_tool = TXTSearchTool(
txt=‘<my_file>’,
config=dict(
llm=dict(
provider=“groq”, # or google, openai, anthropic, llama2, …
config=dict(
model=“Deepseek-R1-Distill-Llama-70b”
),
),
embedder=dict(
provider=“openai”,
config=dict(
model=“text-embedding-ada-002”,
),
)
),
summarize=False
)

relevant_content = rag_tool.run(search_query=)

Found the way. It’s “number_documents” in llm dict.

rag_tool = TXTSearchTool(
txt=,
config=dict(
llm=dict(
provider=“groq”,
config=dict(
model=“Deepseek-R1-Distill-Llama-70b”,
number_documents=num_of_chunks <<----- this
),
),

),
# Setting summarize to False to get raw chunks
summarize=False
)

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.