knowledge-rag
Operate on BiSheng knowledge libraries, knowledge spaces, document ingestion, parser providers, RAG pipeline, Milvus/Elasticsearch recall, and knowledge workers.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- knowledge-rag
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Operate on BiSheng knowledge libraries, knowledge spaces, document ingestion, parser providers, RAG pipeline, Milvus/Elasticsearch recall, and knowledge workers.
- disable-model-invocation
- true
02 资源文件 3
- 参考文档references/troubleshooting.md3.2 KB
- 参考文档references/workflows.md3.3 KB
- 脚本scripts/check_knowledge_config.py1.5 KB
03 SKILL.md 正文
knowledge-rag
Use this sub-skill when a task touches BiSheng knowledge libraries, knowledge spaces, QA libraries, file upload/parse states, document parser providers, the Load → Transform → Ingest pipeline, Milvus + Elasticsearch dual recall, MinIO file artifacts, or knowledge_celery worker behavior.
Start here
Run bundled helper commands from this sub-skill directory, or adjust the script path to this directory after import.
- Inspect config-shaped text before debugging parser/storage problems:
python scripts/check_knowledge_config.py --config <bisheng-checkout>/docker/bisheng/config/config.yaml - Read references/workflows.md for ingestion, parser, retrieval, and worker workflows.
- Read references/troubleshooting.md for parser, object storage, vector index, queue, and permission symptoms.
Owned responsibilities
- Knowledge API/domain services under
src/backend/bisheng/knowledge/. - RAG pipeline files under
knowledge/rag/, especially file pipelines, loader/provider selection, transformers, Milvus and Elasticsearch factories. bisheng_langchain/rag/retrievers, RAG pipeline, scoring, and rerank integration when used by BiSheng knowledge workflows.- Knowledge Celery workers under
src/backend/bisheng/worker/knowledge/. - Tests under
src/backend/test/knowledge/,test/knowledge/rag/, and safe config/service tests. - Frontend knowledge-space or knowledge-library callers only at routing depth; UI rendering details belong to
frontend-apps.
Route sibling areas instead of duplicating them
- Use
identity-permissions-tenancyfor space visibility, OpenFGA/ReBAC, approval, tenant filtering, and cursor permission scans. - Use
workflow-enginefor workflow RAG node execution outside the knowledge pipeline itself. - Use
backend-corefor generic FastAPI router/envelope/service conventions. - Use
frontend-appsfor Platform/Client knowledge pages and request wrappers. - Use
deployment-maintenancefor Docker storage service startup and production config rollout.
Non-negotiables
- Treat Load, Transform, and Ingest as separate stages when debugging: a loader success does not prove vector writes or preview cache.
- Preserve Milvus dense and Elasticsearch sparse/BM25 behavior when changing retrieval.
- Do not run external parser services, OCR downloads, or large document parsing as a smoke check unless the environment is approved.
- Use small fixtures for tests; do not require production MinIO/Milvus/ES for unit-level parser or service logic.
- Keep parser-provider credentials, endpoints, and object-storage secrets out of skill output and committed test fixtures.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).