Abstract
Current Deep Research Tools (DRTs) often operate as "black boxes" with hard-coded logic and model lock-in. This paper introduces Universal Deep Research (UDR), a framework that shifts from LLM-driven agency to code-enforced agency. By allowing users to define research strategies in natural language—which are then compiled into executable Python code—UDR provides a flexible, auditable, and model-agnostic system for complex information synthesis.
Introduction
The landscape of AI-driven research has been transformed by tools like OpenAI’s Deep Research and Perplexity. These systems automate the process of searching, reading, and synthesizing information. However, for professional applications in fields like law, medicine, or finance, current consumer-grade DRTs exhibit three significant limitations:
- Rigidity: Research strategies (e.g., prioritizing peer-reviewed journals over blogs) are hard-coded by developers.
- Model Lock-in: Systems are typically tied to a specific model family (e.g., GPT-4o or Gemini), preventing the use of open-source or domain-specific models.
- The "Shortcut" Problem: When LLMs orchestrate their own research, they often take shortcuts, skip verification steps, or hallucinate progress to reach a conclusion faster.
UDR aims to close this functionality gap by providing a framework where the user is in control of the research "algorithm."
Methodology: From LLM Agency to Code Agency
The core innovation of UDR is the transition from LLM agency (where the model decides the next step) to code agency (where generated code enforces the steps). The process occurs in two distinct phases:
- Phase 1: Strategy Processing (The Compiler): The user provides a research strategy in natural language. A "Strategy Compiler" (an LLM) converts these instructions into a single, executable Python function. This function acts as a generator that yields status updates and eventually the final report.
- Phase 2: Strategy Execution (The Orchestrator): The generated code is executed in a sandboxed environment. Crucially, the LLM is treated as a callable utility rather than the controller. The code handles the control flow (loops, searches, variable storage), while the LLM is only called for localized reasoning tasks like summarization or ranking.
By storing intermediate data in persistent code variables rather than one massive context window, UDR can perform complex research using a context length of only 8k tokens, making it highly efficient.
Bring Your Own Strategy
UDR empowers users to specify exactly how research should be conducted. Whether a user needs a "Minimal" search, an "Expansive" breadth-first exploration, or an "Intensive" deep dive, they can define these requirements in plain text. This allows for the enforcement of specific constraints, such as cross-referencing financial claims with SEC filings or ensuring every technical claim has a primary source citation.
Key Insights and Results
- Separation of Concerns: By isolating control logic (CPU/Python) from reasoning (GPU/LLM), the system gains reliability. The code doesn't "get bored" or skip steps like an autonomous LLM might.
- Interpretability and Auditability: Because the strategy is converted into code, it is fully inspectable. The "yield" statements in the code provide a deterministic, user-auditable stream of events during execution.
- Model Agnostic: UDR can wrap around various models (e.g., Llama 3.3 70B) to produce high-quality, structured Markdown reports with citations, regardless of the underlying model's native agency capabilities.
Conclusion and Future Work
Universal Deep Research represents a significant step toward transparent and customizable AI agents. While the system's success depends on the quality of the initial code generation, it provides a level of control not found in commercial black-box tools. Future work will explore the use of "thinking" models (like o1 or DeepSeek-R1) to further refine the strategy compilation process and allow for mid-execution user intervention.
Summary updated