AGENT SKILL

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

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

  1. Confirm that an environment has DeepSearcher installed and that provider/vector DB setup and data loading were already handled.
  2. Pick the API surface:
    • Global convenience API: deepsearcher.online_query.query, retrieve, naive_retrieve, or naive_rag_query.
    • Manual agents: DeepSearch, ChainOfRAG, NaiveRAG, or RAGRouter when you already have llm, embedding_model, and vector_db objects.
  3. Choose the lowest-cost agent that can answer the request:
    • NaiveRAG for cheap direct retrieval plus one summarization call.
    • DeepSearch for broad reports or surveys where sub-query expansion and reflection are useful.
    • ChainOfRAG for factual or multi-hop questions where intermediate answers and support-doc filtering matter.
    • RAGRouter when you want an LLM to select among multiple RAG agents from descriptions.
  4. Inspect returned references before trusting an answer. Query APIs return RetrievalResult objects whose text, reference, metadata, and score fields 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_text behavior.
  • 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 NaiveRAG and DeepSearch using 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

VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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).

★ 351