Feat: Compilation benefit naive rag. (#17555)

### Summary

Compilation benifit naive rag

---------

Co-authored-by: Yingfeng Zhang <yingfeng.zhang@gmail.com>
This commit is contained in:
Kevin Hu
2026-07-30 18:39:01 +08:00
committed by GitHub
parent 1667d1495f
commit 3f8a3dfcff
16 changed files with 901 additions and 196 deletions

View File

@@ -1,7 +1,7 @@
kind: artifacts
display_name: Artifacts — Graph-based wiki
kind: wiki
display_name: Wiki — Graph-based wiki
config:
kind: artifacts
kind: wiki
example: |
- Each page must be a proper encyclopedic article, NOT a flat bullet list:
- 1. Opening paragraph (2-4 sentences defining what this is). No heading.

View File

@@ -39,10 +39,10 @@ def _derive_scope(templates: list[dict]) -> str:
if not templates:
raise GroupValidationError("A template group must contain at least one template.")
kinds = [str((t or {}).get("kind") or "").strip() for t in templates]
artifact_count = sum(1 for k in kinds if k == "artifacts")
artifact_count = sum(1 for k in kinds if k == "wiki")
if artifact_count > 0:
if artifact_count != 1 or len(templates) != 1:
raise GroupValidationError("An artifacts template cannot be combined with other templates in the same group.")
raise GroupValidationError("A wiki template cannot be combined with other templates in the same group.")
return SCOPE_DATASET
_enforce_single_rechunk_tree(templates)

View File

@@ -1225,7 +1225,7 @@ def queue_raptor_o_graphrag_tasks(sample_doc, ty, priority, fake_doc_id="", doc_
"graphrag",
"raptor",
"mindmap",
"artifact",
"wiki",
"skill",
# KB-wide structure-graph merge task types (rebuild dataset_graph rows).
"structure_graph",