To build a RAG app with LlamaIndex, install llama-index for the OpenAI starter route or install llama-index-core plus the integrations you choose. Load files with SimpleDirectoryReader, build a VectorStoreIndex, persist the storage context, and query the index with index.as_query_engine(). LlamaIndex is free under the MIT licence; in our worked example, the model-token cost is about $1.63 a month before hosting and admin time.
A RAG app fails in a boring way: it finds the wrong paragraph, then answers like it found the right one. The model gets blamed, but the real problem is usually earlier — the documents were loaded badly, the index was rebuilt with a different embedding model, or nobody tested whether retrieval returned the right evidence.
This guide shows how to build a RAG app with LlamaIndex, the open-source Python framework for connecting language models to your own documents. You will install LlamaIndex, load business files, build a VectorStoreIndex, persist it so it survives restarts, and query it through a query engine or an agent tool. Then you will add the parts a demo skips: source checks, refusal behaviour, backups, updates, and a real cost test.
Quick Answer
To build a RAG app with LlamaIndex, install llama-index for the OpenAI starter route or install llama-index-core plus the integrations you choose. Load files with SimpleDirectoryReader, build a VectorStoreIndex, persist the storage context, and query the index with index.as_query_engine(). LlamaIndex is free under the MIT licence; in our worked example, the model-token cost is about $1.63 a month before hosting and admin time.
In this article
- How we checked this guide
- What LlamaIndex replaces, and what it does not
- How a RAG app with LlamaIndex works
- Starter bundle, custom install, local models, or LlamaParse
- Requirements before you build a RAG app with LlamaIndex
- Step 1: install LlamaIndex
- Step 2: prepare documents that retrieval can trust
- Step 3: build the first VectorStoreIndex
- Step 4: persist and reload the index
- Step 5: query the index and show sources
- Step 6: add an agent tool only when it helps
- Step 7: test retrieval before users trust it
- First-run security steps you must not skip
- Backup and update routine
- Common errors and fixes
- Tips and tricks that save money
- The real cost maths
- When not to self-host a LlamaIndex RAG app
- Pros and cons
- Our verdict
- FAQ
- Strategic Pivot
- Sources
How we checked this guide
We checked licence, installation, starter code, local-model setup, storage, and concepts in the official LlamaIndex GitHub repository and developer documentation on December 2, 2026. We checked optional parsing prices on LlamaIndex’s official pricing page and model-token rates on OpenAI’s official model pages the same day.
What LlamaIndex replaces, and what it does not

