LlamaIndexllama-index-core 0.14 · Python 3.10+
0%
1
Curious builder0 XP earned · 300 to level 2
0 daysFinish a lesson to begin
Badge collection0 of 6 unlocked
21 small wins to finish your pathNext lesson

Installation and setup

LlamaIndex installs as a core package plus one integration per model or store. Left unset, it calls OpenAI; this course uses local and stand-in models instead.

llama-index-core and two integrations

llama-index-core is the framework. The other two are integrations, installed separately as LlamaIndex does for every model and store: local embeddings through Hugging Face, and keyword search with BM25. Allow about 1 GB of disk for PyTorch and two small models.

pip install "llama-index-core==0.14.24" "llama-index-embeddings-huggingface==0.8.0" "llama-index-retrievers-bm25==0.8.0"
Example
from importlib.metadata import version

print(version("llama-index-core"))

An answering model from a free providerOptional

If no model is set, LlamaIndex uses OpenAI for answers and embeddings, which needs a paid key. The course sets a local embedding model in lesson 3 and a stand-in answering model in lesson 11, so neither default is used. A real answering model is one integration package and one line in Settings.

python
from llama_index.core import Settings
from llama_index.llms.groq import Groq

Settings.llm = Groq(model="openai/gpt-oss-120b")
ProviderKeyVariablePackage and class
GroqFree, console.groq.com/keysGROQ_API_KEYllama-index-llms-groq, Groq(model="openai/gpt-oss-120b")
GeminiFree, aistudio.google.com/apikeyGOOGLE_API_KEYllama-index-llms-google-genai, GoogleGenAI(model="gemini-2.5-flash")
OpenRouterFree models end in :free, openrouter.ai/keysOPENROUTER_API_KEYllama-index-llms-openrouter, OpenRouter(model="google/gemma-4-31b-it:free")
OpenAIPaid, platform.openai.com/api-keysOPENAI_API_KEYllama-index-llms-openai, OpenAI(model="gpt-4o-mini")
pip install "llama-index-llms-groq==0.6.0"
export GROQ_API_KEY=gsk_...
Try it yourself
  • Run pip list and count the packages whose names start with llama-index.

Little by little, you're building something great.