AI / MLPrototype2026
Plainsight
A legal and medical information assistant that answers in plain language and cites an official source for every claim: hybrid retrieval over 127 government documents, Claude Haiku answers measured at $0.0007 each, and a hands-free voice mode on Gemini Live.
- 127
- Official documents indexed
- 3,738
- Searchable passages
- $0.0007
- Measured cost per answer
Timeline
Oct 2026
Role
Design, retrieval pipeline and front end
Team
Solo
Domain
Legal information · Consumer rights · Voice interfaces
Status
Prototype
Stack
Source
Section 01
Overview
Plainsight answers everyday legal and medical-legal questions: rent increases, eviction notices, traffic tickets, consent to care. It covers four regions (British Columbia, Ontario, California, New York), and every answer is drawn from statutes, government guides and regulators, with a numbered citation on each claim.
The rule that shapes the whole app: the model is never allowed to answer from its own memory. Retrieval finds official passages first, Claude Haiku explains only what those passages say, and every answer carries a triage level that points to the right professional. It presents itself as general information, not legal or medical advice.
Section 02
The Honesty Test
The question 'How much can my landlord raise the rent this year?' is the trap every legal chatbot falls into: the yearly percentage changes, and a language model will happily invent one. Plainsight's corpus intentionally holds the rules but not the current figure, and the answer says exactly that: the sources do not give this year's percentage, here is how the limit works, here is the official calculator.
Everything else in the answer is cited: the no-rounding rule, the 12-month wait, the 3 months' written notice on the approved form. The sources rail shows which passages were retrieved, each with its cosine score and keyword rank, so the grounding is inspectable rather than claimed.
Section 03
Retrieval
The library holds 127 documents from governments, tribunals, regulators, Crown insurers and legal-aid organisations, plus statute text. Heading-aware chunking turns them into 3,738 passages; Gemini embeddings (768-d, L2-normalised) live in an 11.5 MB binary file, so there is no vector database service to run.
Search is hybrid: BM25 rewards exact legal terms like 'security deposit', semantic search catches 'kicked out' meaning eviction. The two rankings merge with reciprocal-rank fusion, the chosen topic gets a gentle boost, each document contributes at most 2 passages, and the top 8 go to the model. The app's own How It Works page traces a real query live: for BC that is 1,195 candidate passages, 376 ms to embed, 3 ms to search.
Section 04
Answering
Claude Haiku 5.5 writes the answer behind a byte-stable cached system prompt, with three rules: cite every claim, never invent figures or deadlines, and say so when the library does not cover something. Answers stream as NDJSON with a fixed structure: what the rules say, your options, next steps, when to get professional help.
Measured on repeated runs: 0.9 to 1.0 s to the first word, under 4.2 s for the full answer, about 3,900 tokens, $0.0007 per answer. Failure modes are designed in: if Claude is unavailable the app shows the top official passages instead, and if embeddings fail, search falls back to keywords and says so.
Section 05
Voice and Safety
A voice mode runs on the Gemini Live API: you talk naturally, Gemini transcribes and calls the same retrieval pipeline through a lookup_answer tool, and the cited answer appears on screen while it speaks. The grounding rules do not change because the modality did.
Safety is handled before search, not after: emergency phrases surface a call-911 / 9-8-8 banner immediately, every answer carries a triage level, and the disclaimer that Plainsight is not a lawyer or a doctor sits on every screen.
Section 06
Results
Plainsight is the answer-engine pattern I now reach for when correctness matters more than fluency: retrieve first, cite everything, measure the cost, and make refusing to guess a feature.
- 127 official documents, 3,738 passages, 4 regions, one 11.5 MB embedding file, no vector database service
- Hybrid BM25 + semantic retrieval fused by reciprocal rank, at most 2 passages per document, top 8 to the model
- Measured answers: first word in about 1 s, $0.0007 each, with citations on every claim
- Asked for this year's rent cap, it says the number is not in its sources instead of inventing one