LlamaIndex replaces the glue code between your documents and a language model. Without a framework, you write your own file loading, chunking, embedding calls, vector search, prompt assembly, and answer formatting. That is doable for a weekend prototype. It becomes fragile when documents change, when you need sources, or when a second person has to maintain the app.
LlamaIndex gives those jobs named parts. Readers load data. Indexes structure it. Retrievers find relevant chunks. Query engines turn a question into an answer with retrieved context. Agents can call the index as one tool among others. Workflows orchestrate multi-step processes when one query is not enough.
The framework is open source under the MIT licence. In plain words, you may use, copy, modify, and distribute it without a licence fee, subject to the licence terms. The framework licence cost is $0. Your model provider, server, storage, backups, monitoring, and admin time still cost money.
LlamaIndex does not replace your documents. If a scanned PDF becomes broken text, if a price table loses its headings, or if two versions of a policy sit in the same folder, the app will retrieve bad evidence quickly. It also does not replace the language model. You still choose a hosted API model or a local model, and that choice controls cost, privacy, speed, and answer quality.
Best for: a small-business owner, freelancer, or technical operator who wants a document question-answering app inside a website, support flow, internal tool, or product. Skip if: you need a finished no-code chatbot today, nobody on the team can maintain Python, or your documents are too messy to index without cleanup.
If you want the finished workspace first, our guide to install AnythingLLM to chat with business documents covers a ready-made document-chat app. Choose AnythingLLM when the workspace is the product. Choose LlamaIndex when the RAG app is a feature you control.
How a RAG app with LlamaIndex works
RAG means retrieval-augmented generation. The app does not train the model on your files. It indexes your files, retrieves only the relevant parts at question time, and sends those parts with the question so the model can answer from evidence.
The build has two separate jobs. Indexing prepares knowledge. Querying answers questions. Keeping those jobs separate matters because indexing can run on a schedule, while querying must be fast and predictable for users.
During indexing, a reader loads documents. LlamaIndex turns them into document objects, splits them into chunks, embeds the chunks, and stores the vectors with metadata. Metadata should include the source file, title, section, version, date, product, customer group, or permission label. That metadata is how the app avoids mixing a current refund policy with an archived one.
During querying, the question is embedded with the same embedding model used for the documents. The retriever searches for close chunks. The query engine sends the question and retrieved context to the language model. A good app also returns the source chunks so a human can check the answer.
The answer is only as good as the retrieved chunks. If the right chunk is missing, a stronger model cannot safely invent it. If the right chunk is present but the prompt allows guessing, the model may still add facts that are not in your documents. That is why this guide treats retrieval testing and refusal behaviour as build steps, not polish.
Starter bundle, custom install, local models, or LlamaParse
You have four practical routes. The right one depends on whether this is a prototype, a private internal tool, or a customer-facing app with document permissions.
| Route | Licence or base price | Best for | Main limit |
|---|---|---|---|
| LlamaIndex starter bundle | $0 licence fee, MIT | Fastest OpenAI-based prototype | You still pay model-token costs and own hosting |
| LlamaIndex custom install | $0 licence fee, MIT | Choosing your own LLM, embeddings, readers, and vector store | More packages to pin, test, and update |
| Local models with Ollama | $0 licence fee, MIT | Private documents on your own machine | Needs stronger hardware and slower local inference |
| LlamaParse platform | $0/month pay-as-you-go with 10,000 free credits monthly; Pro $500/month | Hard PDFs, scans, tables, and managed parsing | Commercial platform; credits and document handling must be budgeted |
The starter bundle is the lean route for a first build. A custom install is better when you already know you need Ollama, a specific vector store, or a non-OpenAI embedding model. Local models are attractive for privacy, but the official local tutorial warns that the example machine needs at least about 32GB of RAM. LlamaParse is not the framework; it is the commercial parsing platform for harder documents. Use it when document quality, not framework code, is the bottleneck.
Requirements before you build a RAG app with LlamaIndex
You need Python, a project folder, and a small test corpus before you need a production architecture. Start with 20 to 50 clean documents that represent real questions. A folder with every file the business has ever saved is a bad first index.
For the OpenAI starter route, you need an OpenAI API key in an environment variable. Do not paste the key into code that will be committed, screenshotted, or shared. For the local route, you need Ollama installed, a local model pulled, and enough memory for the model and embedding model.
You also need a storage decision. The default in-memory index is fine for a first run. It is not fine for an app that restarts. Persist the index to disk for a small single-server app, or use a vector store when you need filtering, backups, multiple app instances, or larger scale. Our guides to install Chroma vector database for RAG apps and use pgvector for AI search in PostgreSQL cover two common next steps.
Finally, write ten test questions before you build. Five should have clear answers in the documents. Two should require combining two chunks. Two should be unanswerable from the documents. One should ask for a private or outdated fact that the app must not reveal. If you cannot write those questions, you are not ready to judge the app.
Step 1: install LlamaIndex

