Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Added 'for the current' to 'Best evidence(s)' to help agent understan…
…d they vary by question
  • Loading branch information
jamesbraza committed Sep 27, 2025
commit c6e2f3943e900fc4774841d5ef7497015f2303f0
6 changes: 5 additions & 1 deletion src/paperqa/agents/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,11 @@ async def gather_evidence(self, question: str, state: EnvironmentState) -> str:
]
)

best_evidence = f" Best evidence(s):\n\n{top_contexts}" if top_contexts else ""
best_evidence = (
f" Best evidence(s) for the current question:\n\n{top_contexts}"
if top_contexts
else ""
)

if f"{self.TOOL_FN_NAME}_completed" in self.settings.agent.callbacks:
await asyncio.gather(
Expand Down