rune-ext-ai-ml

Implements LLM integration, RAG pipelines, embedding search, fine-tuning, and sandboxed AI agent workflows.

1|Updated Mar 22, 2026
One-click install
npx skills add https://github.com/dangvu008/VietTruyen --skill rune-ext-ai-ml-dangvu008
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rune-ext-ai-ml
Source: https://github.com/dangvu008/VietTruyen/tree/main/.agents/skills/rune-ext-ai-ml
Command: npx skills add https://github.com/dangvu008/VietTruyen --skill rune-ext-ai-ml-dangvu008

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? AI-powered features fail in predictable ways: LLM calls crash on rate limits without retry logic, RAG pipelines retrieve irrelevant chunks, embedding search returns semantically close but irrelevant results, fine-tuning runs overfit from eval leakage, and code interpreters execute untrusted LLM output without isolation. This Skill codifies production patterns for each failure mode. ## Core Features & Use Cases - LLM Integration & Prompting: API client wrappers with exponential backoff retry, structured output validation via Zod/Pydantic, prompt versioning, and multi-model routing. - RAG & Embedding Search: Document chunking, vector store setup, hybrid BM25 + vector search with reciprocal rank fusion, similarity thresholds, and embedding model version pinning. - AI Agents & Sandboxes: Stateful agent architecture with scheduling and human-in-the-loop approval, plus Docker-based code execution sandboxes with resource limits and network isolation. - Use Case: When building a support chatbot, use this Skill to set up a RAG pipeline with hybrid retrieval, wrap LLM calls with retry and schema validation, and add a sandboxed code interpreter for data analysis queries. ## Quick Start Ask the AI to audit your LLM API usage and add retry logic with structured output validation using the rune llm-integration workflow.

Frequently Asked Questions about rune-ext-ai-ml

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

FAQPage Schema
How do I add retry logic to OpenAI API calls?

Implement exponential backoff retry on all LLM API calls to handle rate limits, which are guaranteed at scale. Combine retries with a fallback chain across models and validate every response with Zod or Pydantic schemas instead of parsing raw text.

How do I build a RAG pipeline with hybrid search?

Combine BM25 keyword search with vector similarity search using reciprocal rank fusion (k=60), then apply a similarity threshold to filter low-relevance results. Cache query embeddings to avoid re-embedding repeated queries and pin the embedding model version in index metadata.

How do I run LLM-generated code safely in a sandbox?

Execute untrusted code in Docker containers with memory and CPU limits, read-only filesystems, network disabled for interpreter use cases, and hard timeouts enforced with SIGKILL. For high-security environments, use rootless Docker or gVisor to reduce sandbox escape risk.

Why does vector search return irrelevant results?

Pure vector search without similarity thresholds returns low-score semantic matches, and it misses exact keyword matches entirely. Set a minimum similarity threshold, add hybrid BM25 scoring, and verify the embedding model version matches the index dimensions.

How do I prevent eval data leakage in fine-tuning?

Split datasets with stratified sampling before training and verify zero overlap between train and eval sets, since leakage invalidates all metrics. Use at least 50 examples (200+ recommended), validate JSONL format, and check for duplicates and PII before uploading.

How do I keep AI agent state consistent across requests?

Store agent state as JSON-serializable data with a version counter, rejecting updates with stale versions to prevent concurrent modification conflicts. Use durable workflows for multi-step tasks so agents recover progress after crashes, and cap conversation history with archival.