No. 001 · Retrieval-augmented generation

RAG Knowledge Assistant

Ask your
documents.
Check the answer.

Most assistants answer from memory and leave you to trust them. This one answers only from the documents you file, and footnotes every claim back to the exact page — so you can go and look.

Specimen finding2 authorities

What is the remote work policy for new engineers?

New engineers may work remotely up to three days per week after completing the 30-day onboarding period1. Fully remote arrangements require director approval and a documented four-hour overlap with the team's core hours2.

[1]employee-handbook.pdfp.14 · 0.91
[2]security-policy.mdp.3 · 0.84
How it works
IStep

File

Drop in a PDF, text, or Markdown file. It is split into overlapping passages, embedded with BGE, and stored in Postgres with pgvector.

IIStep

Retrieve

Your question is embedded and matched against every passage. Dense and keyword results are fused with reciprocal rank fusion, then reranked.

IIIStep

Cite

Only the winning passages are given to the model, which must footnote each claim. Every number opens onto the page it came from.

Colophon
Retrieval
pgvector · hybrid search · RRF · cross-encoder rerank
Embeddings
BAAI/bge-small-en-v1.5 via fastembed (ONNX)
Backend
FastAPI · psycopg 3 · server-sent events
Model
Pluggable — Gemini, OpenAI, or local Ollama
Frontend
Next.js · TypeScript · Tailwind
Infrastructure
Docker Compose on EC2, scripted end to end