• AI Agents
  • AI Development
  • Generative AI

Self-Hosted AI Document Assistant: Nothing Leaves Your Perimeter

Some companies may not send their documents to an outside AI service, yet most of what they know sits in free text that nobody can query. This solution is designed for them. People ask in plain language, local models read the question, a planner built from tested parts counts the answer, and the documents stay inside the company's perimeter.

Facing a similar challenge? Tell us about the task, and we will show how we would build it for your business.

Build Something Like This for Me

Free 30-min call · One-page solution outline within three business days · No commitment

Self-Hosted AI Document Assistant: Nothing Leaves Your Perimeter

More Documents Than Anyone Can Ask

Contracts, reports, correspondence, inspection records and tickets pile up in systems built to run the business, not to answer questions about it. Most of what matters is free text, in templates that differ by department and keep changing. A question that takes ten seconds to ask becomes a ticket to IT or a manual review, and often it is simply never asked.

Two constraints rule out the obvious answer. The data cannot leave, because regulation, client confidentiality or trade secrets forbid it. And the cost has to be predictable: one pass of a large cloud model over millions of complex documents can cost tens of thousands of dollars, and every improvement means another pass.

Where the Usual Tools Fall Short

  • A model that writes the query. It returns a plausible number nobody can verify.
  • Keyword search. A term in a list of recommended options is a plan, not an event, yet search counts the record.
  • A chatbot over documents. It retells a few passages. It cannot count contracts across millions of files, and counting documents instead of contracts is the classic error.
  • A BI dashboard. It answers the questions someone thought of in advance, from structured fields the documents mostly do not have.
  • A full cloud pipeline. Every document and every re-run is billed again, so the bill grows with how much the company holds.

From a Question to a Checkable Answer

Every step is designed to run inside the perimeter, on a read-only copy of the documents.

  1. Mask. Names, contacts and reference numbers are masked before anything else touches the text. What the record already labels is removed by rule.
  2. Extract. Dated facts are taken from the text by written, versioned and tested rules.
  3. Read the question. A local model turns it into a structured plan: which entities, which conditions, which period. The question can be typed or spoken, in seven interface languages.
  4. Count. A planner assembles the database query from parts that are already tested. A condition the plan cannot express gets an honest refusal and is never quietly dropped.
  5. Answer. The answer opens with how the question was understood, followed by the number, the list, the reason each row is there and the source document.

A question about contracts counts contracts, however many documents mention each one. "Renewed more than twice" means three dated renewals, not three places where the word appears. Summaries are written overnight by a local model and marked as not yet checked by a person.

Technology Stack

Local open-licensed models PostgreSQL pgvectorNamed entity recognition React Versioned API

Closed Where It Protects, Open Where It Connects

The model proposes. The planner counts. A person signs.

  • Isolation. The system is reachable only over the company's VPN. It reads documents and writes nothing back to the source.
  • Cloud models for narrow jobs only. They are off by default, and used for a second check of the masking or for genuinely hard cases. They see only masked text, through one gateway that logs every request.
  • More people, same rules. Everyone searches the same masked text under a personal login and role, with a full audit log. For a full record, a person goes to the source system.
  • Open for integration. A versioned API, file exports and a link to every answer, under the same roles and the same log.
  • Checked on every change. Control questions with expected answers and the masking accuracy are release gates. Agents watch the perimeter, the audit log and the architecture.
  • Complaints become rules. A user's complaint is asked again against the real data, and the rule learned from it is written down with a test.

A Cost That Stays Predictable

Each job goes to the cheapest class of model that does it well enough.

  • Rules and record fields mask labeled details and extract dated facts. They cover most of the work.
  • Small name-finding models catch what no field labels, on ordinary processors.
  • A mid-size local model reads the question and fills in the plan.
  • A large local model writes summaries and checks answers at night, when the servers are free.
  • The largest models improve the rules and settle hard cases. They never go through the documents one by one.

Heavy runs have a budget, run outside working hours and resume where they stopped. Growing from a first slice to the full archive takes more hours on the same servers, with no per-token bill for every document.

What the Assistant Is Designed For

These are the targets and limits in the design.

  • More than 100 million documents.
  • A typical counting question answered in under 10 seconds.
  • No number written by a language model.
  • No document sent to a cloud model in day-to-day operation.
  • Masking measured per class on every release against a fixed bar; a release below it does not ship.
  • No complaint closed without asking the question again against the real data.

Every choice has a price. Some questions get a refusal instead of a guess, some numbers are lower bounds and say so, and scanned files come after the first stage.

Where This Design Fits

The same conditions repeat in many document-heavy organizations:

  • questions go to IT or to analysts and come back days later;
  • most of the value is free text, in templates that keep changing;
  • the data is regulated, confidential or commercially sensitive;
  • a wrong number costs more than no number.

Legal and contract teams, insurers, banks and compliance functions, engineering and maintenance records, and government contractors all share these signs. A first stage needs a read-only copy of the documents, proven masking and a set of real questions with the answers people expect. Our private LLM and data residency and enterprise knowledge assistants pages describe the services behind it, and the glossary explains open-weight models, text-to-SQL and data residency. The AI data analyst in Microsoft Teams applies the same split between model and code to a live database.

