Stay Hungry,Stay Foolish!

node-DeepResearch (jina)

node-DeepResearch

https://github.com/jina-ai/node-DeepResearch

Keep searching, reading webpages, reasoning until an answer is found (or the token budget is exceeded). Useful for deeply investigating a query.

 

Important

Unlike OpenAI/Gemini/Perplexity's "Deep Research", we focus solely on finding the right answers via our iterative process. We don't optimize for long-form articles, that's a completely different problem – so if you need quick, concise answers from deep search, you're in the right place. If you're looking for AI-generated long reports like OpenAI/Gemini/Perplexity does, this isn't for you.

 
 
 

Whether you like this implementation or not, I highly recommend you to read DeepSearch/DeepResearch implementation guide I wrote, which gives you a gentle intro to this topic.

 

https://jina.ai/news/a-practical-guide-to-implementing-deepsearch-deepresearch

 

DeepSearch 通过搜索、阅读和推理的迭代循环运行,直到找到最优答案。搜索操作利用搜索引擎探索互联网,而阅读操作详细分析特定网页(例如 Jina Reader)。推理操作评估当前状态,并决定是否将原始问题分解为更小的子问题或尝试不同的搜索策略。

DeepSearch - 持续搜索、阅读网页、推理,直到找到答案(或超出 token 预算)。

虽然网上存在各种定义,但在开发 node-deepresearch 项目时,我们遵循了这种直接的方法。实现非常简单——其核心是一个主 while 循环,带有 switch-case 逻辑来指导下一步操作。

与 2024 年的 RAG 系统不同,后者通常只运行一次搜索-生成过程,DeepSearch 则通过管道执行多次迭代,需要明确的停止条件。这些条件可以基于 token 使用限制或失败尝试的次数。

 
 

在 search.jina.ai 尝试 deep search,观察 <thinking> 中的内容,看看你是否能发现循环发生的位置

看待 DeepSearch 的另一个角度是将其视为配备了各种网络工具(如搜索器和阅读器)的 LLM 代理。该代理通过分析当前观察和过去的行动来决定下一步——决定是提供答案还是继续探索网络。这创建了一个状态机架构,其中 LLM 控制状态之间的转换。在每个决策点,你有两种方法:你可以精心设计提示词让标准生成模型产生特定操作,或者利用像 Deepseek-r1 这样的专门推理模型来自然地推导出下一步操作。然而,即使使用 r1,你也需要定期中断其生成过程,将工具输出(例如搜索结果、网页内容)注入上下文中,并提示它继续其推理过程。

最终,这些只是实现细节——无论你是精心设计提示词还是直接使用推理模型,它们都符合 DeepSearch 的核心设计原则:搜索、阅读和推理的持续循环。

 

那么什么是 DeepResearch?

DeepResearch 在 DeepSearch 的基础上增加了生成长篇研究报告的结构化框架。它通常从创建目录开始,然后系统地将 DeepSearch 应用于每个所需部分——从引言到相关工作和方法论,一直到结论。每个部分都是通过将特定研究问题输入 DeepSearch 来生成的。最后阶段是将所有部分整合到单个提示中,以提高整体叙述的连贯性。

DeepSearch 作为 DeepResearch 的基础构建块。通过 DeepSearch 迭代构建每个章节,然后在生成最终长报告前改进整体连贯性。

在我们 2024 年的"Research"项目中,我们执行了多次连贯性改进,每次迭代都会考虑所有其他章节。然而,随着当今 LLM 上下文窗口显著增大,这种方法似乎显得多余——单次连贯性修订就足够了。

 
 

0:00

/0:40

我们 2024 年夏季的"Research"项目专注于使用"渐进式"方法生成长报告。它首先通过 sync 创建目录,然后 async 并行生成所有章节。最后通过 async 渐进式修订每个章节,每次修订都会考虑所有其他章节的内容。视频中的查询是 "Competitor analysis of Jina AI"

 

DeepSearch vs DeepResearch

虽然很多人经常将 DeepSearch 和 DeepResearch 混为一谈,但在我们看来,它们解决的是完全不同的问题。DeepSearch 作为一个原子构建块,是 DeepResearch 所依赖的核心组件。另一方面,DeepResearch 专注于制作高质量、可读性强的长篇研究报告,这涉及一系列不同的要求:通过图表和表格来整合有效的可视化内容,用适当的章节标题来组织内容,确保子章节之间的逻辑流畅,在整个文档中保持术语一致性,消除章节之间的冗余,制作连接前后内容的流畅过渡。这些元素与核心搜索功能基本无关,这就是为什么我们发现 DeepSearch 作为公司重点更有意思。

最后,下表总结了 DeepSearch 和 DeepResearch 之间的差异。值得注意的是,这两个系统都从长上下文和推理模型中获益良多。这可能看起来有些反直觉,特别是对 DeepSearch 而言——虽然 DeepResearch 需要长上下文能力(因为它产生长报告)是显而易见的。原因在于 DeepSearch 必须存储先前的搜索尝试和网页内容以做出关于下一步的明智决定,这使得长上下文窗口对其有效实现同样至关重要。

 DeepSearchDeepResearch
Problem Addressed Information accuracy and completeness through iterative search Content organization, coherence, and readability at document scale
Final Presentation Concise answer with URLs as references A long structured report with multiple sections, charts, tables and references
Core Complexity State machine architecture with clear transition conditions; Persistence through failed attempts until resolution Multi-level architecture managing both micro (search) and macro (document) concerns; Structural approach to managing complex information hierarchies
Optimization Focus Local optimization (best next search/read action) Global optimization (section organization, terminology consistency, transitions)
Limitations Bounded by search quality and reasoning capability Bounded by DeepSearch quality plus organizational complexity and narrative coherence challenges

 

了解 DeepSearch 实现

 

posted @ 2025-06-22 17:40  lightsong  阅读(11)  评论(0)    收藏  举报
千山鸟飞绝,万径人踪灭