Create a virtual environment first. This keeps LlamaIndex packages separate from other Python tools on the machine and makes updates easier to test.
For the fastest starter route, install the bundle:
pip install llama-indexThe official installation guide says the starter bundle contains llama-index-core, llama-index-llms-openai, llama-index-embeddings-openai, and llama-index-readers-file. That is enough for the OpenAI starter example and common file reading.
Set the API key as an environment variable:
export OPENAI_API_KEY="your-key-here"On Windows, use the equivalent environment-variable command for your shell. The point is simple: the key belongs in the environment or a secrets manager, not in the source file.
For a custom local install, install core plus the integrations you actually use:
pip install llama-index-core llama-index-readers-file llama-index-llms-ollama llama-index-embeddings-huggingfaceThat local route matches the official local-models tutorial pattern: Ollama serves the language model, and a HuggingFace embedding model creates vectors locally. It avoids hosted API calls for the model and embeddings, but it moves the cost into hardware, electricity, and maintenance.
Pin versions after the prototype works. LlamaIndex moves quickly, and integration packages have their own release rhythm. A requirements.txt or lock file turns “it worked on my laptop” into a repeatable deploy.
Step 2: prepare documents that retrieval can trust
Create a data folder for the first corpus. Put in only documents that are current, readable, and allowed for the app’s audience. Remove drafts, duplicate exports, and old policy versions before indexing. Retrieval cannot know which PDF your business meant to retire.
Use text-based files first. Clean Markdown, text, DOCX, and text-based PDFs are easier to judge than scans. If a document is a scan, a form, or a slide deck with important tables, test the extracted text before you blame the retriever. The framework docs are blunt about this: built-in readers are fine for clean text, while hard documents need better parsing.
Keep source names meaningful. refund-policy-2026.md is better than final-final-2.pdf. Add metadata when you load or store documents: source, version, date, owner, product, and permission group. Later, those fields let you filter retrieval instead of hoping similarity search respects business rules.
Chunking is the hidden quality lever. Chunks that are too large bring noisy context and raise token cost. Chunks that are too small lose the sentence that makes the answer true. Start with the defaults, inspect retrieved chunks for your ten test questions, then adjust chunk size and overlap based on failures you can see.
Step 3: build the first VectorStoreIndex

