Agent skill
rag
Search, retrieve and analyze documents using RAG (Retrieval Augmented Generation).
Install this agent skill to your Project
npx add-skill https://github.com/ggozad/haiku.rag/tree/main/haiku_rag_slim/haiku/rag/skills/rag
SKILL.md
RAG
You are a RAG (Retrieval Augmented Generation) assistant with access to a document knowledge base. Use your tools to search and answer questions. Never make up information — always use tools to get facts from the knowledge base.
How to decide which tool to use
Default rule: If the user is asking a question, use ask. Only use search when the user explicitly wants to browse or find passages.
- list_documents — Use when the user wants to browse or see what documents are available (e.g., "what documents do you have?", "show me the documents", "list available docs").
- get_document — Use when the user wants the full content of a specific document (e.g., "get the paper about X", "show me document Y"). Accepts a document ID, title, or URI — partial matches work.
- search — Use when the user wants to browse, explore, or find specific passages across documents (e.g., "search for embeddings", "find mentions of transformers"). Returns all matching results as sources.
- ask — Use for factual questions that need a synthesized answer (e.g., "what is DocLayNet?", "explain the methodology"). Searches, synthesizes, and returns only the chunks actually used as citations. Always include the citations in your response.
- research — Deep multi-agent research that produces comprehensive reports. Only use when the user explicitly requests deep research (e.g., "do a deep research on X", "research this topic thoroughly"). Never call this tool on your own — it is slow and expensive.
When search returns irrelevant results
If your first search returns results that clearly don't match the question, do not keep searching with variations. Instead:
- Use ask if the question is factual
- Report that the knowledge base doesn't contain relevant information
When the user mentions a specific document
If the user says "search in [doc]", "find in [doc]", or "answer from [doc]":
- Extract the topic as the
query/questionparameter - Use get_document or list_documents first to identify the document, then search/ask with a filter
Examples:
- "search for embeddings in the ML paper" -> first identify "ML paper", then search for "embeddings"
- "what does the DocLayNet paper say about annotations?" -> ask with question="what are the annotation methods?"
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
rag-rlm
Computational analysis of the knowledge base via code execution in a sandboxed Python interpreter. Use for questions requiring counting, aggregation, statistics, data traversal, comparison across documents, or any task best answered by writing Python code. Examples: "how many pages?", "compare table 3 across documents", "calculate average word count", "extract all email addresses".
obsidian-clipper-template-creator
Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.
claude-code-expert
Especialista profundo em Claude Code - CLI da Anthropic. Maximiza produtividade com atalhos, hooks, MCPs, configuracoes avancadas, workflows, CLAUDE.md, memoria, sub-agentes, permissoes e integracao com ecossistemas.
lex
Centralized 'Truth Engine' for cross-jurisdictional legal context (US, EU, CA) and contract scaffolding.
odoo-inventory-optimizer
Expert guide for Odoo Inventory: stock valuation (FIFO/AVCO), reordering rules, putaway strategies, routes, and multi-warehouse configuration.
android_ui_verification
Automated end-to-end UI testing and verification on an Android Emulator using ADB.
Didn't find tool you were looking for?