[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6MACYYGH8XZWRE8NCFPYDHD":3,"skill-same:01M6MACYYGH8XZWRE8NCFPYDHD":109},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":31,"publishedAt":52,"linkOnly":53,"markdownContent":54,"markdownBody":55,"frontMatter":56,"refName":63,"commitSha":64,"skillDirectory":65,"forksCount":66,"repositoryHtmlUrl":67,"repositoryHomepageUrl":68,"ownerHtmlUrl":69,"ownerBlogUrl":70,"ownerDescription":71,"updatedAt":72,"install":73,"resources":86},"01M6MACYYGH8XZWRE8NCFPYDHD","llamaindex",null,"Data framework for building LLM applications with RAG. Specializes in document ingestion (300+ connectors), indexing, and querying. Features vector indices, query engines, agents, and multi-modal support. Use for document Q&A, chatbots, knowledge retrieval, or building RAG pipelines. Best for data-centric LLM applications.","hashgraph-online\u002Fawesome-codex-plugins","hashgraph-online","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F160371962?v=4","01M6CNB6NRJVNNGN14TR01Q6D3","HOL (Hashgraph Online)","01M6JT1HSKKG9V68KQAQGBA7XP",1575,"MIT","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fskills\u002Fllamaindex\u002FSKILL.md",[18,23,26],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000002","文档处理","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":27,"categoryName":28,"taxonomyType":29,"taxonomyTypeDesc":30},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",[32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],"LlamaIndex","LLM Applications","for","q&a","Private Data","Data Framework","Knowledge Retrieval","Query Engines","Vector Indices","Document Ingestion","connectors","chatbots","indexing","document","use","knowledge","applications","multimodal","vector","rag","2026-11-10 10:12:30",false,"---\nname: llamaindex\ndescription: Data framework for building LLM applications with RAG. Specializes in document ingestion (300+ connectors), indexing, and querying. Features vector indices, query engines, agents, and multi-modal support. Use for document Q&A, chatbots, knowledge retrieval, or building RAG pipelines. Best for data-centric LLM applications.\nlicense: MIT\nmetadata:\n  version: 1.0.0\n  category: llm-applications\n  maintainer: Kalaris Labs\n  tags: Agents, LlamaIndex, RAG, Document Ingestion, Vector Indices, Query Engines, Knowledge Retrieval, Data Framework, Multimodal, Private Data, Connectors\n  dependencies: llama-index, openai, anthropic\n---\n\n# LlamaIndex - Data Framework for LLM Applications\n\nThe leading framework for connecting LLMs with your data.\n\n## When to use LlamaIndex\n\n**Use LlamaIndex when:**\n- Building RAG (retrieval-augmented generation) applications\n- Need document question-answering over private data\n- Ingesting data from multiple sources (300+ connectors)\n- Creating knowledge bases for LLMs\n- Building chatbots with enterprise data\n- Need structured data extraction from documents\n\n**Metrics**:\n- **23,000+ repositories** use LlamaIndex\n- **300+ data connectors** (LlamaHub)\n- **1,715+ contributors**\n- **v0.14.7** (stable)\n\n**Use alternatives instead**:\n- **LangChain**: More general-purpose, better for agents\n- **Haystack**: Production search pipelines\n- **txtai**: Lightweight semantic search\n- **Chroma**: Just need vector storage\n\n## Quick start\n\n### Installation\n\n```bash\n# Starter package (recommended)\npip install llama-index\n\n# Or minimal core + specific integrations\npip install llama-index-core\npip install llama-index-llms-openai\npip install llama-index-embeddings-openai\n```\n\n### 5-line RAG example\n\n```python\nfrom llama_index.core import VectorStoreIndex, SimpleDirectoryReader\n\n# Load documents\ndocuments = SimpleDirectoryReader(\"data\").load_data()\n\n# Create index\nindex = VectorStoreIndex.from_documents(documents)\n\n# Query\nquery_engine = index.as_query_engine()\nresponse = query_engine.query(\"What did the author do growing up?\")\nprint(response)\n```\n\n## Core concepts\n\n### 1. Data connectors - Load documents\n\n```python\nfrom llama_index.core import SimpleDirectoryReader, Document\nfrom llama_index.readers.web import SimpleWebPageReader\nfrom llama_index.readers.github import GithubRepositoryReader\n\n# Directory of files\ndocuments = SimpleDirectoryReader(\".\u002Fdata\").load_data()\n\n# Web pages\nreader = SimpleWebPageReader()\ndocuments = reader.load_data([\"https:\u002F\u002Fexample.com\"])\n\n# GitHub repository\nreader = GithubRepositoryReader(owner=\"user\", repo=\"repo\")\ndocuments = reader.load_data(branch=\"main\")\n\n# Manual document creation\ndoc = Document(\n    text=\"This is the document content\",\n    metadata={\"source\": \"manual\", \"date\": \"2025-01-01\"}\n)\n```\n\n### 2. Indices - Structure data\n\n```python\nfrom llama_index.core import VectorStoreIndex, ListIndex, TreeIndex\n\n# Vector index (most common - semantic search)\nvector_index = VectorStoreIndex.from_documents(documents)\n\n# List index (sequential scan)\nlist_index = ListIndex.from_documents(documents)\n\n# Tree index (hierarchical summary)\ntree_index = TreeIndex.from_documents(documents)\n\n# Save index\nindex.storage_context.persist(persist_dir=\".\u002Fstorage\")\n\n# Load index\nfrom llama_index.core import load_index_from_storage, StorageContext\nstorage_context = StorageContext.from_defaults(persist_dir=\".\u002Fstorage\")\nindex = load_index_from_storage(storage_context)\n```\n\n### 3. Query engines - Ask questions\n\n```python\n# Basic query\nquery_engine = index.as_query_engine()\nresponse = query_engine.query(\"What is the main topic?\")\nprint(response)\n\n# Streaming response\nquery_engine = index.as_query_engine(streaming=True)\nresponse = query_engine.query(\"Explain quantum computing\")\nfor text in response.response_gen:\n    print(text, end=\"\", flush=True)\n\n# Custom configuration\nquery_engine = index.as_query_engine(\n    similarity_top_k=3,          # Return top 3 chunks\n    response_mode=\"compact\",     # Or \"tree_summarize\", \"simple_summarize\"\n    verbose=True\n)\n```\n\n### 4. Retrievers - Find relevant chunks\n\n```python\n# Vector retriever\nretriever = index.as_retriever(similarity_top_k=5)\nnodes = retriever.retrieve(\"machine learning\")\n\n# With filtering\nretriever = index.as_retriever(\n    similarity_top_k=3,\n    filters={\"metadata.category\": \"tutorial\"}\n)\n\n# Custom retriever\nfrom llama_index.core.retrievers import BaseRetriever\n\nclass CustomRetriever(BaseRetriever):\n    def _retrieve(self, query_bundle):\n        # Your custom retrieval logic\n        return nodes\n```\n\n## Agents with tools\n\nDetails, code examples and parameter tables: [references\u002Fagents-with-tools.md](references\u002Fagents-with-tools.md). Read it when this step applies.\n\n## Advanced RAG patterns\n\nDetails, code examples and parameter tables: [references\u002Fadvanced-rag-patterns.md](references\u002Fadvanced-rag-patterns.md). Read it when this step applies.\n\n## Data ingestion patterns\n\n### Multiple file types\n\n```python\n# Load all supported formats\ndocuments = SimpleDirectoryReader(\n    \".\u002Fdata\",\n    recursive=True,\n    required_exts=[\".pdf\", \".docx\", \".txt\", \".md\"]\n).load_data()\n```\n\n### Web scraping\n\n```python\nfrom llama_index.readers.web import BeautifulSoupWebReader\n\nreader = BeautifulSoupWebReader()\ndocuments = reader.load_data(urls=[\n    \"https:\u002F\u002Fdocs.python.org\u002F3\u002Ftutorial\u002F\",\n    \"https:\u002F\u002Fdocs.python.org\u002F3\u002Flibrary\u002F\"\n])\n```\n\n### Database\n\n```python\nfrom llama_index.readers.database import DatabaseReader\n\nreader = DatabaseReader(\n    sql_database_uri=\"postgresql:\u002F\u002Fuser:pass@localhost\u002Fdb\"\n)\ndocuments = reader.load_data(query=\"SELECT * FROM articles\")\n```\n\n### API endpoints\n\n```python\nfrom llama_index.readers.json import JSONReader\n\nreader = JSONReader()\ndocuments = reader.load_data(\"https:\u002F\u002Fapi.example.com\u002Fdata.json\")\n```\n\n## Vector store integrations\n\n### Chroma (local)\n\n```python\nfrom llama_index.vector_stores.chroma import ChromaVectorStore\nimport chromadb\n\n# Initialize Chroma\ndb = chromadb.PersistentClient(path=\".\u002Fchroma_db\")\ncollection = db.get_or_create_collection(\"my_collection\")\n\n# Create vector store\nvector_store = ChromaVectorStore(chroma_collection=collection)\n\n# Use in index\nfrom llama_index.core import StorageContext\nstorage_context = StorageContext.from_defaults(vector_store=vector_store)\nindex = VectorStoreIndex.from_documents(documents, storage_context=storage_context)\n```\n\n### Pinecone (cloud)\n\n```python\nfrom llama_index.vector_stores.pinecone import PineconeVectorStore\nimport pinecone\n\n# Initialize Pinecone\npinecone.init(api_key=\"your-key\", environment=\"us-west1-gcp\")\npinecone_index = pinecone.Index(\"my-index\")\n\n# Create vector store\nvector_store = PineconeVectorStore(pinecone_index=pinecone_index)\nstorage_context = StorageContext.from_defaults(vector_store=vector_store)\n\nindex = VectorStoreIndex.from_documents(documents, storage_context=storage_context)\n```\n\n### FAISS (fast)\n\n```python\nfrom llama_index.vector_stores.faiss import FaissVectorStore\nimport faiss\n\n# Create FAISS index\nd = 1536  # Dimension of embeddings\nfaiss_index = faiss.IndexFlatL2(d)\n\nvector_store = FaissVectorStore(faiss_index=faiss_index)\nstorage_context = StorageContext.from_defaults(vector_store=vector_store)\n\nindex = VectorStoreIndex.from_documents(documents, storage_context=storage_context)\n```\n\n## Customization\n\n### Custom LLM\n\n```python\nfrom llama_index.llms.anthropic import Anthropic\nfrom llama_index.core import Settings\n\n# Set global LLM\nSettings.llm = Anthropic(model=\"claude-sonnet-4-5-20250929\")\n\n# Now all queries use Anthropic\nquery_engine = index.as_query_engine()\n```\n\n### Custom embeddings\n\n```python\nfrom llama_index.embeddings.huggingface import HuggingFaceEmbedding\n\n# Use HuggingFace embeddings\nSettings.embed_model = HuggingFaceEmbedding(\n    model_name=\"sentence-transformers\u002Fall-mpnet-base-v2\"\n)\n\nindex = VectorStoreIndex.from_documents(documents)\n```\n\n### Custom prompt templates\n\n```python\nfrom llama_index.core import PromptTemplate\n\nqa_prompt = PromptTemplate(\n    \"Context: {context_str}\\n\"\n    \"Question: {query_str}\\n\"\n    \"Answer the question based only on the context. \"\n    \"If the answer is not in the context, say 'I don't know'.\\n\"\n    \"Answer: \"\n)\n\nquery_engine = index.as_query_engine(text_qa_template=qa_prompt)\n```\n\n## Multi-modal RAG\n\n### Image + text\n\n```python\nfrom llama_index.core import SimpleDirectoryReader\nfrom llama_index.multi_modal_llms.openai import OpenAIMultiModal\n\n# Load images and documents\ndocuments = SimpleDirectoryReader(\n    \".\u002Fdata\",\n    required_exts=[\".jpg\", \".png\", \".pdf\"]\n).load_data()\n\n# Multi-modal index\nindex = VectorStoreIndex.from_documents(documents)\n\n# Query with multi-modal LLM\nmulti_modal_llm = OpenAIMultiModal(model=\"gpt-4o\")\nquery_engine = index.as_query_engine(llm=multi_modal_llm)\n\nresponse = query_engine.query(\"What is in the diagram on page 3?\")\n```\n\n## Evaluation\n\n### Response quality\n\n```python\nfrom llama_index.core.evaluation import RelevancyEvaluator, FaithfulnessEvaluator\n\n# Evaluate relevance\nrelevancy = RelevancyEvaluator()\nresult = relevancy.evaluate_response(\n    query=\"What is Python?\",\n    response=response\n)\nprint(f\"Relevancy: {result.passing}\")\n\n# Evaluate faithfulness (no hallucination)\nfaithfulness = FaithfulnessEvaluator()\nresult = faithfulness.evaluate_response(\n    query=\"What is Python?\",\n    response=response\n)\nprint(f\"Faithfulness: {result.passing}\")\n```\n\n## Best practices\n\n1. **Use vector indices for most cases** - Best performance\n2. **Save indices to disk** - Avoid re-indexing\n3. **Chunk documents properly** - 512-1024 tokens optimal\n4. **Add metadata** - Enables filtering and tracking\n5. **Use streaming** - Better UX for long responses\n6. **Enable verbose during dev** - See retrieval process\n7. **Evaluate responses** - Check relevance and faithfulness\n8. **Use chat engine for conversations** - Built-in memory\n9. **Persist storage** - Don't lose your index\n10. **Monitor costs** - Track embedding and LLM usage\n\n## Common patterns\n\n### Document Q&A system\n\n```python\n# Complete RAG pipeline\ndocuments = SimpleDirectoryReader(\"docs\").load_data()\nindex = VectorStoreIndex.from_documents(documents)\nindex.storage_context.persist(persist_dir=\".\u002Fstorage\")\n\n# Query\nquery_engine = index.as_query_engine(\n    similarity_top_k=3,\n    response_mode=\"compact\",\n    verbose=True\n)\nresponse = query_engine.query(\"What is the main topic?\")\nprint(response)\nprint(f\"Sources: {[node.metadata['file_name'] for node in response.source_nodes]}\")\n```\n\n### Chatbot with memory\n\n```python\n# Conversational interface\nchat_engine = index.as_chat_engine(\n    chat_mode=\"condense_plus_context\",\n    verbose=True\n)\n\n# Multi-turn chat\nwhile True:\n    user_input = input(\"You: \")\n    if user_input.lower() == \"quit\":\n        break\n    response = chat_engine.chat(user_input)\n    print(f\"Bot: {response}\")\n```\n\n## Performance benchmarks\n\n| Operation | Latency | Notes |\n|-----------|---------|-------|\n| Index 100 docs | ~10-30s | One-time, can persist |\n| Query (vector) | ~0.5-2s | Retrieval + LLM |\n| Streaming query | ~0.5s first token | Better UX |\n| Agent with tools | ~3-8s | Multiple tool calls |\n\n## LlamaIndex vs LangChain\n\n| Feature | LlamaIndex | LangChain |\n|---------|------------|-----------|\n| **Best for** | RAG, document Q&A | Agents, general LLM apps |\n| **Data connectors** | 300+ (LlamaHub) | 100+ |\n| **RAG focus** | Core feature | One of many |\n| **Learning curve** | Easier for RAG | Steeper |\n| **Customization** | High | Very high |\n| **Documentation** | Excellent | Good |\n\n**Use LlamaIndex when:**\n- Your primary use case is RAG\n- Need many data connectors\n- Want simpler API for document Q&A\n- Building knowledge retrieval system\n\n**Use LangChain when:**\n- Building complex agents\n- Need more general-purpose tools\n- Want more flexibility\n- Complex multi-step workflows\n\n## References\n\n- **[Query Engines Guide](references\u002Fquery_engines.md)** - Query modes, customization, streaming\n- **[Agents Guide](references\u002Fagents.md)** - Tool creation, RAG agents, multi-step reasoning\n- **[Data Connectors Guide](references\u002Fdata_connectors.md)** - 300+ connectors, custom loaders\n\n## Resources\n\n- **GitHub**: https:\u002F\u002Fgithub.com\u002Frun-llama\u002Fllama_index ⭐ 45,100+\n- **Docs**: https:\u002F\u002Fdevelopers.llamaindex.ai\u002Fpython\u002Fframework\u002F\n- **LlamaHub**: https:\u002F\u002Fllamahub.ai (data connectors)\n- **LlamaCloud**: https:\u002F\u002Fcloud.llamaindex.ai (enterprise)\n- **Discord**: https:\u002F\u002Fdiscord.gg\u002FdGcwcsnxhU\n- **Version**: 0.14.7+\n- **License**: MIT\n\n## Agent operating procedure\n\n1. **Check the environment.** Confirm the framework version, model provider, API keys and rate limits.\n2. **Pin down the inputs.** Confirm formats, identifiers and parameters from the data or the user. Ask rather than guess any value that changes the result.\n3. **Run a small version first.** Test a single call or chain with a known input and inspect raw outputs.\n4. **Execute the full task** using the instructions and references above.\n5. **Validate the result.** Evaluate on a small labeled set; check structured outputs against their schema; log prompts and responses.\n6. **Report.** State what was run (versions, commands, parameters), what was checked, and what is still uncertain.\n\n| If this happens | Do this |\n|---|---|\n| Outputs do not match the expected schema | Add validation and retries, tighten the schema, or simplify the prompt. |\n| A function, flag or endpoint in these instructions is missing in the installed version | Check the installed version's own documentation (`help()`, `--help`, official docs), adapt, and tell the user. Never invent an API. |\n| A required input, identifier or parameter is ambiguous | Ask the user, or state the assumption explicitly before running. |\n\n**Integrity rules**\n\n- Never fabricate results, parameters, identifiers, citations or statistics. If something cannot be run or verified, say so plainly.\n- Never send private or sensitive data to external APIs without the user's consent.\n- Treat version-specific details here as possibly outdated: confirm them against the official documentation for the installed version.\n- Ask before actions that cost money, consume shared GPUs or cloud quota, touch personal or patient data, or cannot be undone.\n\n## Related skills\n\n- `langchain`: Framework for building LLM-powered applications with agents, chains, and RAG.\n- `chroma`: Open-source embedding database for AI applications.\n- `langsmith-observability`: LLM observability platform for tracing, evaluation, and monitoring.\n","# LlamaIndex - Data Framework for LLM Applications\n\nThe leading framework for connecting LLMs with your data.\n\n## When to use LlamaIndex\n\n**Use LlamaIndex when:**\n- Building RAG (retrieval-augmented generation) applications\n- Need document question-answering over private data\n- Ingesting data from multiple sources (300+ connectors)\n- Creating knowledge bases for LLMs\n- Building chatbots with enterprise data\n- Need structured data extraction from documents\n\n**Metrics**:\n- **23,000+ repositories** use LlamaIndex\n- **300+ data connectors** (LlamaHub)\n- **1,715+ contributors**\n- **v0.14.7** (stable)\n\n**Use alternatives instead**:\n- **LangChain**: More general-purpose, better for agents\n- **Haystack**: Production search pipelines\n- **txtai**: Lightweight semantic search\n- **Chroma**: Just need vector storage\n\n## Quick start\n\n### Installation\n\n```bash\n# Starter package (recommended)\npip install llama-index\n\n# Or minimal core + specific integrations\npip install llama-index-core\npip install llama-index-llms-openai\npip install llama-index-embeddings-openai\n```\n\n### 5-line RAG example\n\n```python\nfrom llama_index.core import VectorStoreIndex, SimpleDirectoryReader\n\n# Load documents\ndocuments = SimpleDirectoryReader(\"data\").load_data()\n\n# Create index\nindex = VectorStoreIndex.from_documents(documents)\n\n# Query\nquery_engine = index.as_query_engine()\nresponse = query_engine.query(\"What did the author do growing up?\")\nprint(response)\n```\n\n## Core concepts\n\n### 1. Data connectors - Load documents\n\n```python\nfrom llama_index.core import SimpleDirectoryReader, Document\nfrom llama_index.readers.web import SimpleWebPageReader\nfrom llama_index.readers.github import GithubRepositoryReader\n\n# Directory of files\ndocuments = SimpleDirectoryReader(\".\u002Fdata\").load_data()\n\n# Web pages\nreader = SimpleWebPageReader()\ndocuments = reader.load_data([\"https:\u002F\u002Fexample.com\"])\n\n# GitHub repository\nreader = GithubRepositoryReader(owner=\"user\", repo=\"repo\")\ndocuments = reader.load_data(branch=\"main\")\n\n# Manual document creation\ndoc = Document(\n    text=\"This is the document content\",\n    metadata={\"source\": \"manual\", \"date\": \"2025-01-01\"}\n)\n```\n\n### 2. Indices - Structure data\n\n```python\nfrom llama_index.core import VectorStoreIndex, ListIndex, TreeIndex\n\n# Vector index (most common - semantic search)\nvector_index = VectorStoreIndex.from_documents(documents)\n\n# List index (sequential scan)\nlist_index = ListIndex.from_documents(documents)\n\n# Tree index (hierarchical summary)\ntree_index = TreeIndex.from_documents(documents)\n\n# Save index\nindex.storage_context.persist(persist_dir=\".\u002Fstorage\")\n\n# Load index\nfrom llama_index.core import load_index_from_storage, StorageContext\nstorage_context = StorageContext.from_defaults(persist_dir=\".\u002Fstorage\")\nindex = load_index_from_storage(storage_context)\n```\n\n### 3. Query engines - Ask questions\n\n```python\n# Basic query\nquery_engine = index.as_query_engine()\nresponse = query_engine.query(\"What is the main topic?\")\nprint(response)\n\n# Streaming response\nquery_engine = index.as_query_engine(streaming=True)\nresponse = query_engine.query(\"Explain quantum computing\")\nfor text in response.response_gen:\n    print(text, end=\"\", flush=True)\n\n# Custom configuration\nquery_engine = index.as_query_engine(\n    similarity_top_k=3,          # Return top 3 chunks\n    response_mode=\"compact\",     # Or \"tree_summarize\", \"simple_summarize\"\n    verbose=True\n)\n```\n\n### 4. Retrievers - Find relevant chunks\n\n```python\n# Vector retriever\nretriever = index.as_retriever(similarity_top_k=5)\nnodes = retriever.retrieve(\"machine learning\")\n\n# With filtering\nretriever = index.as_retriever(\n    similarity_top_k=3,\n    filters={\"metadata.category\": \"tutorial\"}\n)\n\n# Custom retriever\nfrom llama_index.core.retrievers import BaseRetriever\n\nclass CustomRetriever(BaseRetriever):\n    def _retrieve(self, query_bundle):\n        # Your custom retrieval logic\n        return nodes\n```\n\n## Agents with tools\n\nDetails, code examples and parameter tables: [references\u002Fagents-with-tools.md](references\u002Fagents-with-tools.md). Read it when this step applies.\n\n## Advanced RAG patterns\n\nDetails, code examples and parameter tables: [references\u002Fadvanced-rag-patterns.md](references\u002Fadvanced-rag-patterns.md). Read it when this step applies.\n\n## Data ingestion patterns\n\n### Multiple file types\n\n```python\n# Load all supported formats\ndocuments = SimpleDirectoryReader(\n    \".\u002Fdata\",\n    recursive=True,\n    required_exts=[\".pdf\", \".docx\", \".txt\", \".md\"]\n).load_data()\n```\n\n### Web scraping\n\n```python\nfrom llama_index.readers.web import BeautifulSoupWebReader\n\nreader = BeautifulSoupWebReader()\ndocuments = reader.load_data(urls=[\n    \"https:\u002F\u002Fdocs.python.org\u002F3\u002Ftutorial\u002F\",\n    \"https:\u002F\u002Fdocs.python.org\u002F3\u002Flibrary\u002F\"\n])\n```\n\n### Database\n\n```python\nfrom llama_index.readers.database import DatabaseReader\n\nreader = DatabaseReader(\n    sql_database_uri=\"postgresql:\u002F\u002Fuser:pass@localhost\u002Fdb\"\n)\ndocuments = reader.load_data(query=\"SELECT * FROM articles\")\n```\n\n### API endpoints\n\n```python\nfrom llama_index.readers.json import JSONReader\n\nreader = JSONReader()\ndocuments = reader.load_data(\"https:\u002F\u002Fapi.example.com\u002Fdata.json\")\n```\n\n## Vector store integrations\n\n### Chroma (local)\n\n```python\nfrom llama_index.vector_stores.chroma import ChromaVectorStore\nimport chromadb\n\n# Initialize Chroma\ndb = chromadb.PersistentClient(path=\".\u002Fchroma_db\")\ncollection = db.get_or_create_collection(\"my_collection\")\n\n# Create vector store\nvector_store = ChromaVectorStore(chroma_collection=collection)\n\n# Use in index\nfrom llama_index.core import StorageContext\nstorage_context = StorageContext.from_defaults(vector_store=vector_store)\nindex = VectorStoreIndex.from_documents(documents, storage_context=storage_context)\n```\n\n### Pinecone (cloud)\n\n```python\nfrom llama_index.vector_stores.pinecone import PineconeVectorStore\nimport pinecone\n\n# Initialize Pinecone\npinecone.init(api_key=\"your-key\", environment=\"us-west1-gcp\")\npinecone_index = pinecone.Index(\"my-index\")\n\n# Create vector store\nvector_store = PineconeVectorStore(pinecone_index=pinecone_index)\nstorage_context = StorageContext.from_defaults(vector_store=vector_store)\n\nindex = VectorStoreIndex.from_documents(documents, storage_context=storage_context)\n```\n\n### FAISS (fast)\n\n```python\nfrom llama_index.vector_stores.faiss import FaissVectorStore\nimport faiss\n\n# Create FAISS index\nd = 1536  # Dimension of embeddings\nfaiss_index = faiss.IndexFlatL2(d)\n\nvector_store = FaissVectorStore(faiss_index=faiss_index)\nstorage_context = StorageContext.from_defaults(vector_store=vector_store)\n\nindex = VectorStoreIndex.from_documents(documents, storage_context=storage_context)\n```\n\n## Customization\n\n### Custom LLM\n\n```python\nfrom llama_index.llms.anthropic import Anthropic\nfrom llama_index.core import Settings\n\n# Set global LLM\nSettings.llm = Anthropic(model=\"claude-sonnet-4-5-20250929\")\n\n# Now all queries use Anthropic\nquery_engine = index.as_query_engine()\n```\n\n### Custom embeddings\n\n```python\nfrom llama_index.embeddings.huggingface import HuggingFaceEmbedding\n\n# Use HuggingFace embeddings\nSettings.embed_model = HuggingFaceEmbedding(\n    model_name=\"sentence-transformers\u002Fall-mpnet-base-v2\"\n)\n\nindex = VectorStoreIndex.from_documents(documents)\n```\n\n### Custom prompt templates\n\n```python\nfrom llama_index.core import PromptTemplate\n\nqa_prompt = PromptTemplate(\n    \"Context: {context_str}\\n\"\n    \"Question: {query_str}\\n\"\n    \"Answer the question based only on the context. \"\n    \"If the answer is not in the context, say 'I don't know'.\\n\"\n    \"Answer: \"\n)\n\nquery_engine = index.as_query_engine(text_qa_template=qa_prompt)\n```\n\n## Multi-modal RAG\n\n### Image + text\n\n```python\nfrom llama_index.core import SimpleDirectoryReader\nfrom llama_index.multi_modal_llms.openai import OpenAIMultiModal\n\n# Load images and documents\ndocuments = SimpleDirectoryReader(\n    \".\u002Fdata\",\n    required_exts=[\".jpg\", \".png\", \".pdf\"]\n).load_data()\n\n# Multi-modal index\nindex = VectorStoreIndex.from_documents(documents)\n\n# Query with multi-modal LLM\nmulti_modal_llm = OpenAIMultiModal(model=\"gpt-4o\")\nquery_engine = index.as_query_engine(llm=multi_modal_llm)\n\nresponse = query_engine.query(\"What is in the diagram on page 3?\")\n```\n\n## Evaluation\n\n### Response quality\n\n```python\nfrom llama_index.core.evaluation import RelevancyEvaluator, FaithfulnessEvaluator\n\n# Evaluate relevance\nrelevancy = RelevancyEvaluator()\nresult = relevancy.evaluate_response(\n    query=\"What is Python?\",\n    response=response\n)\nprint(f\"Relevancy: {result.passing}\")\n\n# Evaluate faithfulness (no hallucination)\nfaithfulness = FaithfulnessEvaluator()\nresult = faithfulness.evaluate_response(\n    query=\"What is Python?\",\n    response=response\n)\nprint(f\"Faithfulness: {result.passing}\")\n```\n\n## Best practices\n\n1. **Use vector indices for most cases** - Best performance\n2. **Save indices to disk** - Avoid re-indexing\n3. **Chunk documents properly** - 512-1024 tokens optimal\n4. **Add metadata** - Enables filtering and tracking\n5. **Use streaming** - Better UX for long responses\n6. **Enable verbose during dev** - See retrieval process\n7. **Evaluate responses** - Check relevance and faithfulness\n8. **Use chat engine for conversations** - Built-in memory\n9. **Persist storage** - Don't lose your index\n10. **Monitor costs** - Track embedding and LLM usage\n\n## Common patterns\n\n### Document Q&A system\n\n```python\n# Complete RAG pipeline\ndocuments = SimpleDirectoryReader(\"docs\").load_data()\nindex = VectorStoreIndex.from_documents(documents)\nindex.storage_context.persist(persist_dir=\".\u002Fstorage\")\n\n# Query\nquery_engine = index.as_query_engine(\n    similarity_top_k=3,\n    response_mode=\"compact\",\n    verbose=True\n)\nresponse = query_engine.query(\"What is the main topic?\")\nprint(response)\nprint(f\"Sources: {[node.metadata['file_name'] for node in response.source_nodes]}\")\n```\n\n### Chatbot with memory\n\n```python\n# Conversational interface\nchat_engine = index.as_chat_engine(\n    chat_mode=\"condense_plus_context\",\n    verbose=True\n)\n\n# Multi-turn chat\nwhile True:\n    user_input = input(\"You: \")\n    if user_input.lower() == \"quit\":\n        break\n    response = chat_engine.chat(user_input)\n    print(f\"Bot: {response}\")\n```\n\n## Performance benchmarks\n\n| Operation | Latency | Notes |\n|-----------|---------|-------|\n| Index 100 docs | ~10-30s | One-time, can persist |\n| Query (vector) | ~0.5-2s | Retrieval + LLM |\n| Streaming query | ~0.5s first token | Better UX |\n| Agent with tools | ~3-8s | Multiple tool calls |\n\n## LlamaIndex vs LangChain\n\n| Feature | LlamaIndex | LangChain |\n|---------|------------|-----------|\n| **Best for** | RAG, document Q&A | Agents, general LLM apps |\n| **Data connectors** | 300+ (LlamaHub) | 100+ |\n| **RAG focus** | Core feature | One of many |\n| **Learning curve** | Easier for RAG | Steeper |\n| **Customization** | High | Very high |\n| **Documentation** | Excellent | Good |\n\n**Use LlamaIndex when:**\n- Your primary use case is RAG\n- Need many data connectors\n- Want simpler API for document Q&A\n- Building knowledge retrieval system\n\n**Use LangChain when:**\n- Building complex agents\n- Need more general-purpose tools\n- Want more flexibility\n- Complex multi-step workflows\n\n## References\n\n- **[Query Engines Guide](references\u002Fquery_engines.md)** - Query modes, customization, streaming\n- **[Agents Guide](references\u002Fagents.md)** - Tool creation, RAG agents, multi-step reasoning\n- **[Data Connectors Guide](references\u002Fdata_connectors.md)** - 300+ connectors, custom loaders\n\n## Resources\n\n- **GitHub**: https:\u002F\u002Fgithub.com\u002Frun-llama\u002Fllama_index ⭐ 45,100+\n- **Docs**: https:\u002F\u002Fdevelopers.llamaindex.ai\u002Fpython\u002Fframework\u002F\n- **LlamaHub**: https:\u002F\u002Fllamahub.ai (data connectors)\n- **LlamaCloud**: https:\u002F\u002Fcloud.llamaindex.ai (enterprise)\n- **Discord**: https:\u002F\u002Fdiscord.gg\u002FdGcwcsnxhU\n- **Version**: 0.14.7+\n- **License**: MIT\n\n## Agent operating procedure\n\n1. **Check the environment.** Confirm the framework version, model provider, API keys and rate limits.\n2. **Pin down the inputs.** Confirm formats, identifiers and parameters from the data or the user. Ask rather than guess any value that changes the result.\n3. **Run a small version first.** Test a single call or chain with a known input and inspect raw outputs.\n4. **Execute the full task** using the instructions and references above.\n5. **Validate the result.** Evaluate on a small labeled set; check structured outputs against their schema; log prompts and responses.\n6. **Report.** State what was run (versions, commands, parameters), what was checked, and what is still uncertain.\n\n| If this happens | Do this |\n|---|---|\n| Outputs do not match the expected schema | Add validation and retries, tighten the schema, or simplify the prompt. |\n| A function, flag or endpoint in these instructions is missing in the installed version | Check the installed version's own documentation (`help()`, `--help`, official docs), adapt, and tell the user. Never invent an API. |\n| A required input, identifier or parameter is ambiguous | Ask the user, or state the assumption explicitly before running. |\n\n**Integrity rules**\n\n- Never fabricate results, parameters, identifiers, citations or statistics. If something cannot be run or verified, say so plainly.\n- Never send private or sensitive data to external APIs without the user's consent.\n- Treat version-specific details here as possibly outdated: confirm them against the official documentation for the installed version.\n- Ask before actions that cost money, consume shared GPUs or cloud quota, touch personal or patient data, or cannot be undone.\n\n## Related skills\n\n- `langchain`: Framework for building LLM-powered applications with agents, chains, and RAG.\n- `chroma`: Open-source embedding database for AI applications.\n- `langsmith-observability`: LLM observability platform for tracing, evaluation, and monitoring.\n",{"name":5,"license":15,"metadata":57,"description":7},{"tags":58,"version":59,"category":60,"maintainer":61,"dependencies":62},"Agents, LlamaIndex, RAG, Document Ingestion, Vector Indices, Query Engines, Knowledge Retrieval, Data Framework, Multimodal, Private Data, Connectors","1.0.0","llm-applications","Kalaris Labs","llama-index, openai, anthropic","main","2b63f856ce19c2a797929cacabd9e0fc936812fa","plugins\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fskills\u002Fllamaindex",491,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins","https:\u002F\u002Fhol.org\u002Fplugins\u002Fbest-codex-plugins","https:\u002F\u002Fgithub.com\u002Fhashgraph-online","https:\u002F\u002Fhol.org","Open-source standards and developer tools for interoperable AI agents: discovery, identity, communication, payments, privacy and security.","2026-11-14 14:06:13",{"source":8,"skillName":5,"commands":74,"prompt":84,"zipAvailable":85},[75,78,81],{"tool":76,"command":77},"npx","npx skills add hashgraph-online\u002Fawesome-codex-plugins --skill llamaindex",{"tool":79,"command":80},"bunx","bunx skills add hashgraph-online\u002Fawesome-codex-plugins --skill llamaindex",{"tool":82,"command":83},"pnpm","pnpm dlx skills add hashgraph-online\u002Fawesome-codex-plugins --skill llamaindex","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fskills\u002Fllamaindex\u002FSKILL.md",true,[87,93,97,101,105],{"path":88,"resourceType":89,"resourceTypeDesc":90,"sizeBytes":91,"sourceHtmlUrl":92},"references\u002Fadvanced-rag-patterns.md","REFERENCE","参考文档",1444,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fskills\u002Fllamaindex\u002Freferences\u002Fadvanced-rag-patterns.md",{"path":94,"resourceType":89,"resourceTypeDesc":90,"sizeBytes":95,"sourceHtmlUrl":96},"references\u002Fagents-with-tools.md",1190,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fskills\u002Fllamaindex\u002Freferences\u002Fagents-with-tools.md",{"path":98,"resourceType":89,"resourceTypeDesc":90,"sizeBytes":99,"sourceHtmlUrl":100},"references\u002Fagents.md",1958,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fskills\u002Fllamaindex\u002Freferences\u002Fagents.md",{"path":102,"resourceType":89,"resourceTypeDesc":90,"sizeBytes":103,"sourceHtmlUrl":104},"references\u002Fdata_connectors.md",2307,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fskills\u002Fllamaindex\u002Freferences\u002Fdata_connectors.md",{"path":106,"resourceType":89,"resourceTypeDesc":90,"sizeBytes":107,"sourceHtmlUrl":108},"references\u002Fquery_engines.md",9905,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fskills\u002Fllamaindex\u002Freferences\u002Fquery_engines.md",[110,119,127,135,143,151],{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":114,"sourceHtmlUrl":115,"categories":116,"keywords":117,"publishedAt":118},"01M7DV332YQMGD8WTRJ9DZQXTB","worktable-review-with-annotations","Create, inspect, reply to, update, or resolve situated Worktable annotations. Use when feedback belongs to a Doc section, block, text range, or HTML Doc, or when the user asks to address existing review feedback and coordinate a requested artifact edit.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-review-with-annotations\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-review-with-annotations\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":123,"sourceHtmlUrl":124,"categories":125,"keywords":126,"publishedAt":118},"01M7DV2YGHCZVBEB1AHYB6CGHE","worktable-find-and-synthesize-context","Find, assess, and synthesize context from Worktable Docs and Records. Use when the user asks what a workspace contains, wants workspace-backed research, needs current facts reconciled across artifacts, or requests a cited synthesis without changing workspace state.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-find-and-synthesize-context\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-find-and-synthesize-context\u002FSKILL.md",[],[],{"skillNo":128,"name":129,"nameZh":6,"description":130,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":131,"sourceHtmlUrl":132,"categories":133,"keywords":134,"publishedAt":118},"01M7DV2TQN1H11ME2SAF9MXN7V","worktable-create-or-update-docs","Create, edit, rename, or maintain narrative Worktable Docs. Use for plans, decisions, briefs, notes, research syntheses, and other durable prose when the user requests a new artifact or a safe update to an existing one.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-update-docs\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-update-docs\u002FSKILL.md",[],[],{"skillNo":136,"name":137,"nameZh":6,"description":138,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":139,"sourceHtmlUrl":140,"categories":141,"keywords":142,"publishedAt":118},"01M7DV2NE452NEA8TXATKSNAJH","worktable-create-or-manage-records","Organize repeated structured information as durable Worktable Records. Use for research datasets, inventories, directories, pipelines, trackers, and other collections whose items need identity, fields, filtering, links, validation, or individual updates.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-records\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-records\u002FSKILL.md",[],[],{"skillNo":144,"name":145,"nameZh":6,"description":146,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":147,"sourceHtmlUrl":148,"categories":149,"keywords":150,"publishedAt":118},"01M7DV2HENRBR2KSCVM064WH0Y","worktable-create-or-manage-interactive-html","Create or improve durable visual and interactive artifacts in Worktable. Use for dashboards, trackers, calculators, mini apps, slide presentations, and other requests that benefit from a polished HTML Doc.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-interactive-html\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-interactive-html\u002FSKILL.md",[],[],{"skillNo":152,"name":153,"nameZh":6,"description":154,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":155,"sourceHtmlUrl":156,"categories":157,"keywords":158,"publishedAt":118},"01M7DV2CADR5R7RQFFYPNAGR9Y","worktable-collaborate-threads","Read, answer, and hand off messages through durable Worktable threads with users or other authenticated participants. Use when the user asks to check addressed messages, reply to a participant, continue a thread, request another agent's help, wait briefly for a response, or watch for comments and messages sent to the agent.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-collaborate-threads\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-collaborate-threads\u002FSKILL.md",[],[]]