llama-index
Build, customize, troubleshoot, and maintain LlamaIndex Python applications and the LlamaIndex monorepo. Routes ingestion, indexing/querying, agents/workflows, structured outputs, integrations/storage, and repo-maintenance tasks to focused sub-skills.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- llama-index
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Build, customize, troubleshoot, and maintain LlamaIndex Python applications and the LlamaIndex monorepo. Routes ingestion, indexing/querying, agents/workflows, structured outputs, integrations/storage, and repo-maintenance tasks to focused sub-skills.
- disable-model-invocation
- true
02 资源文件 6
- 参考文档references/package-map.md2.2 KB
- 参考文档references/repo-provenance.md1.2 KB
- 参考文档references/repo-routing-metadata.json488 B
- 参考文档references/troubleshooting.md2.7 KB
- 脚本scripts/inspect_llama_index_install.py3.2 KB
- 脚本scripts/llama_index_core_smoke.py1.5 KB
03 SKILL.md 正文
LlamaIndex
Use this repo skill when a task involves LlamaIndex Python (llama-index, llama-index-core, or llama_index.*) application development, integration selection, RAG pipeline construction, agent workflows, structured outputs, or safe monorepo maintenance.
Quick Install Decision
- Use
pip install llama-indexfor the starter package when the user wants the default core + common OpenAI stack. - Use
pip install llama-index-coreplus selected integration packages when the user wants a minimal or non-OpenAI install. - Core imports use
llama_index.core.*; integration imports usually usellama_index.<category>.<provider>after installing a matchingllama-index-<category>-<provider>distribution. - Verify a local environment with
python scripts/llama_index_core_smoke.pyor inspect installed packages withpython scripts/inspect_llama_index_install.py --json.
Route By Task
- Data loading and ingestion: use
sub-skills/ingestion-and-loading/SKILL.mdforSimpleDirectoryReader,Document, node parsers,IngestionPipeline, metadata, cache/docstore, and file parsing failures. - RAG indexing and querying: use
sub-skills/indexing-and-querying/SKILL.mdforVectorStoreIndex, retrievers, query engines, response synthesizers, persistence, routing, fusion, and empty retrieval debugging. - Agents and workflows: use
sub-skills/agents-and-workflows/SKILL.mdforFunctionAgent,ReActAgent,AgentWorkflow, tools, memory, chat engines, handoff, streaming, and agent orchestration. - Customization and structured outputs: use
sub-skills/customization-and-structured-outputs/SKILL.mdforSettings, prompts, callbacks, instrumentation, output parsers, Pydantic schemas, evaluation, and test isolation. - Integrations and storage: use
sub-skills/integrations-and-storage/SKILL.mdfor provider package selection, import-path mismatches, vector stores, readers, LLM/embedding providers, credentials, and service-backed persistence. - Repo maintenance: use
sub-skills/repo-maintenance/SKILL.mdonly for work inside the LlamaIndex monorepo: package layout,llama-dev, targeted tests, package metadata, and safe docs/examples automation.
Common Starting Patterns
For a tiny local RAG pipeline:
from llama_index.core import Document, VectorStoreIndex
from llama_index.core.embeddings import MockEmbedding
from llama_index.core.llms import MockLLM
from llama_index.core import Settings
Settings.llm = MockLLM()
Settings.embed_model = MockEmbedding(embed_dim=8)
index = VectorStoreIndex.from_documents([Document(text="LlamaIndex connects data to LLM apps.")])
query_engine = index.as_query_engine()
print(query_engine.query("What does LlamaIndex connect?"))
For real provider-backed usage, set an LLM and embedding model from installed integration packages before creating indexes or agents. If imports fail, route to integrations/storage before changing RAG logic.
Shared References and Scripts
- Read
references/package-map.mdfor package naming, namespace conventions, and how this monorepo splits core from integrations. - Read
references/troubleshooting.mdfor cross-cutting install/import/provider/API-key/deprecation failures before diving into a narrower sub-skill. - Read
references/repo-provenance.mdwhen deciding whether this skill is stale relative to a LlamaIndex checkout. - Run
scripts/inspect_llama_index_install.pyto inspect installed LlamaIndex distributions and import roots without network calls. - Run
scripts/llama_index_core_smoke.pyfor a tiny core import and mock RAG smoke check.
Boundary Rules
- Do not solve provider import failures by editing core RAG code; first verify the installed
llama-index-*distribution and import path. - Do not assume
ServiceContextfor new code; preferSettingsand route migration issues to customization. - Do not run release, publishing, version-bump, credentialed docs sync, or broad integration test commands unless the user explicitly asks and understands the side effects.
- Do not make runtime guidance depend on a source checkout. Copy or adapt reusable checks into this skill’s
scripts/tree and keep source repo examples/tests as evidence only.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).