The Problem with Search
We all do it. You open Google, type a query, open 10 tabs, skim-read them, close 8, and try to synthesize the remaining 2 into a mental model. It’s inefficient. It’s manual. It’s the “old way.”
What if an AI could do the “tab opening” and “synthesis” for you? Not just a summary of one page, but a Deep Dive across multiple domains?
That’s why I built the DeepDive Research Agent.
The Architecture of Intelligence
This isn’t just a wrapper around GPT-4. It’s a structured Agentic Workflow built with the Google Agent Development Kit (ADK). The key differentiator is the architecture. It doesn’t just “think”; it follows a rigorous research methodology.
Here is the high-level design I implemented:
graph TD
User[User Query] --> Router(Router Agent)
Router -->|General| Web[Web Search]
Router -->|Academic| Arxiv[ArXiv Search]
Router -->|Technical| Scholar[Google Scholar]
Web & Arxiv & Scholar --> Aggregator
Aggregator --> Loop{Research Loop}
Loop --> Researcher
Researcher --> Critic
Critic -->|Refine| Researcher
Critic -->|Approved| Final[Final Report]
Stage 1: The Router (The Traffic Controller)
Most agents fail because they treat every query the same. A question about “Latest React Hooks” needs different sources than “Quantum Entanglement History.”
My Router Agent (an LlmAgent with temperature 0.3) analyzes the semantic intent of the query. It decides where to look before it even starts looking.
Stage 2: Parallel Execution
Speed matters. Instead of searching sources sequentially, I implemented a ParallelAgent. It spins up three distinct sub-agents simultaneously:
- Web Searcher: For broad context and news.
- ArXiv Agent: For pre-print papers and bleeding-edge CS/Math.
- Scholar Agent: For established academic citations.
They scour the web in parallel, creating a massive context window of raw data.
Stage 3: The Critic Loop (The Quality Control)
This is the magic moment. Most LLMs hallucinate or get lazy. To fix this, I built a LoopAgent.
It consists of two personas:
- The Researcher: Drafts the report based on the gathered data.
- The Critic: ruthlessly reviews the draft. It checks for citation accuracy, logical flow, and “depth.”
If the Critic isn’t satisfied, it rejects the draft and sends it back to the Researcher with specific feedback. This loop continues until the quality threshold is met or a maximum iteration count is reached.
The Results
The difference is stark. A standard LLM output is generic. The DeepDive Agent’s output is:
- Cited: Every claim links back to a source.
- Nuanced: It synthesizes conflicting viewpoints from the Parallel search.
- Self-Corrected: The Critic loop catches logical fallacies before the user sees them.
Future of Work
This project represents the shift from Chatbots to Agentic Systems. We aren’t just talking to AI anymore; we are designing the cognitive architectures that allow AI to do meaningful work.
The DeepDive Research Agent is open-source and available in my Agents HQ repository.
About Sharad Jain
Sharad Jain is an AI Engineer and Data Scientist specializing in enterprise-scale generative AI and NLP. Currently leading AI initiatives at Autoscreen.ai, he has developed ACRUE frameworks and optimized LLM performance at scale. Previously at Meta, Autodesk, and WithJoy.com, he brings extensive experience in machine learning, data analytics, and building scalable AI systems. He holds an MS in Business Analytics from UC Davis.