How I built it
- My role
- Product, design & engineering
- Context
- Personal project
The problem
[01]Contracts, manuals and reports pile up as files nobody wants to read. Keyword search finds words, not answers, and pasting private documents into a general chatbot means losing sight of where the answer came from, or whether it came from your file at all.
What I built
[02]Chatwave keeps it small on purpose. You create a project, drop your documents in, and ask questions in plain language. Each project is its own little library and the search never leaves it. Every answer quotes the passages it used and cites the file and page, so checking it takes one click.
Key decisions
[03]Chunks that know their project
Every chunk carries its project id, so the top-5 cosine search in pgvector filters by project directly, with no join and no way for one library to leak into another.
The model never meets your files
Files live in a private S3 bucket and the browser reads them through presigned links valid for five minutes. The answer model only ever sees the five passages it is given, with fixed rules on how to use them.
Uploads go through a queue
The API saves the file, publishes a document.uploaded event to a RabbitMQ topic exchange and answers at once. An ingestion worker takes one message at a time, extracts the text, chunks it at about 2,000 characters with a 200 overlap and embeds it, then publishes document.ready or document.failed. Messages are persistent, and one that crashes a worker goes to a dead-letter queue instead of being lost or retried forever.
The result
- 5–15 sPer cited answer
- 1,536Dimensions per chunk
- 15API endpoints

