Knowbase AI
A workspace-scoped knowledge base that ingests documents and answers questions with citations, fusing vector and full-text retrieval and abstaining when the retrieved evidence does not support an answer.
- Focus
- AI Systems, Backend Engineering
- Core stack
- Next.js, TypeScript, Python/FastAPI, PostgreSQL/pgvector, Google Gemini
- Deployment
- Docker Compose, Coolify, OVHcloud VPS

System architecture
Browser
OVHcloud Ubuntu VPS
Docker Compose · managed by Coolify
Traefik
HTTPS · routes by hostname
Next.js frontend
upload · chat · citations
FastAPI backend
uploads · questions
Python worker
processes ingestion jobs
API + worker share the uploads volume
PostgreSQL + pgvector
jobs · chunks · vectors · full-text
Google Gemini API
embeddings · answers
From document to cited answer
Index a document · background
Upload & validate
PDF · DOCX · TXT · MD · job queued
Extract & chunk
worker parses text, splits into passages
Embed & index
Gemini embeds passages
PostgreSQL search index
passages · pgvector vectors · full-text index
Answer a question · on request
Ask a question
query embedded by Gemini
Retrieve passages · in parallel
pgvector
similarity search
PostgreSQL
full-text search
Merge rankings
Reciprocal Rank Fusion (RRF)
Generate & check
Gemini drafts answer; citation IDs checked against excerpts
Answer
with sources
Not enough
evidence
Inside the app

Workspace dashboard
The workspace at a glance: how many documents are ready, still processing or failed, and how many searchable chunks they produced. It also shows today’s question allowance and which Gemini models handle answers and embeddings — with the last successful call and last error, so problems show up instead of failing silently.
Evaluation

Starting a run
Retrieval quality is measured, not guessed. An evaluation runs a fixed question set through the real pipeline in the background worker, one question every 6 seconds to stay within Gemini’s free tier. You choose what to test — retrieval alone across every configuration, answers with hybrid retrieval, or hybrid and vector-only answers side by side — and the cost is shown and reserved from the daily budget before it starts, with anything unused given back.

Comparing retrieval
A run in progress. The overview records exactly what was tested — dataset, models, retrieval settings — and the comparison scores the production retrieval modes against experimental keyword strategies on HitRate@5, Recall@5, MRR and search latency. Experiments are labelled as experiments, so a good score on a small question set doesn’t quietly become a production change.

Usage and cost
What a run would cost. Knowbase runs on Gemini’s free tier, so this isn’t a bill — it prices the tokens Gemini reports at the published paid-tier rates, broken down by operation and by model. Embedding calls don’t report token usage, so the total is marked “incomplete”: a minimum, not a guess.