knowledge-query

Retrieves Ascend C and CANN operator knowledge cards via deterministic multi-route search.

Updated Sep 15, 2026
One-click install
npx skills add https://github.com/WangWindow/CANN-BatchMatMulMaxsum --skill knowledge-query-wangwindow
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: knowledge-query
Source: https://github.com/WangWindow/CANN-BatchMatMulMaxsum/tree/main/.agents/skills/knowledge-query
Command: npx skills add https://github.com/WangWindow/CANN-BatchMatMulMaxsum --skill knowledge-query-wangwindow

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? When developing Ascend C/CANN operators for Ascend NPU hardware, engineers need verified evidence about API signatures, Tiling constraints, data movement rules, debugging fixes, and similar operator examples before writing or changing code. This Skill provides a read-only retrieval entry point over a structured knowledge base, turning a task description into short queries, ranked evidence cards, and graph neighbors so answers are grounded in documented sources instead of guesses. ## Core Features & Use Cases - Preflight retrieval planning: Converts a task, error, or question into a search route, read-first card list, relevance signals, and follow-up commands before any reasoning or coding begins. - Composable retrieval pipeline: Supports BM25/TF-IDF/tag-type/graph/dense recall, deterministic reranking, regex grep, multi-hop graph neighbors, and scoped filtering by bundle, kind, tags, or A3 platform. - Evidence-ordered API verification: Enforces a knowledge-base-first, fixed-revision-upstream-second, local-CANN-install-last evidence order for API and platform constraint checks. - Use Case: While implementing a BatchMatmulMaxSum operator kernel, run preflight with the task description to retrieve DataCopyPad usage cards, Tiling partitioning guides, similar operator examples, and known precision traps before writing the kernel. ## Quick Start Ask the assistant to run the knowledge-query preflight for your current Ascend C operator task, for example by requesting a knowledge base check on DataCopyPad alignment constraints before implementing the kernel.

Frequently Asked Questions about knowledge-query

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I look up Ascend C API signatures and constraints before coding?

Run the knowledge_query.py preflight command with your task description, then read the read_first cards it returns. For a specific symbol, use search with a single short query and confirm with grep before calling get on the card doc-id.

How do I find similar Ascend C operator implementation examples?

Use the pipeline command with bm25 and tagtype recall scoped to the ops/ directory, then expand context with the neighbors command. The similar_examples mode file documents this exact retrieval recipe.

Does the retrieval support filtering for the 910C Atlas A3 platform?

Yes. When a task mentions 910C, Atlas A3, or A3, preflight automatically enables a platform filter that excludes cards strictly marked platforms: [950]. You can also pass --platform a3 explicitly to search, grep, pipeline, and neighbors commands.

Why does the search command reject multiple query arguments?

Search enforces one intent per call so candidate APIs, domain hints, and the main operator intent are not mixed into one ranking. Use preflight or pipeline for multi-route evidence, or run separate searches per symbol.

What are the limitations of the dense and LLM rerank routes?

Dense embedding and LLM judge routes are opt-in and non-deterministic, requiring an API key or Claude Code SDK configuration. Without configuration they return a structured not_configured error, and the deterministic bm25f default chain remains the recommended path.