Local-first design
An architecture where document reading, embedding, retrieval and answering all run on the client's own infrastructure.
A client wanted to ask questions of its internal documents without any document leaving its own infrastructure. GenAILabs built a proof of concept that reads PDFs, indexes them and answers questions with a language model that runs locally.
Snapshot
Verified status, engagement and technology.
The challenge
The business context, constraints and data handling that shaped the build.
Hosted AI services are easy to use, but they mean sending documents to a third party. The client needed to know whether a local model could answer questions about at least 20 of its own documents well enough to justify a fuller rollout.
So we built a proof of concept in which every step runs locally: reading the documents, embedding them, retrieving the relevant passages and generating the answer, with the source passages shown next to it.
Contributions
Factual breakdown of our direct engineering contributions.
An architecture where document reading, embedding, retrieval and answering all run on the client's own infrastructure.
PDFs in a folder are loaded and split into overlapping chunks, ready to be vectorised.
Chunks are embedded with an open embedding model and stored in a FAISS index, so each question retrieves the most relevant passages.
A fine-tuned open model served through a local API, with a retrieval prompt that grounds answers in the retrieved passages.
A small web app where a user types a question and gets an answer, with the matching source passages returned alongside it.
A setup script that creates the project with Poetry and installs dependencies, so the proof of concept can be reproduced on another machine.
System / solution
Local retrieval and a local model, behind a small web app.
local-llm-poc/
├── app.py web app and routes
├── setup_and_run_llm.sh project and model-server setup
├── document_processing/ PDF loading, chunking
├── langchain_integration/ embeddings, retriever, answers
├── templates/ question-and-answer page
└── static/ stylesSystem architecture
PDFs are loaded from a folder and split into overlapping chunks. Each chunk is embedded and stored in a FAISS index. When a user asks a question, the closest chunks are retrieved and passed to the local model with a retrieval prompt, and the answer is shown with its sources.
Flywheel impulse
Verified real-world deployment and support terms.
The proof of concept was demonstrated on a GenAILabs server so the client could test it on their own documents. It comes with a setup script and the application code, structured so it can be moved onto the client's hardware.
Outcomes / evidence
No usage metrics were shared. These are facts about the order and the build.
Verified evidence
20+ document brief
The proof of concept was scoped around vectorising and analysing at least 20 documents
Verified evidence
No external AI service for documents
Embeddings, search and the answering model all run locally
Verified evidence
Positive feedback on answers
During the demo the client said they liked the quality of the answers
Key outcome
A working local document Q&A proof of concept
It showed that question answering over private documents is feasible without sending them out. No production metrics were shared.
Capabilities involved
Local LLMs and retrieval-augmented generation.
Designing LLM systems that run on infrastructure the client controls, for teams that cannot send documents to third parties.
Chunking, embedding and retrieving documents so a model answers from the client's own material.
Related work
Other client projects built by the same team.
A CrewAI agent that reviews NDAs against five weighted criteria and returns scores and a clear recommendation.
An OpenAI agent that writes unique, rule-checked ads for property listings and saves them to Airtable.
Let's talk
Let's discuss the problem you're trying to solve.
Talk to our teamStop experimenting and start engineering. Let's discuss how we can turn your complex requirements into a deployed solution.