rag-query
Use and troubleshoot DeepSearcher query, retrieve, and RAG agent workflows.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- rag-query
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Use and troubleshoot DeepSearcher query, retrieve, and RAG agent workflows.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/agent-behavior.md8.0 KB
- 参考文档references/api-reference.md7.3 KB
- 参考文档references/troubleshooting.md8.8 KB
- 参考文档references/workflows.md7.8 KB
- 脚本scripts/mock_rag_smoke.py9.3 KB
03 SKILL.md 正文
DeepSearcher RAG Query
Use this sub-skill when a task is about asking questions over already-loaded DeepSearcher data, retrieving references, choosing or instantiating RAG agents, tuning iteration/token tradeoffs, or diagnosing query-time failures.
Do not use this sub-skill for ingestion, provider configuration, CLI/service operation, or benchmark evaluation. Route those to the sibling sub-skills listed below.
Start Here
- Confirm that an environment has DeepSearcher installed and that provider/vector DB setup and data loading were already handled.
- Pick the API surface:
- Global convenience API:
deepsearcher.online_query.query,retrieve,naive_retrieve, ornaive_rag_query. - Manual agents:
DeepSearch,ChainOfRAG,NaiveRAG, orRAGRouterwhen you already havellm,embedding_model, andvector_dbobjects.
- Global convenience API:
- Choose the lowest-cost agent that can answer the request:
NaiveRAGfor cheap direct retrieval plus one summarization call.DeepSearchfor broad reports or surveys where sub-query expansion and reflection are useful.ChainOfRAGfor factual or multi-hop questions where intermediate answers and support-doc filtering matter.RAGRouterwhen you want an LLM to select among multiple RAG agents from descriptions.
- Inspect returned references before trusting an answer. Query APIs return
RetrievalResultobjects whosetext,reference,metadata, andscorefields explain what was used.
Reference Map
- API reference: signatures, return shapes, constructors,
RetrievalResult, and router APIs. - Workflows: query/retrieve patterns, agent selection, token controls, and no-result handling.
- Agent behavior: DeepSearch, ChainOfRAG, NaiveRAG, RAGRouter, CollectionRouter, and
wider_textbehavior. - Troubleshooting: parse failures, no results, collection routing, wrapper caveats, token issues, notebook async issues, and relevant compatibility warnings.
- Mock smoke helper: no-network return-shape smoke checks for
NaiveRAGandDeepSearchusing mock LLM, embedding, and vector DB objects.
Safe Smoke Check
Run the bundled helper only in an environment with DeepSearcher installed. It uses in-memory mocks, performs no network calls, and does not require credentials:
python scripts/mock_rag_smoke.py --agent naive --format json
python scripts/mock_rag_smoke.py --agent deep-search --max-iter 1
Route Elsewhere
- Data loading, chunking, file/web sources, and collection creation: use
data-ingestion. - Provider credentials, model classes, embedding dimensions, and vector DB connection setup: use
provider-configuration. - Console script behavior, CLI help, service deployment, and API server usage: use
cli-and-service. - Benchmark metrics, recall/error/token plots, and evaluation scripts: use
evaluation.
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).