Skip to main content
Building an AI Assistant You Can Control
Case study

An AI product company bringing private regulatory knowledge to professional firms

Sector
Regulated Services
Work
Applied AI
Duration
10 weeks
Outcome

0.61 → 0.88

retrieval precision@5

Outcome

~6 hrs → <4 s

first answer, manual research to assistant

Outcome

35% → 82%

questions resolved without escalation

Capability

Closed by design

no sign-up route; access provisioned per company and revoked server-side

Fig. 1

Keeping tables whole across page breaks

Each page is cleaned with the next page beside it, so tables that cross a page break stay intact. A second pass removes the extra text this brings in.

  1. 1. A table that runs off the bottom of a page stops being a table when each page is read on its own.
  2. 2. So each page is cleaned with the next page alongside it, and the table is completed.
  3. 3. This brings in some text from the next page, the expected cost of keeping the table whole.
  4. 4. A second pass finds the text that came from the next page and removes it, without changing the source document.

01The starting point

Valuable knowledge, with no safe way to ask it.

A general assistant will answer anything you put to it, fluently, including questions outside its reliable scope. In a regulated subject that fluency is the risk: a confident answer about the wrong jurisdiction reads exactly like a right one, and the person asking is usually not equipped to tell the difference.

The source material does not help. Regulations arrive as scans: tables that run across page breaks, two languages on the same page, headers and footers threaded through all of it. Read each page on its own and a table stops being a table.

Fig. 2

Questions outside the subject are declined

A general assistant will answer anything. This one checks the subject first and declines out-of-scope questions before it searches or drafts an answer.

  1. 1. A general assistant would answer a question from outside the subject as fluently as one inside it.
  2. 2. The product checks the subject first and turns that question away, with a polite reply saying what it can help with.
  3. 3. The document search and the answer never run for it.

02What we built

A controlled product for regulated knowledge.

What was built is a closed product rather than a clever one. There is no sign-up route at all. An administrator creates a company, invites named people into it, and can cut access server-side rather than waiting for a token to lapse. A question outside the subject is turned away by the product itself, before retrieval or generation runs: scope is enforced by the system, not requested in a prompt.

The ingestion is where the engineering sits. Each page is cleaned with the following page handed over beside it, so a table running off the bottom can be finished rather than cut in half. That is exactly why the first pass pulls in text belonging to the next page. That extra text is the cost of preserving the table, not a failure of the process, so a second pass runs with one job: find what came from the next page and take it back out. The instruction that governs both is still in the source, shouted: do not, under any circumstances, modify the content of the document or add your own opinion. A cleaner that tidies legal prose is worse than no cleaner.

Each passage is then indexed three ways, by its text, by its key phrases, and by questions it could answer, because advisers do not phrase questions the way statutes do. The three-way split is a design choice, with weights held as constants rather than tuned against a benchmark.

Around it sits the operational work that decides whether a system like this survives contact with a real corpus: a job view to watch indexing, a queue a failed document returns to on its own, conversations that persist and name themselves, and a session that renews and retries once behind the reader so an answer half-written when it expires still finishes.

Fig. 3

Access by invitation only

There is no public sign-up. An administrator sets up each company, invites named people into it, and can remove their access on the server.

  1. 1. An administrator creates a company and invites named people into it.
  2. 2. Access can be cut on the server, without waiting for a sign-in to run out.
  3. 3. There is no sign-up route, so nobody can let themselves in.

03How the product works

From difficult source material to grounded answers.

Fig. 4

How a new document is indexed

An administrator uploads a document, and the system cleans, splits and indexes it. A job that fails goes back into the queue.

  1. 1. An administrator uploads a document, with no developer involved.
  2. 2. A background job cleans it, splits it into passages and indexes them, and the administrator can watch it run.
  3. 3. If a job fails, the document goes back into the queue and is picked up again automatically.

Fig. 5

Each passage indexed three ways

Every passage is indexed by its text, its key phrases and the questions it could answer, because advisers rarely word a question the way a regulation is written.

  1. 1. A passage of regulation, in its original legal wording.
  2. 2. It is indexed three ways: by its own text, by its key phrases, and by questions it could answer.
  3. 3. The three are blended into a single entry for the passage.
  4. 4. An adviser’s question is matched against all three, so it can reach the passage even when it is worded differently.

04What became possible

A private knowledge product, ready for professional use.

Ways into the product without an invitation

None

No way in without an invitation

Cleaning passes over each scanned page

Two

A second pass, to undo the first one's over-reach

Ways each passage is indexed

3

Its text, its key phrases, and questions it could answer

When indexing a document fails

Re-queued

It goes back in the queue on its own

Built with

Next.jsReactTypeScriptFastAPIPythonPostgreSQLpgvectorRedisDocker

Have a product like this in mind?

Bring us the product, corpus or workflow you are starting with. We will help work out what it needs to make possible.

More work

Keep reading.

From Incoming CVs to Client-Safe Candidate Profiles
Custom Software

Staffing & Recruitment

From Incoming CVs to Client-Safe Candidate Profiles

Manlytic Group’s recruiters work from their phones. CVs reach them on WhatsApp as scans, photos and two-column tables, passport details have to be exact, and anything sent to an employer has to leave the agency as the only route to the candidate.

  • Every file made for an employer is built without the candidate’s contact details, then searched again before it can be shared.
  • CVs are read without guessing: gaps stay visible, and anything unsure waits for a person to confirm.
  • A likely duplicate is reported and held for a recruiter, never merged on its own.
From Printed Archive to Research System
Custom Software

Research & Knowledge

From Printed Archive to Research System

The collection existed. Answering a question about it did not. Anything worth knowing meant reading across thousands of pages by hand, holding names, places and dates in your head, and reconstructing the evidence trail yourself each time.

  • Ask a research question and get back a cited report, instead of reading for the answer
  • Follow one person across the whole collection even where their name is spelled a dozen different ways
  • See the archive as a map of what happened where, a timeline of when, and a network of who dealt with whom
Publishing Platform for Four Peer-Reviewed Journals
Custom Software

Scholarly Publishing

Publishing Platform for Four Peer-Reviewed Journals

How a scholarly publisher brought peer review, editorial decisions, DOI registration, preservation and publication into one bilingual platform.

  • One manuscript record carries the whole process (submission, review, decision, issue, publication) instead of being reassembled from email
  • Each person sees the view that belongs to them: authors follow their own submission, reviewers open only what they were assigned, editors see the operational state
  • Publication is one operation rather than a checklist: the article, the DOI deposit, the preservation copy and the author notification are coordinated together