llamaindex
Assists with building RAG pipelines, knowledge assistants, and data-augmented LLM applications using LlamaIndex. Use when ingesting documents, configuring retrieval strategies, building query engines, or creating multi-step agents. Trigger words: llamaindex, rag, retrieval augmented generation, vector index, query engine, document loader, knowledge base.
What this skill does
# LlamaIndex ## Overview LlamaIndex is a data framework for building RAG pipelines, knowledge assistants, and data-augmented LLM applications. It provides document loading from 300+ sources, flexible chunking strategies, multiple index types, hybrid retrieval with reranking, and production evaluation tools for question-answering systems. ## Instructions - When ingesting documents, use `SimpleDirectoryReader` for local files or LlamaHub connectors for SaaS platforms, and run through an `IngestionPipeline` with metadata extractors (title, summary) and deduplication. - When chunking, start with `SentenceSplitter` at 1024 tokens with 200 token overlap, use `MarkdownNodeParser` for structured documents, `CodeSplitter` for code, and adjust based on evaluation results. - When indexing, use `VectorStoreIndex` as the default for most RAG, `KnowledgeGraphIndex` for entity relationships, and `DocumentSummaryIndex` for per-document summaries. - When retrieving, implement hybrid retrieval (vector + keyword) for production, add a reranker (`CohereRerank`) after retrieval for improved relevance, and set `similarity_top_k` based on context window (3-5 for large models, 2-3 for smaller). - When building query engines, use `RetrieverQueryEngine` for standard RAG, `CitationQueryEngine` for responses with source attribution, and `SubQuestionQueryEngine` for complex multi-part queries. - When creating agents, use `ReActAgent` with tools wrapping query engines (`QueryEngineTool`), functions, and other agents for multi-step reasoning. - When evaluating, use `CorrectnessEvaluator`, `FaithfulnessEvaluator`, and `RelevancyEvaluator` on a test set before deploying. ## Examples ### Example 1: Build a RAG pipeline over company documentation **User request:** "Create a question-answering system over our internal docs" **Actions:** 1. Load documents with `SimpleDirectoryReader` and extract metadata (title, summary) 2. Chunk with `SentenceSplitter` (1024 tokens, 200 overlap) through an `IngestionPipeline` 3. Create `VectorStoreIndex` with OpenAI embeddings and configure hybrid retrieval 4. Build `CitationQueryEngine` for answers with source references **Output:** A RAG system that answers questions with citations from company documentation. ### Example 2: Create a multi-source research agent **User request:** "Build an agent that can search across our docs, database, and web" **Actions:** 1. Create separate query engines for each data source (vector index, SQL, web search) 2. Wrap each engine as a `QueryEngineTool` with descriptive tool descriptions 3. Build a `ReActAgent` that routes questions to the appropriate tool 4. Add `SubQuestionQueryEngine` for complex queries requiring multiple sources **Output:** An intelligent agent that reasons about which data source to query and synthesizes multi-source answers. ## Guidelines - Use `SentenceSplitter` with 1024 token chunks and 200 token overlap as the starting point. - Always add metadata extractors to the ingestion pipeline; title and summary metadata improve retrieval significantly. - Use hybrid retrieval (vector + keyword) for production; pure vector search misses exact term matches. - Add a reranker (`CohereRerank`) after retrieval to improve result relevance for small cost. - Evaluate with `CorrectnessEvaluator` on a test set before deploying; subjective quality assessment does not scale. - Set `similarity_top_k` based on context window: 3-5 chunks for large models, 2-3 for smaller models. - Use `IngestionPipeline` with deduplication for incremental data updates; do not re-embed unchanged documents.
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.