Demo project: document Q&A with cited sources
A common request: "we have a pile of PDFs, policies, handbooks, manuals. We want staff to ask questions and get an answer they can trust." Trust is the hard part. An answer with no source is a guess, so the brief I set myself was simple: every answer shows where it came from, and when the documents are silent, the bot says so.
Evidence label: SYNTHETIC
Demo project. Built to show what I deliver. It is not client work, and every document in it is synthetic.
How fast
A tool like this over a small document set is a few days of work. A larger library, scanned PDFs or a language model for longer answers takes longer, and I will quote that separately after seeing a sample of your files.
Fast is nice. What did it cost?
What it cost
No client money and no paid services were involved. The demo was built and run on my own machine, and no dollar figure per build is claimed. Anything that runs live for a client runs on the client's own accounts and keys, so their usage is never fronted by us.
What was built
- A small question and answer tool over five sample PDFs (15 pages in total). The documents are invented for a fictional company called Harbourlight Co-op: a leave policy, an IT security standard, an expenses and travel policy, a returns and warranty guide, and an onboarding handbook. No real organisation's data was used.
- You type a question. You get a short answer, a numbered citation, and the exact passage from the PDF with the document name and page number. There is also an evaluation page that shows how the tool scored on a fixed set of test questions.
- 1. The PDFs are read page by page and split into sections, 25 in total, each keeping its heading, document and page number. 2. Search blends two simple methods, BM25 keyword scoring and TF-IDF cosine similarity, and merges their rankings. It runs in plain Python with numpy. 3. The answer is the sentence from the best section that matches the question most closely. It is extracted, not written by a language model, so it cannot invent a figure. 4. If the best match scores below a set floor, the tool replies "I could not find this in the uploaded documents" instead of guessing.
- For a larger client library I would swap the search for FAISS embeddings and add a language model to phrase longer answers. The citation and refusal behaviour stays the same. I did not use FAISS or Streamlit in this demo, and I would not claim otherwise.
- What a client gets: A working Q&A tool over your own PDFs, with page-level citations.
- A test table built from your real questions, so you can see accuracy before you rely on it.
- A plain refusal when the answer is not in your documents.
- The source code and a short guide for adding new documents.
- Your documents stay on your machine unless you choose otherwise.
Cheap and fast still has to work. How do we know it does?
How it was checked
I wrote 20 test questions: 16 the documents can answer and 4 they cannot. 16 of 16 answerable questions cited the right document, and the answer contained the expected figure. 4 of 4 out-of-scope questions were refused. Median search time was 0.5 ms per question on the machine I built it on (search only, 25 sections). Two caveats, because they matter. I wrote the questions myself, so this is a small, friendly test. And I set the refusal floor using two of the out-of-scope questions, so the other two are the fairer check. On real client documents I would build the test set with you and report the results the same way, including the misses.
Screens from the working app

Question and answer screen showing three answers, each with a numbered citation and the exact quoted passage from a sample PDF 
Screen showing a correct cited answer followed by a polite refusal when the question is not covered by the documents 
Evaluation table of 20 test questions showing the cited source and pass results, with 16 of 16 right sources and 4 of 4 refusals 
A page of one synthetic sample PDF, the Expenses and Travel Policy, which the chatbot searches and cites
Would it be okay if we talked about something like this for your business? A free consultation is the first step, and a no is welcome.