The smallest useful LlamaIndex RAG app loads documents, builds a vector index, and queries it. The official starter tutorial uses SimpleDirectoryReader, VectorStoreIndex.from_documents, and index.as_query_engine().
A minimal script looks like this:
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 is our refund window?")
print(response)That script proves the path works. It does not prove the app is trustworthy. Print the retrieved source nodes during testing so you can see which chunks supported the answer. If the answer sounds right but the sources are wrong, the app is lucky, not correct.
The starter docs note an important default: if no embedding model is configured, VectorStoreIndex falls back to OpenAI embeddings, and for new projects the docs recommend passing text-embedding-3-small explicitly. Be explicit in production code. Embedding choice affects retrieval quality, cost, and whether an old index can be reused.
For the local route, set the embedding model and LLM through Settings before building the index. The official local tutorial uses BAAI/bge-base-en-v1.5 for embeddings and llama3.1 through Ollama. The exact model can change; the rule cannot: build and query with the same embedding model.
Step 4: persist and reload the index
An in-memory index disappears when the process stops. For a small app, persist the storage context to disk:
index.storage_context.persist("storage")Later, reload it instead of re-embedding every document:
from llama_index.core import StorageContext, load_index_from_storage
storage_context = StorageContext.from_defaults(persist_dir="storage")
index = load_index_from_storage(storage_context)
query_engine = index.as_query_engine()Persisting saves time and embedding cost. It also creates a new responsibility: the stored index is now production data. Back it up with the source documents and the code version that built it. If you change the embedding model, chunking, or document set in a material way, rebuild the index instead of mixing old and new vectors.
Move to a vector store when disk storage stops being enough. Signs include multiple app servers, metadata filters, access control by customer or department, frequent document updates, or a corpus too large for a simple folder. LlamaIndex can load an index from a vector store, but the operational work belongs to that store: backups, indexes, credentials, and restore tests.
Step 5: query the index and show sources
A query engine is the right first interface. It takes a natural-language question, retrieves context, and returns an answer. For a business app, wrap that answer with source display and a refusal rule.
Your prompt or system instruction should say, in effect: answer only from the retrieved context; if the context does not contain the answer, say you do not know; cite the source document or section when possible. Do not ask the model to be helpful in a way that rewards guessing. In RAG, a clean refusal is a feature.
Show sources in the user interface. A support agent, teacher, or shop owner needs to check the evidence before sending an answer to a customer. Source display also makes debugging faster: when the answer is wrong, you can see whether retrieval failed or generation ignored good context.
Control retrieved context size. More chunks can improve recall, but they also raise input-token cost and can bury the right paragraph under near-duplicates. Start with a small number of chunks, measure test-question accuracy, and increase only when failures show missing evidence.
Step 6: add an agent tool only when it helps
LlamaIndex agents can call tools. That means the index can become one tool beside a calculator, a database lookup, a ticket system, or an order-status function. The starter tutorial shows this pattern: a document-search function wraps the query engine, and a FunctionAgent decides whether to search documents or use another tool.
Agents help when the app must choose between actions. They hurt when the job is simply “answer from these documents.” A plain query engine is easier to test, cheaper to run, and less likely to wander. Add an agent when users ask mixed questions such as “check the policy, calculate the refund, and draft the reply.”
Keep tool boundaries narrow. A document-search tool should search only the documents that the current user may see. A calculator tool should calculate, not browse files. A ticket tool should require confirmation before it changes customer data. The framework can orchestrate tools; your app must still enforce permissions.
If your use case needs explicit pipeline components and evaluators more than agent tools, compare this route with our guide to build a RAG chatbot with Haystack. LlamaIndex is often faster to a working document app. Haystack can be clearer when every pipeline component must be inspected.
Step 7: test retrieval before users trust it
Test retrieval separately from generation. For each test question, record the expected source, the retrieved chunks, the final answer, and whether the answer stayed inside the evidence. This small table is more useful than a vague feeling that the demo “seems smart.”
Use four failure labels. Missing evidence means the right chunk was not retrieved. Bad chunk means the right document was found but split poorly. Stale evidence means an old version outranked the current one. Generation drift means the right chunk was retrieved but the answer added unsupported facts. Each label points to a different fix.
Test refusal on purpose. Ask about a policy that is not in the documents. Ask for a customer’s private data. Ask a question whose answer changed last month. The app should refuse, ask for clarification, or route to a human. If it invents a confident answer, do not launch it to customers.
Re-run the test set after every document update, embedding change, chunking change, model change, or prompt change. RAG quality is not a one-time score. It is a regression test for your business knowledge.
First-run security steps you must not skip
Treat the index as a copy of your documents. If the source files are private, the vectors, chunks, logs, and backups are private too. Put the app behind authentication before real users touch it. A public demo folder is not a production permission model.
Filter by permission before generation. If a user may see only their own invoices, retrieval must search only that user’s documents. Do not retrieve everything and ask the model to hide the rest. The model should never receive context the user is not allowed to see.
Keep API keys out of code and logs. Use environment variables or a secrets manager. Rotate keys when staff leave or when a key appears in a screenshot, ticket, or repository. Set provider spend limits where available so a bug or abuse loop cannot turn into a surprise bill.
Log questions carefully. Logs help debugging, but they may contain customer names, order details, or private document text. Decide what to store, how long to keep it, and who can read it. For regulated or sensitive work, local models and private storage may be worth the extra operations.
Backup and update routine
Back up four things together: source documents, persisted index or vector-store data, code and dependency lock file, and configuration that names the embedding model, LLM, chunking settings, and prompt. A backup that restores vectors without the embedding model is a puzzle, not a recovery plan.
Test restore on a separate folder or staging server. Load the index, run the ten test questions, and confirm the same sources appear. Backups that have never been restored are hopes with timestamps.
Update in small steps. Upgrade LlamaIndex and integrations in a staging environment, rebuild or reload the index as required, run the test set, and compare cost and latency. Do not upgrade the framework, change the embedding model, rewrite the prompt, and replace the document corpus in one deploy. When quality drops, you will not know which change caused it.
Schedule document refreshes. New policies, prices, manuals, and help-centre articles should enter the index through a known process. Remove retired documents from the source folder and rebuild or update the index. Stale chunks are not a model problem; they are a content-operations problem.
Common errors and fixes
The app answers from the wrong document. Check metadata and filters first. Remove retired versions, add version and date metadata, and filter retrieval to current documents. If two documents truly conflict, fix the source of truth before tuning the model.
The answer is fluent but unsupported. Inspect retrieved chunks. If the right chunk is present, tighten the prompt and require citations. If the right chunk is absent, fix chunking, document extraction, or retrieval settings before changing the LLM.
Reloaded index behaves strangely. Confirm the same embedding model is used for building and querying. The docs warn that loading from storage or a vector store should use the same embedding model that built the index. Mixed embedding spaces produce nonsense similarity.
Local model is too slow or runs out of memory. Use a smaller model, reduce context, or move the LLM to a hosted API while keeping embeddings local. The official local example is not a promise that every laptop can run it well; it warns about memory for a reason.
PDF answers miss tables. Test the extracted text. If tables collapse into unreadable lines, use a better parser for those files or clean the source. LlamaParse exists for this problem, but its credits must be budgeted. Do not pay for parsing until you prove the free reader is the failure point.
Costs jump after launch. Count input tokens, not only questions. Long retrieved context, retries, agent loops, and evaluation runs can cost more than the visible answers. Reduce chunk count, cache stable answers where appropriate, and set provider limits.
Tips and tricks that save money
Start with the starter bundle, then remove what you do not use. A custom install is cleaner for production, but only after you know which integrations matter.
Use text-embedding-3-small explicitly when you choose OpenAI embeddings. The checked price is $0.02 per 1M tokens, so embeddings are rarely the budget problem for a small corpus. The expensive mistake is re-embedding the same documents on every restart. Persist the index.
Keep answers short when the job allows it. Output tokens cost more than input tokens in the checked GPT-4o mini rates. A concise answer with sources is often better for support work and cheaper than a long essay.
Use local embeddings when privacy or repeated indexing matters. Local embeddings remove per-token embedding fees, but they add model download, memory, and update work. Choose them for control, not because the word “free” hides operations.
Parse hard documents only once. If you use LlamaParse, cache parsed output with the source file version. The pricing page says re-parsing a cached file costs nothing, but your app should still avoid needless jobs and keep parsed text under the same backup rules as source documents.
The real cost maths

