About Services Tools Blog Contact us

Cited Document Answers

Reads a private folder of documents on your own machines and answers questions with the source passages named, including pictures once they have been described.

  • Semantic Search & RAG
  • Cross-sector
  • Pipeline
  • Product
  • Local/private
  • 2025

The problem

Analysts cannot reliably find a figure or a decision across a pile of long reports. Keyword search misses a question that uses different words from the document. Pasting the documents into a public chat is not acceptable, and an answer with no source is hard to trust.

What it does

Documents stay on the machine. The passages are indexed with Ollama, and a question is answered from the closest passages, with the filename and match score shown. Phi can describe photographs before they join the same index. The pattern runs as a script over a report pack, as a staff dashboard, or as a Mac app that accepts dropped files.

Outcomes

  • A question over a large private document set returns an answer and the passages behind it.
  • The documents do not leave the machine.
  • A photograph can be found from a question as well as from its file name.
  • The same index answers a repeat question without reading everything again.

Simplified mockup

Interactive preview with sample data. Nothing is sent to a server.

Private folder

Sources
4
none leave the machine
Passages
612
persisted index
Photographs
1
captioned, then indexed
Corpus
FileKindStatus
pump-house-manual.pdf186 pagesindexed
sampling-sop.docx12 pagesindexed
march-board-note.txt4 pagesindexed
clarifier-north.pngphotographcaptioned
Rebuild
Last built 2 hours ago

Ask the folder

How soon after heavy rain should the outlet be sampled?
Wait until the flow has fallen back, then sample within two hours. The first bottle is a rinse and is discarded.
pump-house-manual.pdf · page 42

The outlet is sampled from the chamber, not from the storm tank.

After heavy rain, wait until the outlet flow has fallen to the normal band. Sample within two hours.

Do not sample while the storm tank is still spilling.

Index

saved locally
Chunk
480
tokens, overlap 64
Embed
Local
not a public chat
Vision
On
captions join the same index
Passages per file
Ingest
FilePassagesState
pump-house-manual.pdf480stored
sampling-sop.docx86stored
march-board-note.txt22stored
clarifier-north.png1 captioncaptioned

How it works

  1. Split a folder, an upload or a dropped file into passages and index them with Ollama.
  2. Save the index, so the next question does not re-read every document.
  3. Describe pictures with Phi before they join the same index.
  4. Find the closest passages for a question and write an answer limited to them.
  5. Show each passage with its filename and score so the source can be opened.
  6. Let an admin rebuild or clear the index.

Pipeline

flowchart LR
  Docs[Private documents] --> Chunk[Chunk and embed]
  Pics[Photographs] --> Caption[Caption pictures]
  Caption --> Chunk
  Chunk --> Index[Persisted index]
  Ask[Question] --> Index
  Index --> Cite[Answer with sources]

Output