Skills llamaindex
install
source · Clone the upstream repo
git clone https://github.com/TerminalSkills/skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/TerminalSkills/skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/llamaindex" ~/.claude/skills/terminalskills-skills-llamaindex && rm -rf "$T"
manifest:
skills/llamaindex/SKILL.mdsource content
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
for local files or LlamaHub connectors for SaaS platforms, and run through anSimpleDirectoryReader
with metadata extractors (title, summary) and deduplication.IngestionPipeline - When chunking, start with
at 1024 tokens with 200 token overlap, useSentenceSplitter
for structured documents,MarkdownNodeParser
for code, and adjust based on evaluation results.CodeSplitter - When indexing, use
as the default for most RAG,VectorStoreIndex
for entity relationships, andKnowledgeGraphIndex
for per-document summaries.DocumentSummaryIndex - When retrieving, implement hybrid retrieval (vector + keyword) for production, add a reranker (
) after retrieval for improved relevance, and setCohereRerank
based on context window (3-5 for large models, 2-3 for smaller).similarity_top_k - When building query engines, use
for standard RAG,RetrieverQueryEngine
for responses with source attribution, andCitationQueryEngine
for complex multi-part queries.SubQuestionQueryEngine - When creating agents, use
with tools wrapping query engines (ReActAgent
), functions, and other agents for multi-step reasoning.QueryEngineTool - When evaluating, use
,CorrectnessEvaluator
, andFaithfulnessEvaluator
on a test set before deploying.RelevancyEvaluator
Examples
Example 1: Build a RAG pipeline over company documentation
User request: "Create a question-answering system over our internal docs"
Actions:
- Load documents with
and extract metadata (title, summary)SimpleDirectoryReader - Chunk with
(1024 tokens, 200 overlap) through anSentenceSplitterIngestionPipeline - Create
with OpenAI embeddings and configure hybrid retrievalVectorStoreIndex - Build
for answers with source referencesCitationQueryEngine
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:
- Create separate query engines for each data source (vector index, SQL, web search)
- Wrap each engine as a
with descriptive tool descriptionsQueryEngineTool - Build a
that routes questions to the appropriate toolReActAgent - Add
for complex queries requiring multiple sourcesSubQuestionQueryEngine
Output: An intelligent agent that reasons about which data source to query and synthesizes multi-source answers.
Guidelines
- Use
with 1024 token chunks and 200 token overlap as the starting point.SentenceSplitter - 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 (
) after retrieval to improve result relevance for small cost.CohereRerank - Evaluate with
on a test set before deploying; subjective quality assessment does not scale.CorrectnessEvaluator - Set
based on context window: 3-5 chunks for large models, 2-3 for smaller models.similarity_top_k - Use
with deduplication for incremental data updates; do not re-embed unchanged documents.IngestionPipeline