PageIndex and Codex: build vectorless RAG with Docker

Learn to build a PageIndex PDF chat app with Codex, configure API keys, fix upload errors, and run a Docker container on localhost port 8000.

Player not loading? Watch on YouTube

The tutorial builds a PDF question-answering application with PageIndex and the Codex coding assistant in Visual Studio Code. The speaker contrasts conventional embedding and vector database retrieval with PageIndex's document tree and reasoning-based tree search. He describes this approach as requiring neither vectors nor chunking.

The setup uses Python, Docker Desktop and a local project directory. Codex generates a Flask application from a prompt that includes PageIndex documentation. The environment file needs a Flask secret plus PageIndex and OpenAI API keys. Although the app runs on localhost, this setup uses external APIs and uploads the PDF to PageIndex; it does not demonstrate offline inference.

Codex also creates the Dockerfile and supplies build and container commands. The Windows walkthrough switches from Command Prompt to PowerShell after a command fails, then opens the app on port 8000. PDF upload and query errors lead to further Codex edits and repeated image builds. The description includes an optional volume mount to preserve uploaded files and chat history when recreating the container.

The final examples ask questions about a PDF and show document details and a relevant page with the answers. The speaker reports correct responses and shows an image from the document after requesting its recreation. These examples demonstrate the app's behavior on that PDF, rather than establish general retrieval accuracy.