匠人学院 JR Academy
Skip to article
Learning guide
LlamaIndex Guide

Use LlamaIndex to connect data sources, indexing pipelines, and retrieval workflows for RAG apps.

2 chapters·4 guides·Access varies by chapter
Quickstart
On this page

LlamaIndex Quickstart

Start by loading documents, building a searchable index and asking one grounded question. Add multiple sources, reranking and routing only after that loop is understood.

#Install

bash
pip install llama-index

#Minimal retrieval example

Put suitable text/PDF files in data:

python
from llama_index.core import VectorStoreIndex, SimpleDirectoryReader documents = SimpleDirectoryReader("data").load_data() index = VectorStoreIndex.from_documents(documents) query_engine = index.as_query_engine() response = query_engine.query("What are the key points in these documents?") print(response)

This source example can invoke configured external embedding and language models. Configure providers explicitly and understand their costs before running it; it was not executed as part of this translation.

#Verify the first loop

Check that the documents loaded, relevant content is retrieved and the answer stays grounded in those documents. Adding components before this check makes failures harder to locate.

#Framework focus

LlamaIndex emphasizes data ingestion, indexing and retrieval. LangChain covers broader application composition and agent workflows. Both have evolved; choose using the actual workflow rather than the source's promotional comparison of which is categorically easier or more advanced.

#Data readers

LlamaHub↗ provides integrations. A source example is:

python
from llama_index.readers.notion import NotionPageReader reader = NotionPageReader(integration_token="YOUR_TOKEN") documents = reader.load_data(page_ids=["PAGE_ID"])

Install the matching integration package and grant access only to intended data. A connector establishes access, not answer reliability.

#Next step

Published by
JR Academy
Learning resources

Individual authors and reviewers are credited where recorded.

System Design

Core system design concepts and practical case studies

Learn the trade-offs and patterns that matter in technical interviews.

Open System Design →

Related Roadmaps

Done reading? Next steps