[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6EFD0TSSPWSZERFMBFBVVXE":3,"skill-same:01M6EFD0TSSPWSZERFMBFBVVXE":47},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M6EFD0TSSPWSZERFMBFBVVXE","llamaindex-ts",null,"ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",66,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002FTerminalSkills\u002Fskills\u002Fllamaindex-ts\u002FSKILL.md",[],[18,19],"LlamaIndex","llamaindex ts","2026-11-10 10:12:30",false,"# LlamaIndex.TS — RAG Framework for TypeScript\n\nYou are an expert in LlamaIndex.TS, the TypeScript data framework for building RAG (Retrieval-Augmented Generation) applications. You help developers ingest, index, and query data from any source — documents, APIs, databases — and connect it to LLMs with vector indexes, knowledge graphs, structured extraction, agents, and multi-document synthesis.\n\n## Core Capabilities\n\n### Basic RAG Pipeline\n\n```typescript\nimport { VectorStoreIndex, SimpleDirectoryReader, OpenAI, Settings } from \"llamaindex\";\n\n\u002F\u002F Configure\nSettings.llm = new OpenAI({ model: \"gpt-4o\", temperature: 0.1 });\n\n\u002F\u002F Load documents\nconst documents = await new SimpleDirectoryReader().loadData(\".\u002Fdocs\");\n\n\u002F\u002F Create vector index (embeds + stores automatically)\nconst index = await VectorStoreIndex.fromDocuments(documents);\n\n\u002F\u002F Query\nconst queryEngine = index.asQueryEngine();\nconst response = await queryEngine.query(\"How do I configure authentication?\");\nconsole.log(response.toString());\nconsole.log(response.sourceNodes);         \u002F\u002F Source chunks with scores\n\n\u002F\u002F Chat (maintains conversation context)\nconst chatEngine = index.asChatEngine();\nconst chat1 = await chatEngine.chat(\"What are the main features?\");\nconst chat2 = await chatEngine.chat(\"Tell me more about the first one\");\n```\n\n### Advanced RAG\n\n```typescript\nimport {\n  VectorStoreIndex,\n  SentenceSplitter,\n  MetadataReplacementPostProcessor,\n  SentenceWindowNodeParser,\n  OpenAIEmbedding,\n} from \"llamaindex\";\n\n\u002F\u002F Sentence window retrieval (better context)\nconst nodeParser = new SentenceWindowNodeParser({\n  windowSize: 3,                           \u002F\u002F Include 3 surrounding sentences\n  windowMetadataKey: \"window\",\n});\n\nconst nodes = nodeParser.getNodesFromDocuments(documents);\n\nconst index = await VectorStoreIndex.fromNodes(nodes, {\n  embedModel: new OpenAIEmbedding({ model: \"text-embedding-3-small\" }),\n});\n\nconst queryEngine = index.asQueryEngine({\n  similarityTopK: 5,\n  nodePostprocessors: [\n    new MetadataReplacementPostProcessor({ targetMetadataKey: \"window\" }),\n  ],\n});\n\n\u002F\u002F Sub-question query engine (complex multi-part queries)\nimport { SubQuestionQueryEngine, QueryEngineTool } from \"llamaindex\";\n\nconst tools = [\n  new QueryEngineTool({ queryEngine: docsQueryEngine, metadata: { name: \"docs\", description: \"Product documentation\" } }),\n  new QueryEngineTool({ queryEngine: apiQueryEngine, metadata: { name: \"api\", description: \"API reference\" } }),\n];\n\nconst subQuestionEngine = SubQuestionQueryEngine.fromDefaults({ queryEngineTools: tools });\nconst response = await subQuestionEngine.query(\n  \"Compare the authentication methods in the docs with the API endpoints available\",\n);\n```\n\n### Agent with Tools\n\n```typescript\nimport { OpenAIAgent, FunctionTool } from \"llamaindex\";\n\nconst searchTool = FunctionTool.from(\n  async ({ query }: { query: string }) => {\n    const results = await queryEngine.query(query);\n    return results.toString();\n  },\n  { name: \"search_docs\", description: \"Search product documentation\", parameters: { type: \"object\", properties: { query: { type: \"string\" } }, required: [\"query\"] } },\n);\n\nconst sqlTool = FunctionTool.from(\n  async ({ query }: { query: string }) => {\n    const result = await db.execute(query);\n    return JSON.stringify(result);\n  },\n  { name: \"query_database\", description: \"Run SQL on analytics DB\", parameters: { type: \"object\", properties: { query: { type: \"string\" } }, required: [\"query\"] } },\n);\n\nconst agent = new OpenAIAgent({ tools: [searchTool, sqlTool] });\nconst response = await agent.chat(\"How many users signed up last week and what docs did they view?\");\n```\n\n## Installation\n\n```bash\nnpm install llamaindex\n```\n\n## Best Practices\n\n1. **Sentence windows** — Use `SentenceWindowNodeParser` for better retrieval context; includes surrounding text\n2. **Metadata filters** — Add metadata to documents; filter at query time for scoped retrieval\n3. **Sub-questions** — Use `SubQuestionQueryEngine` for complex queries that span multiple data sources\n4. **Embeddings** — Use `text-embedding-3-small` for cost-effective search; `3-large` for higher accuracy\n5. **Chunking** — Tune `chunkSize` and `chunkOverlap` in splitter; smaller chunks = more precise retrieval\n6. **Reranking** — Add a reranker post-processor to improve relevance after initial retrieval\n7. **Agents** — Use `OpenAIAgent` with tools for dynamic retrieval; agent decides which tools to call\n8. **Streaming** — Use `streamChat()` and `streamQuery()` for real-time responses in production UIs\n",{},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002FTerminalSkills\u002Fskills\u002Fllamaindex-ts",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":7,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill llamaindex-ts",{"tool":39,"command":40},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill llamaindex-ts",{"tool":42,"command":43},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill llamaindex-ts","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002FTerminalSkills\u002Fskills\u002Fllamaindex-ts\u002FSKILL.md",true,[],[48,62,72,81,87,94],{"skillNo":49,"name":50,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":58,"publishedAt":20},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[53],{"categoryNo":54,"categoryName":55,"taxonomyType":56,"taxonomyTypeDesc":57},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[59,60,61],"model","model hierarchy","model hierarchy skill",{"skillNo":63,"name":64,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":68,"publishedAt":20},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[67],{"categoryNo":54,"categoryName":55,"taxonomyType":56,"taxonomyTypeDesc":57},[69,70,71],"MCP","zoom","zoom mcp",{"skillNo":73,"name":74,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":20},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[78,79,80,70],"sdk","zoom apps sdk","apps",{"skillNo":82,"name":83,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":20},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[83],{"skillNo":88,"name":89,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":93,"publishedAt":20},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[92],{"categoryNo":54,"categoryName":55,"taxonomyType":56,"taxonomyTypeDesc":57},[89],{"skillNo":95,"name":96,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":20},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[96]]