| name | sb-query |
| description | Query the LLM Wiki and synthesize answers. Use when asked to "query", "search wiki", "ask question", "find in wiki", "what do we know about", "compare". Searches existing pages and generates answers. |
LLM Wiki Query
Search the wiki and synthesize answers to user questions.
Prerequisites
- Read
AGENTS.md to understand wiki conventions
- Read
wiki/index.md to understand what pages exist
- User has asked a question
Step 1: Understand the Query
Classify the query type:
| Type | Description | Example |
|---|
| Lookup | Find specific fact or page | "What is attention mechanism?" |
| Synthesis | Combine info from multiple pages | "How do neural networks relate to transformers?" |
| Comparison | Contrast two or more topics | "Compare RNNs vs Transformers" |
| List | Find all pages matching criteria | "All papers about reinforcement learning" |
| Gap | Identify what's missing | "What don't we know about X?" |
Ask clarifying questions if the query is ambiguous.
Step 2: Find Relevant Pages
-
Read wiki/index.md โ scan for relevant categories
-
Read relevant pages directly:
- Check
wiki/sources/ for source summaries
- Check
wiki/concepts/ for concept pages
- Check
wiki/entities/ for entity pages
- Check
wiki/synthesis/ for derived knowledge
-
Use simple grep for keyword search:
grep -r "keyword" wiki/ --include="*.md"
-
For large wikis, if qmd search is available:
qmd search "query terms"
Step 3: Synthesize Answer
Read all relevant pages, then synthesize:
## Answer: [Question]
### Summary
[2-3 sentence answer]
### Details
[Expanded explanation with citations]
### Sources
- [[source-page]] โ [relevant quote or idea]
- [[source-page]] โ [relevant quote or idea]
### Confidence
- HIGH: Found clear, direct evidence in wiki
- MEDIUM: Inferred from multiple partial matches
- LOW: Incomplete information in wiki
Step 4: Ask About Filing
After delivering the answer, ask:
"Would you like to save this answer to the wiki? I can create a page in synthesis/ with this analysis."
If yes:
- Generate filename:
synthesis/query-[YYYY-MM-DD]-[short-topic].md
- Create page with the synthesized answer
- Update
wiki/index.md
- Log to
wiki/log.md
Wikilink Rules
- Always use kebab-case:
[[neural-networks]]
- Link to existing pages only: if referencing new concept, either create a stub or note it
- Cite sources: always link to source pages when making claims
Exit Criteria
- Answer delivered to user
- Optional: new synthesis page created
- If new pages created:
wiki/index.md updated, wiki/log.md appended
No Results
If wiki has no relevant information:
- Be honest: "The wiki doesn't contain information about X yet."
- Suggest: "Want me to search the web for this, or should we file it as a knowledge gap?"
- Optionally create a placeholder stub in
synthesis/ or concepts/