Skip to content

Properly handle n_results to query the correct number of papers.#384

Open
ch-schiffer wants to merge 1 commit into
thawn:developfrom
ch-schiffer:bugfix/number_of_papers
Open

Properly handle n_results to query the correct number of papers.#384
ch-schiffer wants to merge 1 commit into
thawn:developfrom
ch-schiffer:bugfix/number_of_papers

Conversation

@ch-schiffer

Copy link
Copy Markdown

Addresses #369

@thawn

thawn commented Jun 9, 2026

Copy link
Copy Markdown
Owner

@ch-schiffer thank you so much ❤️
I will look into it after HAICON

@thawn thawn left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks again for this PR! It would be great if you could implement the comments below, so that I can merge the PR.

ctx: RunContext[RAGDeps],
topic_keywords: str,
n_results: int = 5,
n_results: Optional[int] = None,

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
n_results: Optional[int] = None,
n_results: Optional[int] = 5,

let's keep 5 as the default in case the user does not specify a number

"Use the available tools to search for papers, analyze topics, and understand trends. "
"Present the information in a clear, easy-to-understand format. "
f"Today's date is {datetime.now().strftime('%Y-%m-%d')}. "
"When the user requests a specific number of papers, pass that number as n_results "

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these instructions should not be in the base instructions but rather in the prompt for the search_papers mcp tool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants