• Client Project
  • Local LLM

Local LLM Proof of Concept

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.

Delivered
Local LLM Proof of Concept: fully local processing, PDF ingestion, chunking and vector search, local language model, question-and-answer app, setup script
What the agent does

Snapshot

Delivery, status and stack.

Verified status, engagement and technology.

Client / Context
Confidential client, delivered as a freelance project
Engagement
Client project: a proof of concept for a document Q&A system that runs on local infrastructure
Status
Proof of concept demonstrated in early 2024
Technology
LangChain, sentence-transformers, FAISS, a local language model, Flask, Poetry

The challenge

AI that keeps documents in-house.

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

What GenAILabs worked on.

Factual breakdown of our direct engineering contributions.

01

Local-first design

An architecture where document reading, embedding, retrieval and answering all run on the client's own infrastructure.

02

Document ingestion

PDFs in a folder are loaded and split into overlapping chunks, ready to be vectorised.

03

Vector search

Chunks are embedded with an open embedding model and stored in a FAISS index, so each question retrieves the most relevant passages.

04

Local language model

A fine-tuned open model served through a local API, with a retrieval prompt that grounds answers in the retrieved passages.

05

Question-and-answer app

A small web app where a user types a question and gets an answer, with the matching source passages returned alongside it.

06

Project setup

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

How the agent is built.

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/                   styles

System 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

Delivery and handover.

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.

Built by GenAILabs
The retrieval pipeline, the local-model integration, the web app and the setup script.
Demonstrated live
The system was run on a GenAILabs server so the client could ask questions of their own documents and judge the answers.
Next step: the client's server
Moving the model and code onto the client's own hardware is the last step of any local deployment, and the part that depends on their environment.

Outcomes / evidence

Verified facts about the build.

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

How core competencies were applied.

Local LLMs and retrieval-augmented generation.

01

Private and Local AI

Designing LLM systems that run on infrastructure the client controls, for teams that cannot send documents to third parties.

02

Retrieval-Augmented Generation

Chunking, embedding and retrieving documents so a model answers from the client's own material.

Related work

Related work.

Other client projects built by the same team.

Client ProjectDelivered

NDA Analysis Agent

A CrewAI agent that reviews NDAs against five weighted criteria and returns scores and a clear recommendation.

View Case Study
Client ProjectDelivered

Property Ad Agent

An OpenAI agent that writes unique, rule-checked ads for property listings and saves them to Airtable.

View Case Study

Let's talk

Have a similar challenge?

Let's discuss the problem you're trying to solve.

Talk to our team

Contact us

Stop experimenting and start engineering. Let's discuss how we can turn your complex requirements into a deployed solution.

Project intake

* Required fields