100M+

documents the design is built for

0

numbers written by a language model, by design

0

documents designed to go to a cloud model in day-to-day operation

Other cases

AI Agent Platform With Governed Model Access: Many Agents, One Runtime

AI Agent Platform With Governed Model Access: Many Agents, One Runtime

Read more ›
AI Candidate Screening That Checks CV Claims Against Public Evidence

AI Candidate Screening That Checks CV Claims Against Public Evidence

Read more ›
ChatGPT-Powered Content Generation Platform

ChatGPT-Powered Content Generation Platform

Read more ›
AI Data Analyst in Microsoft Teams: Answers From Live Operational Data

AI Data Analyst in Microsoft Teams: Answers From Live Operational Data

Read more ›
AI Data Verification Layer for Property Data: Rules First, a Person on Borderline Cases

AI Data Verification Layer for Property Data: Rules First, a Person on Borderline Cases

Read more ›
AI Delegation Agent for Executive Teams: Assignments, Statuses and Scores in One Loop

AI Delegation Agent for Executive Teams: Assignments, Statuses and Scores in One Loop

Read more ›
AI Image Annotation Solution for Medical Assessment

AI Image Annotation Solution for Medical Assessment

Read more ›
ML/Computer Vision + Data Annotation for ADAS

ML/Computer Vision + Data Annotation for ADAS

Read more ›
AI/ML-Driven Telecom Network Optimization

AI/ML-Driven Telecom Network Optimization

Read more ›
Custom GenAI Medical Drug Search Accelerator

Custom GenAI Medical Drug Search Accelerator

Read more ›
ML/Computer Vision-Powered Data Annotation for Sports

ML/Computer Vision-Powered Data Annotation for Sports

Read more ›
OCR Retail Receipt Data Extraction Tool

OCR Retail Receipt Data Extraction Tool

Read more ›
Computer Vision + Image Annotation for Insurance

Computer Vision + Image Annotation for Insurance

Read more ›
AI Presale Assistant for a Marketing Agency: From Meeting Transcript to Sourced Draft

AI Presale Assistant for a Marketing Agency: From Meeting Transcript to Sourced Draft

Read more ›
AI Pricing Engine for an Equipment Distributor: The Model Proposes, a Person Approves

AI Pricing Engine for an Equipment Distributor: The Model Proposes, a Person Approves

Read more ›
AI Trade Contractor Sourcing: Verified Profiles and Pre-Screening for a Home Builder

AI Trade Contractor Sourcing: Verified Profiles and Pre-Screening for a Home Builder

Read more ›
Cinema Scheduling and Pricing Optimization: A Week of Showtimes, Computed

Cinema Scheduling and Pricing Optimization: A Week of Showtimes, Computed

Read more ›
Computer Vision + ChatGPT-Powered Recommendations

Computer Vision + ChatGPT-Powered Recommendations

Read more ›
Data Annotation for AI-Driven Sports Analytics

Data Annotation for AI-Driven Sports Analytics

Read more ›
Generative AI Bot for Customer Service

Generative AI Bot for Customer Service

Read more ›
Generative AI Solution for Code Compliance

Generative AI Solution for Code Compliance

Read more ›
SaaS Marketing Content Generation Platform for Healthcare

SaaS Marketing Content Generation Platform for Healthcare

Read more ›
Interactive Chatbot with an Animated Avatar

Interactive Chatbot with an Animated Avatar

Read more ›
AI Assistant for IT Administrators: The Vendor Says How, a Person Says Yes

AI Assistant for IT Administrators: The Vendor Says How, a Person Says Yes

Read more ›
Managed Video Annotation Pipeline for a Client's Own Human-Motion Footage

Managed Video Annotation Pipeline for a Client's Own Human-Motion Footage

Read more ›
ML/AI Technical Due Diligence for Startup Acquisition

ML/AI Technical Due Diligence for Startup Acquisition

Read more ›
OCR Solution for Invoice Processing

OCR Solution for Invoice Processing

Read more ›
Property Management Platform With an AI Voice Assistant for Multiple HOAs

Property Management Platform With an AI Voice Assistant for Multiple HOAs

Read more ›
AI-Powered Platform for Real Estate

AI-Powered Platform for Real Estate

Read more ›
AI Assistant for Report Generation & Visualization

AI Assistant for Report Generation & Visualization

Read more ›
Sitecore Migration

Sitecore Migration

Read more ›
ML/AI Technical Due Diligence for SporTech

ML/AI Technical Due Diligence for SporTech

Read more ›
Voice Interview to Social Posts: AI Content in the Professional's Own Voice

Voice Interview to Social Posts: AI Content in the Professional's Own Voice

Read more ›

Let's talk about your project

We'll help you harness AI and ML technologies to create innovative software solutions

File requirements: pdf, doc, docx, rtf, ppt, pptx — max 15 MB

No file selected