Skip to main content

route1 / route2

Signature
Function
  • Basic routing examples.
  • route1: If query content is “1”, state set to “state1”, otherwise “state2”.
  • route2: Forces state to “state2”.

ircot_check_end

Signature
Function
  • IRCoT process check.
  • Checks if answer contains "so the answer is" (case insensitive).
  • If contained, marks state as "complete", otherwise "incomplete".

search_r1_check

Signature
Function
  • Checks if Search-R1 generation has ended.
  • Criteria: Text contains <|endoftext|> or <|im_end|>.
  • If condition met, marks as "complete", otherwise "incomplete".

webnote_check_page

Signature
Function
  • WebNote process check.
  • If page content contains "to be filled" (case insensitive), marks as "incomplete", otherwise "complete".

r1_searcher_check

Signature
Function
  • Checks if R1-Searcher generation has ended.
  • Criteria: Text contains <|endoftext|>, <|im_end|> or </answer>.
  • If condition met, marks as "complete", otherwise "incomplete".

search_o1_check

Signature
Function
  • Search-o1 process state check.
  • Checks special markers in answer:
    • If contains <|end_search_query|>: State set to "retrieve" (continue retrieval).
    • If contains <|im_end|> or other cases: State set to "stop" (stop retrieval, output answer).
  • Synchronously updates state for all associated lists (q_ls, subq, reason, info).

check_model_state

Signature
Function
  • General model state check.
  • If answer contains <search> tag, marks state as "continue", otherwise "stop".

surveycpm_state_router

Signature
Function
  • SurveyCPM dedicated router.
  • This is a Pass-through tool that packages all input list elements (state, cursor, outline, etc.) into a dictionary with a "state" field.
  • Purpose: To enable UltraRAG framework to automatically dispatch data to corresponding Pipeline branches based on the state field.