rag
rag
Purpose
This skill implements Retrieval-Augmented Generation (RAG) for OpenClaw, enabling AI models to query external knowledge bases and integrate results into responses, enhancing accuracy for tasks like question-answering.
When to Use
Use this skill when your AI needs dynamic access to external data, such as querying a vector database for real-time information in NLP tasks, handling knowledge gaps in models, or augmenting responses in chatbots. Avoid it for purely generative tasks without external dependencies.
Key Capabilities
- Fetches documents from vector databases (e.g., Pinecone, FAISS) using similarity search.
- Integrates retrieved content into AI prompts for generation.
- Supports embedding models for query vectorization (e.g., via Hugging Face transformers).
- Handles chunking of large documents and relevance scoring.
- Configurable via JSON files for custom sources and thresholds.
Usage Patterns
Always set the API key via environment variable: export OPENCLAW_API_KEY=$SERVICE_API_KEY. For CLI, use openclaw rag with required flags. In code, import the skill and call methods like rag.retrieve(). Pattern: Query -> Retrieve -> Augment -> Generate. Ensure queries are under 512 tokens to avoid truncation.
More from alphaonedev/openclaw-graph
playwright-scraper
Playwright web scraping: dynamic content, auth flows, pagination, data extraction, screenshots
1.4Kgcp-iam
Manages identity and access control for Google Cloud resources using IAM policies and roles.
371humanize-ai-text
AI text humanization: reduce AI-detection patterns, natural phrasing, tone adjustment
264macos-automation
AppleScript, JXA, Shortcuts, Automator, osascript, System Events, accessibility API
174tavily-web-search
Tavily: web search optimized for AI agents, answer synthesis, domain filtering, depth control
156clawflows
OpenClaw workflow automation: multi-step task chains, conditional logic, triggers, schedule
102