Paper: https://arxiv.org/pdf/2501.05366The core idea of Search-o1 is to let the LLM autonomously decide when it lacks knowledge during reasoning, proactively generate search queries to call an external retrieval module for supplementary documents, and then—via a Reason-in-Documents module—analyze and refine long retrieval results, extract useful information, and inject it back into subsequent reasoning to reduce noise.
prompt/search_o1_reasoning.jinja
:
prompt/search_o1_refinement.jinja
:
reasoning_indoc_template
, remember to explicitly register it in servers/prompt/parameter.yaml
:
<|begin_search_result|>
…<|end_search_result|>
to the existing prompt:
servers/router/src/router.py
:
<|im_end|>
or <|end_search_query|>
are present.
servers/custom/src/custom.py
:
<search>
tag from the generated text.
examples/search_o1.yaml
:
examples/parameter/search_o1.yaml
and modify benchmark/retriever/generation as needed (or set defaults in each Server’s parameter.yaml
before build):