AI Briefing
KO

LlamaIndex v0.10

·2024.02.13 04:11

Key point

A major overhaul that separates the core and integration packages and deprecates ServiceContext.

Details

LlamaIndex has moved up to v0.10.0, undergoing a major restructuring of its Python package structure. At its core is the creation of a new llama-index-core, with hundreds of integrations and templates split off into separate packages.

Moving away from the previous massive monolithic package structure, each integration is now version-managed as an independent PyPI package. However, namespace imports are preserved, so you can still use patterns like from llama_index.llms.openai import OpenAI.

The background behind this change is clear.

  • With 150+ data loaders, 35+ agent tools, 50+ LlamaPack templates, 50+ LLMs, 25+ embeddings, and 40+ vector stores all growing at once, managing dependencies and tests became difficult.
  • In the new structure, only the core abstractions remain in llama-index-core, while everything else is split into individual packages.
  • The llama-index package now includes, by default, essentially just the OpenAI-related packages and SimpleDirectoryReader.

Folder structure reorganization

llama-index-core holds the core abstractions, while llama-index-integrations contains integrations across 19 categories including LLMs, embeddings, vector stores, readers, and tools. llama-index-packs has been organized as the area housing 50+ LlamaPacks.

Expanded role of LlamaHub

The existing LlamaHub is now expanding beyond a simple loader hub into a central hub gathering all of LlamaIndex's integrations. However, this work is still in progress, and for now the full set of packages can be checked via the new Notion package registry and the GitHub repo.

Breaking changes and migration

The biggest compatibility change is import paths. Top-level package imports like from llama_index.llms import OpenAI or llama_hub imports are no longer supported. Instead, you must use the actual package path for each integration directly, and to help with this, a migration guide and automation scripts are also provided.

Deprecation of ServiceContext

Finally, ServiceContext is being deprecated. Instead of the previous approach of bundling LLM, embeddings, chunk size, callbacks, and so on into a single object, things are now simplified toward directly specifying the arguments you need or setting defaults.

This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.

Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.