Data framework for AI
How to use
LlamaIndex.
Loading and indexing private data, building source-grounded retrieval applications, composing workflows and agents, and evaluating retrieval and response quality.
LlamaIndex is a open-source data framework for retrieval-augmented generation and agent workflows. Loading and indexing private data, building source-grounded retrieval applications, composing workflows and agents, and evaluating retrieval and response quality. This guide covers the whole path in one place: official access, a first session that produces something reviewable, the checks that make output trustworthy, and the permissions worth limiting before you connect real work.
AI should make the work easier to inspect. If the workflow removes the source, the owner, or the review step, redesign the workflow.
Access & setup
Find, install, and sign in to LlamaIndex
Get into the official LlamaIndex experience with the right account and a setup you understand.
- 01
Start at https://www.llamaindex.ai/ and confirm the domain before entering account or payment information.
- 02
Availability: LlamaIndex is installed as Python or TypeScript packages and used in an application development environment.
- 03
A supported programming runtime, model and embedding access, a controlled source corpus, and storage or vector infrastructure appropriate to the workload.
- 04
Sign in with the account you intend to keep using, then review plan, data, notification, and permission settings.
- 05
Run one low-risk test task before connecting sensitive files, repositories, or workspace data.
- Use official download pages.
- Review permissions during setup.
- Keep installers and applications updated.
First session
Your first useful LlamaIndex session
Learn the interaction loop using a small task with a clear outcome.
- 01
Define a small approved document corpus, access rules, expected questions, and a benchmark with expected source IDs.
- 02
Load documents with stable metadata, choose chunking and embeddings, and build a persistent index.
- 03
Query the index and inspect retrieved nodes and citations before judging the generated answer.
- 04
Measure retrieval relevance and response faithfulness, then version the corpus and settings before iteration.
- State the outcome before the background.
- Provide the real source material.
- Review the result before expanding the task.
Quality control
Check the quality of LlamaIndex output
Establish that an autonomous run did the right thing, not merely that it finished.
- 01
Define what the run should achieve and what it must never touch before granting it a single tool.
- 02
Read the full execution trace: which tools were called, with what arguments, and in what order.
- 03
Verify the side effects directly in the target system rather than trusting the agent's own report of success.
- 04
Confirm failures surfaced as failures — a silent retry loop or a swallowed error is more dangerous than a crash.
- 05
Re-run the same task and compare: an agent that behaves differently across identical runs is not yet production-ready.
- Verify side effects in the system of record, not in the agent's summary.
- Require human approval for any irreversible or outward-facing action.
- Log every tool call so a run can be reconstructed afterwards.
Privacy & permissions
Use LlamaIndex safely
Bound what an autonomous system can reach before you let it run unattended.
- 01
Enumerate every tool, credential, and system the agent can reach, and remove the ones it does not need.
- 02
Require explicit human approval for irreversible actions: sending, publishing, paying, deleting, or deploying.
- 03
Run against non-production data until behaviour is predictable across repeated runs.
- 04
Set hard limits on spend, iterations, and runtime so a failure loop cannot run unbounded.
- 05
Treat anything the agent reads from the web or a document as data, never as instructions it may follow.
- RAG can retrieve irrelevant, stale, private, or malicious content and still produce fluent answers. Enforce access during retrieval, sanitize sources, preserve citations, separate retrieval and response evaluation, and protect traces and model credentials.
- Follow your organisation's approved-use policy.
- Never treat fluent output as authorization to act.
Core workflows
Step-by-step ways to use LlamaIndex for the work it does best.
Each workflow below has its own outcome, steps and review checkpoints.
Load controlled documents, retrieve relevant evidence, and produce answers whose citations can be inspected.
↓ 02 WorkflowEvaluate and monitor a LlamaIndex applicationMeasure retrieval and response quality with a versioned dataset and trace failures to individual pipeline stages.
↓Workflow 01
Build a source-grounded RAG pipeline with LlamaIndex
Load controlled documents, retrieve relevant evidence, and produce answers whose citations can be inspected.
Outcome: Create a reproducible retrieval workflow that answers from approved sources instead of model memory alone.
- 01
Define the corpus owner, allowed questions, freshness rules, access policy, citation requirements, and a benchmark with expected sources.
- 02
Load clean documents with stable IDs and metadata, remove duplicates and secrets, then choose chunking and embedding settings deliberately.
- 03
Build and persist the index, configure retrieval depth and filters, and ensure tenant or document permissions apply before generation.
- 04
Run the benchmark and inspect retrieved nodes separately from final answers for relevance, missed evidence, conflicts, and leakage.
- 05
Tune one retrieval variable at a time, version the corpus and index configuration, and schedule refresh and regression evaluation.
What good use looks like
- Evaluate retrieval before generation.
- Preserve source IDs and metadata.
- Enforce permissions during retrieval.
Workflow 02
Evaluate and monitor a LlamaIndex application
Measure retrieval and response quality with a versioned dataset and trace failures to individual pipeline stages.
Outcome: Replace anecdotal RAG testing with repeatable evidence for relevance, faithfulness, latency, and cost.
- 01
Create a representative dataset with queries, expected source IDs, reference answers or criteria, and difficult no-answer cases.
- 02
Measure retrieval with appropriate ranking metrics and inspect false positives, false negatives, permission errors, and stale documents.
- 03
Measure response faithfulness, relevance, correctness, citation support, refusal behavior, latency, and model or embedding cost.
- 04
Trace loading, indexing, retrieval, reranking, prompt construction, and generation so each failed example has a diagnosable stage.
- 05
Set release thresholds, compare changes against a fixed baseline, review evaluator disagreements, and monitor sampled production traffic safely.
What good use looks like
- Keep a fixed regression set.
- Separate retrieval and answer metrics.
- Review automated evaluator failures manually.
Official references
Check the current product documentation.
Features, plan limits, availability, and data controls change. These official pages are the starting points used for this guide.