βImplement arXiv search, claim cross-referencing, and automated citation generation to expand our Autonomous Deep Research Agent's research tool belt with academic search and evidence-mapping capabilitβ
As we continue building our Autonomous Deep Research Agent, the next step is expanding its research capabilities beyond web search. In this episode, we implement three important utilities: arXiv search, claim cross-referencing, and automatic citation generation.
We begin by implementing an academic paper search tool using the arXiv Python library. Since arXiv has request limitations, we introduce a custom throttling mechanism that ensures a minimum delay between requests.
The library operates synchronously, which could block our asynchronous FastAPI application. To avoid this, we execute the search operation in a separate background thread using Python's run_in_executor.
The search results are then converted into our structured SourceDoc format, storing paper URLs, titles, abstracts, confidence scores, and relevant metadata such as authors, publication dates, and categories.
Next, we build a utility for the Critic Agent. It takes a list of claims and collected source documents, extracts relevant keywords from each claim, and compares them against source titles and snippets.
When a source contains at least two matching keywords, it is considered a potential supporting source. The function returns a mapping between claims and the URLs of sources that potentially support them.
This is a simple heuristic-based approach for our MVP, not a semantic verification system. It provides a starting point for the Critic Agent to identify sources relevant to individual claims.
Our final utility generates structured citations for research reports. It iterates through collected sources, removes duplicate URLs, assigns sequential citation IDs, and stores citation information such as title, URL, source type, and confidence score.
This allows the Writer Agent to reference sources consistently without repeatedly citing the same URL.
With these implementations, our tool belt now includes web search, arXiv search, domain confidence scoring, claim cross-referencing, and citation generation.
These tools form the foundation for our upcoming Researcher and Critic agents, which will use them to gather evidence, examine claims, and produce structured research reports.
Project Repository: https://github.com/snsupratim/research-agent
Documentation: https://www.sndev.co/project/988de038-1e9a-4411-aac5-828477b52df8
Continue following "Deep Research Agent" with Building the Researcher Agent with Web Search, arXiv & Source Ranking | Deep Research Agent Part 8.
Ask questions, discuss architecture, and share insights with other developers.
Sign in to join the discussion and share your thoughts with other developers.
Sign In to Comment