Skip to content
Back to skills

Llamaindex

ASecurity

Build LlamaIndex ingestion, retrieval, and query pipelines and evaluate RAG behavior on task-relevant examples.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 22, 2026
ai-agentspythongosqlnodegitapi

Works with

  • cursor
  • api

Security analysis

A100/100

Scanned October 22, 2026

npx -y skills add alivirgo/Major-AI-Skills --skill llamaindex --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Llamaindex?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Llamaindex
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/alivirgo-llamaindex/badge)](https://www.skillsdirectory.com/skills/alivirgo-llamaindex)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: llamaindex
description: "Build LlamaIndex ingestion, retrieval, and query pipelines and evaluate RAG behavior on task-relevant examples."
category: development
risk: safe
source: self
source_type: self
date_added: "2026-08-26"
tags: ["llamaindex", "rag", "retrieval", "llm", "python", "claude"]
tools: ["claude", "cursor", "gemini", "codex"]
---

# LlamaIndex RAG AI Skill Guide

## Overview & Engine Architecture

LlamaIndex focuses on connecting LLMs to private data via document loaders, node parsing/chunking, indexes (vector, keyword, knowledge graph), and query/chat engines. Ingestion builds nodes + embeddings into a vector store; query time retrieves nodes and synthesizes answers. Agents tune chunking and metadata filters before swapping models, and evaluate retrieval quality separately from generation style.

```
Documents -> NodeParser / ingest pipeline
      -> VectorStoreIndex
          -> Retriever -> Response synthesizer
```

## When to use this skill

- Document QA and knowledge-base chat
- Structured ingestion from PDFs, Notion, SQL, APIs
- Hybrid retrieval experiments with citations

## Operational directives

1. Fix chunk size/overlap using retrieval metrics, not only vibes.
2. Attach metadata (source, date, ACL tags) for filtered retrieval.
3. Persist indexes; rebuild intentionally when embeddings/models change.
4. Return source nodes to users when factual claims matter.
5. Keep API keys in env vars; never embed them in notebooks committed to git.

## Minimal index + query

```python
import os
from llama_index.core import VectorStoreIndex, SimpleDirectoryReader, Settings
from llama_index.llms.openai import OpenAI
from llama_index.embeddings.openai import OpenAIEmbedding

Settings.llm = OpenAI(model="gpt-4.1-mini")
Settings.embed_model = OpenAIEmbedding(model="text-embedding-3-small")

docs = SimpleDirectoryReader("data/policies").load_data()
index = VectorStoreIndex.from_documents(docs)
index.storage_context.persist(persist_dir="storage/policies")

engine = index.as_query_engine(similarity_top_k=4)
resp = engine.query("What is the refund window for annual plans?")
print(resp)
for n in resp.source_nodes:
    print(n.metadata, n.score)
```

## Reload persisted index

```python
from llama_index.core import StorageContext, load_index_from_storage

storage = StorageContext.from_defaults(persist_dir="storage/policies")
index = load_index_from_storage(storage)
```

## Common failures

| Symptom | Cause | Fix |
| --- | --- | --- |
| Irrelevant context | chunks too big/small | retune splitter; metadata filters |
| Empty answers | bad paths / failed load | verify readers; count docs |
| Embedding mismatch | rebuilt with new model | re-embed entire corpus |
| Token blowups | stuffing too many nodes | lower top_k; compress |

## Best practices

- Evaluate hit-rate@k on a labeled question set before prompt gymnastics.
- Separate ingestion jobs (`@prefect`) from online query paths.
- Use `@chromadb` or managed vector DBs for multi-process serving.
- Cite filenames/page numbers in the synthesizer prompt.

## Limitations

- PDF parsing quality varies; complex layouts need specialized loaders.
- Framework APIs evolve - pin `llama-index` packages.
- Access control must be enforced via metadata filters + app auth, not hope.

## Related skills

- `@langchain` - alternative orchestration style
- `@chromadb` - vector persistence
- `@openai-api` / `@anthropic-api` - underlying model providers

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.