Example
LlamaIndex — implementation sample

A real, runnable mini-project. Download it and run with Docker.

June 28, 2026

LlamaIndex — implementation sample

A tiny LlamaIndex sample: it indexes two documents and answers a question grounded in them (OpenAI embeddings + LLM).

Configure

cd samples/llamaindex_1
cp .env.sample .env
# edit .env: set OPENAI_API_KEY (used for embeddings + the LLM)

Run with Docker

cd samples/llamaindex_1
docker build -t aas-llamaindex .
docker run --rm --env-file .env aas-llamaindex "What language is Qdrant written in?"

Run with Docker (in a devcontainer with DooD)

The foreground docker run may print nothing under Docker-outside-of-Docker — run detached and follow the logs:

docker logs -f "$(docker run -d --env-file .env aas-llamaindex "What language is Qdrant written in?")"

Run locally

cd samples/llamaindex_1
pip install -r requirements.txt
python app.py "What language is Qdrant written in?"

Example run

Output varies by model and run — LLMs are non-deterministic. One run with gpt-4o-mini:

Qdrant is written in Rust.

Files

.env.sample
# Copy to `.env` and add your OpenAI API key (used for embeddings + the LLM).
#   cp .env.sample .env
OPENAI_API_KEY=

MODEL=gpt-4o-mini