agentsop-llamaindex
Operating-system distillation of LlamaIndex — the leading RAG / document-agent framework. Activate when the calling agent must build, debug, harden, or evaluate a Retrieval-Augmented Generation pipeline over unstructured/private data, decide between RAG primitives (Index types, retrievers, query engines, routers, agents), or pick LlamaIndex vs LangChain / Haystack / raw vector store for a coding task. Encodes the 5-layer mental model (Documents → Nodes → Indices → Retrievers → Query Engines / Response Synthesizers), the canonical RAG bootstrap SOP from baseline `VectorStoreIndex` through hybri
npx skills add agentsope/SkillAlchemy --skill agentsop-llamaindex --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
What it does
Activates to guide an agent in building, debugging, hardening, or evaluating a Retrieval-Augmented Generation pipeline over unstructured/private data, deciding between RAG primitives (Index types, retrievers, query engines, routers, agents), or picking LlamaIndex vs LangChain / Haystack / raw vector store for a coding task. Encodes a 5-layer mental model (Documents → Nodes → Indices → Retrievers → Query Engines / Response Synthesizers) and includes a formal SOP from VectorStoreIndex through hybrid + reranker + eval-loop hardening, plus a 13-failure-mode checklist and 5 dilemma cases.
How it works
The skill provides an Activation Rules section specifying when to enable: if building/modifying/debugging a RAG pipeline, mentioning LlamaIndex primitives, comparing RAG frameworks, evaluating a RAG system, or debugging retrieval quality. It defines a Stage-based SOP workflow:
- Frame the problem and assess corpus size and retrieval bottlenecks.
- Establish a Baseline via Python code: from llama_index.core import VectorStoreIndex, SimpleDirectoryReader, Settings; set Settings at boot; load docs; create index; convert to a query engine.
- Build an eval loop to measure MRR, hit-rate, faithfulness, relevancy, p95 latency.
- Optimize in a recommended order: prompts, embedding model, chunk size sweep, hybrid search, metadata filters, decoupling chunk scope, and reranking.
- Compose for query heterogeneity with per-task QueryEngines and a RouterQueryEngine when needed.
- Harden production with an ingestion pipeline, pinned settings, a tree summarizer, tracing, and versioned indices.
- Escalate to Workflows / Agents if needed and adopt Workflows 1.0 over deprecated QueryPipeline. The SOP also catalogs specific operational steps (OP-01 through OP-12) detailing concrete actions like using VectorStoreIndex.from_documents(), setting SentenceSplitter, configuring Settings, and creating various engines and postprocessors.
When to use it
Use when the task involves building, modifying, or debugging a RAG pipeline over unstructured/private data, or when evaluating or choosing between LlamaIndex and other frameworks. Activate also for debugging retrieval quality issues (hallucinations, wrong chunks, embedding drift) or when evaluating faithfulness and relevancy of a RAG system. Do not activate for pure agent orchestration without retrieval.
What it can touch
The skill references concrete tools and components including:
- file/class imports and objects: VectorStoreIndex, SimpleDirectoryReader, Settings, SentenceSplitter, IngestionPipeline, MetadataFilters, RouterQueryEngine, SubQuestionQueryEngine, CohereRerank, SentenceTransformerRerank, MetadataFilters, QueryEngines, and various index types like SummaryIndex, TreeIndex, KeywordTableIndex, PropertyGraphIndex, DocumentSummaryIndex.
- actions like setting Settings at boot, loading documents, building indices, converting to query engines, and configuring an IngestionPipeline with UPSERTS_AND_DELETE.
- evaluation utilities: DatasetGenerator, FaithfulnessEvaluator, RelevancyEvaluator, RetrieverEvaluator.
Caveats
This skill includes license and implementation notes (MIT license, OP-xx sections) and mentions production hardening practices and versioning of deployment artifacts. It emphasizes that the activation should gate on specific conditions and that the metrics and evaluation loop must be used to assess changes.
# LlamaIndex · SOP > Third-person analytical view of how LlamaIndex *thinks* about turning private > documents into a grounded answering system. The skill is for an LLM agent that > writes / reviews / debugs RAG code — not for an end user reading docs. --- ## 何时激活 (Activation Rules) Activate this skill when any of the following holds: 1. The user's request involves building, modifying, or debugging a **RAG pipeline** (retrieval over private/unstructured data + LLM synthesis). 2. The user mentions **LlamaIndex** (`from llama_index...`), **LlamaParse**, **LlamaCloud**, or a LlamaIndex-style primitive (`VectorStoreIndex`, `SummaryIndex`, `IngestionPipeline`, `QueryEngine`, `SubQuestionQueryEngine`, `RouterQueryEngine`, `Settings`, `Workflows`). 3. The user is **comparing RAG frameworks** (LlamaIndex vs LangChain vs Haystack vs raw vector store). 4. The user is choosing between **stuffing context, RAG, or an agent** for a knowledge task. 5. The user is debugging retrieval quality (hallucinations, wrong chunks, stale data, embedding drift) — even if the codebase predates LlamaIndex, the failure-mode taxonomy applies. 6. The user is **evaluating** a RAG system (faithfulness, relevancy, M
- 何时激活 (Activation Rules)
- 核心心智模型 (Core Mental Model)
- Principle 1 — The Index is a noun, not a verb
- Principle 2 — A Node is a graph node, not a chunk
- Principle 3 — Indices are not interchangeable
- The 2025 shift
- SOP 工作流 (Agentic Protocol)
- Stage 0 — Frame the problem
- Stage 1 — Baseline (cheap, fast, observable)
- Stage 2 — Build the eval loop before optimizing anything
- Stage 3 — Optimize in LlamaIndex's recommended order
- Stage 4 — Compose for query heterogeneity
- Stage 5 — Production hardening
- Stage 6 — Escalate to Workflows / Agents (only when justified)
What does the agentsop-llamaindex skill do?
Operating-system distillation of LlamaIndex — the leading RAG / document-agent framework. Activate when the calling agent must build, debug, harden, or evaluate a Retrieval-Augmented Generation pipeline over unstructured/private data, decide between RAG primitives (Index types, retrievers, query engines, routers, agents), or pick LlamaIndex vs LangChain / Haystack / raw vector store for a coding task. Encodes the 5-layer mental model (Documents → Nodes → Indices → Retrievers → Query Engines / Response Synthesizers), the canonical RAG bootstrap SOP from baseline `VectorStoreIndex` through hybri
How do I install it?
Run `npx skills add agentsope/SkillAlchemy --skill agentsop-llamaindex --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From agentsope/SkillAlchemy, a repository with 255 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
