About Ultrarag
Ultrarag is an MCP server published by OpenBMB in the AI category: a Low-Code MCP Framework for Building Complex and Innovative RAG Pipelines. Conduid read 49 tools from its source: assign_citation_ids, assign_citation_ids_stateful, build_image_corpus, build_mineru_corpus, build_text_corpus, check_model_state and 43 more. No package is published for it, so it installs from a source checkout.
The repository has 5.8K stars and 461 forks, is licensed Apache-2.0, and its last commit was on 1 Dec 2026. The latest release is v0.3.0.3 (15 Sep 2026): Release date: 2026.9.15 Highlights This release expands UltraRAG’s retrieval and generation options with a Qdrant vector search backend, a dedicated LiteLLM generation b… It follows v0.3.0.2 (9 Apr 2026), and the 5 most recent releases go back to v0.2.1.3 (12 Jan 2026). It passes 4 of the 5 static checks Conduid ran on the repository; it does not pass Scoped permissions. Its topics include demo, embedding, deepseek, huggingface-transformers, flask and easy.
Install
git clone https://github.com/OpenBMB/UltraRAGTools (49)
assign_citation_idsAssign sequential citation IDs to passages.| Parameter | Type | Description |
|---|---|---|
| ret_psg * | array | List of lists of document strings |
assign_citation_ids_statefulReturn numbered passages and updated, JSON-serializable query state.| Parameter | Type | Description |
|---|---|---|
| citation_state * | array | |
| ret_psg * | array |
build_image_corpusBuild image corpus from PDF files by extracting pages as images.| Parameter | Type | Description |
|---|---|---|
| image_corpus_save_path * | string | Path where the image corpus JSONL file will be saved |
| parse_file_path * | string | Path to PDF file or directory containing PDF files |
build_mineru_corpusBuild text and image corpus from MinerU parsing results.| Parameter | Type | Description |
|---|---|---|
| image_corpus_save_path * | string | Path where the image corpus JSONL file will be saved |
| mineru_dir * | string | Directory containing MinerU parsing results |
| parse_file_path * | string | Original path to PDF file(s) that were parsed |
| text_corpus_save_path * | string | Path where the text corpus JSONL file will be saved |
build_text_corpusBuild text corpus from various file formats.| Parameter | Type | Description |
|---|---|---|
| parse_file_path * | string | Path to file or directory containing files to parse |
| text_corpus_save_path * | string | Path where the text corpus JSONL file will be saved |
check_model_stateCheck if model should continue or stop based on search token.| Parameter | Type | Description |
|---|---|---|
| ans_ls * | array | List of answer strings |
chunk_documentsChunk documents using various chunking strategies.| Parameter | Type | Description |
|---|---|---|
| chunk_backend | string | Chunking method to use ("token", "sentence", or "recursive") |
| chunk_backend_configs * | object | Dictionary of configuration for each chunking backend |
| chunk_path | string | Optional output path for chunked documents (defaults to project output directory) |
| chunk_size | integer | Target size for each chunk |
| raw_chunk_path * | string | Path to JSONL file containing documents to chunk |
| tokenizer_or_token_counter | string | Tokenizer name or counter type ("word", "character", or tiktoken encoding) |
| use_title | boolean | Whether to include document title in chunk content |
evaluateEvaluate predictions against ground truths using specified metrics.| Parameter | Type | Description |
|---|---|---|
| gt_ls * | array | List of ground truth lists (one per prediction) |
| metrics | array | List of metric names (acc, em, stringem, coverem, f1, rouge-1, rouge-2, rouge-l) |
| pred_ls * | array | List of prediction strings |
| save_path * | string | Path where results will be saved |
evaluate_trecEvaluate retrieval results in TREC format using IR metrics.| Parameter | Type | Description |
|---|---|---|
| ks | array | List of k values for recall@k, precision@k, ndcg@k (default: [1, 5, 10, 20, 50, 100]) |
| metrics | array | List of IR metrics (mrr, map, recall, ndcg, precision) |
| qrels_path * | string | Path to TREC qrels file |
| run_path * | string | Path to TREC run file |
| save_path * | string | Path where results will be saved |
evaluate_trec_pvalueCompare two TREC run files using permutation test to calculate p-values.| Parameter | Type | Description |
|---|---|---|
| ks | array | List of k values for recall@k, precision@k, ndcg@k (default: [1, 5, 10, 20, 50, 100]) |
| metrics | array | List of IR metrics to compare |
| n_resamples | integer | Number of resampling iterations for permutation test (default: 10000) |
| qrels_path * | string | Path to TREC qrels file |
| run_new_path * | string | Path to new TREC run file (system A) |
| run_old_path * | string | Path to old TREC run file (system B) |
| save_path * | string | Path where results will be saved |
evisrag_output_extract_from_specialExtract content from <answer>...</answer> tags for EvisRAG.| Parameter | Type | Description |
|---|---|---|
| ans_ls * | array | List of answer strings that may contain <answer>...</answer> tags |
get_global_memoryRead global memory from MEMORY.md.| Parameter | Type | Description |
|---|---|---|
| user_id | string | User identifier. Defaults to "default". |
greetGreet a person by name.| Parameter | Type | Description |
|---|---|---|
| name * | string | Name of the person to greet |
init_citation_registryCreate per-query citation state owned by this pipeline execution.| Parameter | Type | Description |
|---|---|---|
| q_ls * | array |
ircot_check_endCheck if IRCoT answers are complete based on completion phrase.| Parameter | Type | Description |
|---|---|---|
| ans_ls * | array | List of answer strings |
ircot_extract_ansExtract final answer from IRCoT responses using 'so the answer is' pattern.| Parameter | Type | Description |
|---|---|---|
| ans_ls * | array | List of answer strings |
ircot_get_first_sentExtract first sentence from answers for IRCoT pipeline.| Parameter | Type | Description |
|---|---|---|
| ans_ls * | array | List of answer strings |
iterretgen_nextqueryGenerate next query by combining previous query with answer.| Parameter | Type | Description |
|---|---|---|
| ans_ls * | array | List of answers corresponding to queries |
| q_ls * | array | List of previous queries |
merge_passagesMerge temporary passages into retrieved passages.| Parameter | Type | Description |
|---|---|---|
| ret_psg * | array | List of retrieved passage lists to merge into |
| temp_psg * | array | List of temporary passage lists |
mineru_parseParse PDF files using MinerU tool.| Parameter | Type | Description |
|---|---|---|
| mineru_dir * | string | Output directory for MinerU parsing results |
| mineru_extra_params | object | Optional dictionary of extra parameters for MinerU command |
| parse_file_path * | string | Path to PDF file or directory containing PDF files |
output_extract_from_boxedExtract content from LaTeX \\boxed{} expressions in answers.| Parameter | Type | Description |
|---|---|---|
| ans_ls * | array | List of answer strings that may contain \\boxed{...} expressions |
r1_searcher_checkCheck if r1_searcher answers are complete based on EOS tokens.| Parameter | Type | Description |
|---|---|---|
| ans_ls * | array | List of answer strings to check |
r1_searcher_query_extractExtract search queries from answer list using <|begin_of_query|> tags.| Parameter | Type | Description |
|---|---|---|
| ans_ls * | array | List of answer strings that may contain <|begin_of_query|>...</|begin_of_query|> tags |
route1Route queries to state1 or state2 based on query value.| Parameter | Type | Description |
|---|---|---|
| query_list * | array | List of query strings |
route2Route all queries to state2.| Parameter | Type | Description |
|---|---|---|
| query_list * | array | List of query strings |
save_memorySave one round of user-assistant dialogue into daily project memory.| Parameter | Type | Description |
|---|---|---|
| ans_ls * | array | Current round answer. |
| q_ls * | array | Current round question. |
| user_id * | string | User identifier. Defaults to "default". |
search_o1_checkCheck if Search O1 should stop or continue retrieving.| Parameter | Type | Description |
|---|---|---|
| ans_ls * | array | List of answer strings |
| q_ls * | array | List of query strings |
| total_final_info_list * | array | List of final info lists |
| total_reason_list * | array | List of reasoning lists |
| total_subq_list * | array | List of sub-question lists |
search_o1_combine_final_informationCombine extracted final information into total list for Search-o1.| Parameter | Type | Description |
|---|---|---|
| extract_final_infor_list * | array | New final information to add |
| total_final_info_list * | array | List of lists to accumulate final information |
search_o1_combine_listCombine extracted queries and reasons into total lists for Search-o1.| Parameter | Type | Description |
|---|---|---|
| extract_query_list * | array | New queries to add |
| extract_reason_list * | array | New reasons to add |
| total_reason_list * | array | List of lists to accumulate reasons |
| total_subq_list * | array | List of lists to accumulate subqueries |
search_o1_extract_final_informationExtract final information section from answers for Search-o1.| Parameter | Type | Description |
|---|---|---|
| ans_ls * | array | List of answer strings that may contain **Final Information** section |
search_o1_init_listInitialize lists for Search-o1 pipeline.| Parameter | Type | Description |
|---|---|---|
| q_ls * | array | List of queries |
search_o1_query_extractExtract search queries from answers using Search-o1 tags.| Parameter | Type | Description |
|---|---|---|
| ans_ls * | array | List of answer strings containing <|begin_search_query|>...</|end_search_query|> tags |
search_o1_reasoning_extractExtract reasoning content before search query tags for Search-o1.| Parameter | Type | Description |
|---|---|---|
| ans_ls * | array | List of answer strings |
search_r1_checkCheck if search-r1 answers are complete based on EOS tokens.| Parameter | Type | Description |
|---|---|---|
| ans_ls * | array | List of answer strings to check |
search_r1_query_extractExtract search queries from answer list using <search> tags.| Parameter | Type | Description |
|---|---|---|
| ans_ls * | array | List of answer strings that may contain <search>...</search> tags |
surveycpm_after_extendProcess responses after extend-plan action in SurveyCPM pipeline.| Parameter | Type | Description |
|---|---|---|
| instruction_ls * | array | List of user instructions |
| response_ls * | array | List of LLM response strings |
| survey_ls * | array | List of survey JSON strings |
| surveycpm_hard_mode | boolean | Whether to use strict validation |
surveycpm_after_init_planProcess responses after init-plan action in SurveyCPM pipeline.| Parameter | Type | Description |
|---|---|---|
| instruction_ls * | array | List of user instructions |
| response_ls * | array | List of LLM response strings |
| survey_ls * | array | List of survey JSON strings |
| surveycpm_hard_mode | boolean | Whether to use strict validation |
surveycpm_after_writeProcess responses after write action in SurveyCPM pipeline.| Parameter | Type | Description |
|---|---|---|
| cursor_ls | array | List of cursor positions |
| instruction_ls * | array | List of user instructions |
| response_ls * | array | List of LLM response strings |
| retrieved_info_ls * | array | List of retrieved information strings |
| survey_ls * | array | List of survey JSON strings |
| surveycpm_hard_mode | boolean | Whether to use strict validation |
surveycpm_check_completionCheck completion status based on step count only.| Parameter | Type | Description |
|---|---|---|
| state_ls * | array | |
| step_ls * | array | |
| surveycpm_max_step | integer |
surveycpm_format_outputFormat final survey output as clean Markdown.| Parameter | Type | Description |
|---|---|---|
| instruction_ls * | array | |
| survey_ls * | array |
surveycpm_init_citation_registryInitialize citation registry for SurveyCPM pipeline.| Parameter | Type | Description |
|---|---|---|
| instruction_ls * | array | List of instructions |
surveycpm_parse_search_responseParse search responses from LLM for SurveyCPM pipeline.| Parameter | Type | Description |
|---|---|---|
| response_ls * | array | List of LLM response strings |
| surveycpm_hard_mode | boolean | Whether to use strict validation |
surveycpm_process_passagesProcess and deduplicate passages for SurveyCPM pipeline.| Parameter | Type | Description |
|---|---|---|
| ret_psg_ls * | array | List of lists of passage lists (one per query) |
surveycpm_process_passages_with_citationProcess passages and assign unique citation IDs for SurveyCPM.| Parameter | Type | Description |
|---|---|---|
| ret_psg_ls * | array | |
| survey_ls * | array |
surveycpm_state_initInitialize state for SurveyCPM pipeline.| Parameter | Type | Description |
|---|---|---|
| instruction_ls * | array | List of user instructions |
surveycpm_state_routerRoute SurveyCPM state variables based on current state.| Parameter | Type | Description |
|---|---|---|
| cursor_ls * | array | List of cursor positions (may be None) |
| extend_result_ls * | array | List of extend result strings |
| extend_time_ls * | array | List of extend time values |
| state_ls * | array | List of state strings |
| step_ls * | array | List of step numbers |
| survey_ls * | array | List of survey JSON strings |
surveycpm_update_stateUpdate state based on cursor and extend results.| Parameter | Type | Description |
|---|---|---|
| cursor_ls | array | |
| extend_result_ls * | array | |
| extend_time_ls * | array | |
| parsed_ls * | array | |
| state_ls * | array | |
| step_ls * | array | |
| surveycpm_max_extend_step | integer | |
| surveycpm_max_step | integer |
webnote_check_pageCheck if WebNote pages are complete or incomplete.| Parameter | Type | Description |
|---|---|---|
| page_ls * | array | List of page strings to check |
webnote_check_page_with_citationsRoute each WebNote page and its citation state through the same branch.| Parameter | Type | Description |
|---|---|---|
| citation_state * | array | |
| page_ls * | array |
Security checks
Static checks derived from the repository 7 days ago. Heuristics on the source, not an audit.
- ✓README presentThe repository's README runs to about 2.1K words.
- ✓License declaredThe repository declares the Apache-2.0 license.
- ✓Tests presentA test suite exists in the repository.
- ✓Dependencies pinnedDependency versions are pinned by uv.lock and ui/frontend/package-lock.json.
- !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.
1 check has not been run yet.
Releases
README
The repository's README runs to about 2.1K words, fetched 7 days ago. The original in the repository is authoritative.
Read full README