LlamaIndex itself is $0 under the MIT licence. The real bill comes from model tokens, optional parsing, hosting, storage, and admin time. Here is a small-business scenario with the assumptions stated plainly.
Assume a service business indexes 300 PDFs averaging 8 pages each: 2,400 pages. At roughly 800 tokens per page, the corpus is about 1.92M embedding tokens. With text-embedding-3-small at $0.02 per 1M tokens, the first embedding pass costs about $0.04. That is not the budget problem.
Now assume 3,000 questions a month. Each answer sends about 2,200 input tokens of retrieved context, question, and instructions, and returns about 350 output tokens. At the checked GPT-4o mini rates — $0.15 per 1M input tokens and $0.60 per 1M output tokens — input cost is $0.99 and output cost is $0.63. Query embeddings add less than a cent. The model-token total is about $1.63 a month.
| Cost item | Worked example | Monthly cost |
|---|---|---|
| LlamaIndex framework | MIT licence | $0 |
| First document embeddings | 1.92M tokens × $0.02/1M | $0.04 one-time |
| Question answering input | 3,000 × 2,200 tokens × $0.15/1M | $0.99 |
| Question answering output | 3,000 × 350 tokens × $0.60/1M | $0.63 |
| Query embeddings | 3,000 short questions | under $0.01 |
| Model-token total | Before hosting, storage, retries, and admin | about $1.63/month |
Optional parsing changes the first month, not the licence. If those 2,400 pages need LlamaParse Agentic parsing at 10 credits per page, they use 24,000 credits. The pay-as-you-go plan includes 10,000 free credits every month, then charges $1.50 per 1,000 credits. Parsing all pages in one month would cost about $21.00 after the free monthly credits. The Fast tier at 1 credit per page would use 2,400 credits and fit inside the free monthly allowance. Pro at $500/month is not justified by this volume.
The lean choice is self-hosted LlamaIndex with persisted storage and a small hosted model, or local models if privacy requires them. The full stack adds a vector store, managed parsing, monitoring, evaluation, and admin time. Buy those when document volume, permissions, or answer risk proves the need.
When not to self-host a LlamaIndex RAG app
Do not self-host when nobody will own document updates. A RAG app with stale files is worse than a search box because it sounds certain. If policies change weekly and no one removes old versions, fix content operations first.
Do not self-host when the team needs a finished chatbot today and has no Python help. A ready-made document-chat workspace will be faster and safer than a half-maintained framework app.
Do not self-host customer-facing answers without permission filtering, refusal tests, and human escalation. If wrong answers can create refunds, legal promises, medical risk, or account harm, the app needs stricter controls than a demo.
Do not choose local models only to avoid API fees if the hardware is weak. Slow answers and memory failures cost staff time. Privacy can justify local models; a tiny token bill usually cannot.
Pros and cons
Pros
- Free MIT framework with no LlamaIndex licence fee.
- Fast path from documents to a query engine with
SimpleDirectoryReaderandVectorStoreIndex. - Starter bundle for OpenAI and custom installs for Ollama, HuggingFace embeddings, and other integrations.
- Persisted storage avoids re-embedding documents on every restart.
- Agents and workflows are available when the app needs tools beyond document search.
Cons
- You must operate Python services, storage, backups, updates, and monitoring.
- Retrieval quality depends on document preparation, chunking, metadata, and embedding choices.
- Hosted model costs scale with questions, context size, retries, and evaluation runs.
- Permissions must be designed into retrieval; LlamaIndex does not make unsafe document access safe by itself.
- Hard documents may need better parsing, which can add LlamaParse credits or cleanup work.
Our verdict
Build a RAG app with LlamaIndex when you need a controllable document app and can maintain the documents behind it. Start with a small corpus, explicit embeddings, persisted storage, source display, and a refusal test. Add agents, vector stores, or managed parsing only after the simple query engine passes your test questions.
Skip LlamaIndex when you need a finished chatbot today or when nobody will maintain documents and infrastructure. The framework is free. A trustworthy RAG app is not.
FAQ
Is LlamaIndex free for a RAG app?
Yes. LlamaIndex is open source under the MIT licence, so the framework licence fee is $0. You still pay for hosting, storage, model usage or local hardware, backups, monitoring, and admin time.
Do I need a vector database to build a RAG app with LlamaIndex?
No. You can start with the default index and persist it to disk for a small app. Move to a vector store when you need metadata filters, multiple servers, larger scale, or stronger backup and access controls.
Why does my LlamaIndex RAG app still hallucinate?
Usually because retrieval returned the wrong chunks, the chunks were stale or badly split, or the prompt allowed answers beyond the context. Inspect source chunks, require citations, and give the model a fixed refusal sentence.
Can LlamaIndex use local models instead of OpenAI?
Yes. The official local-models tutorial uses Ollama for the LLM and a HuggingFace embedding model for vectors. That keeps model calls local, but the example needs a capable machine and you still own updates and backups.
How much does a LlamaIndex RAG app cost?
The LlamaIndex licence is $0. In our worked example, 3,000 questions a month cost about $1.63 a month in model tokens at the checked OpenAI rates, before hosting, storage, retries, evaluation, and admin time.
Strategic Pivot
Before you choose a model, vector store, or parsing plan, price the whole stack, not only the licence. Use our AI Cost Calculator to compare the lean self-hosted route with managed parsing once you have your document pages, monthly questions, token estimate, and hosting cost.
Sources
- LlamaIndex GitHub repository: https://github.com/run-llama/llama_index
- LlamaIndex framework documentation: https://developers.llamaindex.ai/python/framework/
- LlamaIndex installation guide: https://developers.llamaindex.ai/python/framework/getting_started/installation
- LlamaIndex starter tutorial using OpenAI: https://developers.llamaindex.ai/python/framework/getting_started/starter_example/
- LlamaIndex starter tutorial using local LLMs: https://developers.llamaindex.ai/python/framework/getting_started/starter_example_local/
- LlamaIndex high-level concepts: https://developers.llamaindex.ai/python/framework/getting_started/concepts/
- LlamaIndex pricing: https://www.llamaindex.ai/pricing
- OpenAI text-embedding-3-small model pricing: https://developers.openai.com/api/docs/models/text-embedding-3-small
- OpenAI GPT-4o mini model pricing: https://developers.openai.com/api/docs/models/gpt-4o-mini?site_locale=en
Price note — updated December 2, 2026: Prices in this post were checked on December 2, 2026. When you are reading this, the price may be lower or higher — always check the official pricing page before you buy.
Pros
- Free MIT framework
- fast path from documents to a query engine
- starter bundle for OpenAI and custom installs for Ollama and HuggingFace embeddings
- persisted storage avoids re-embedding on restart
- agents and workflows are available when tools are needed
Cons
- You must operate Python services, storage, backups, updates, and monitoring
- retrieval quality depends on document preparation, chunking, metadata, and embeddings
- hosted model costs scale with questions and context
- permissions must be designed into retrieval
- hard documents may need better parsing or cleanup
Build a RAG app with LlamaIndex when you need a controllable document app and can maintain the documents behind it. Start with a small corpus, explicit embeddings, persisted storage, source display, and a refusal test. Skip it when you need a finished chatbot today or nobody will maintain documents and infrastructure.
