Skip to content
Lu Phone Maw
In development

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
Knowbase AI chat: a warranty question answered with source chip S2 from warranty-policy.md, a follow-up about making a claim answered from S1, and a battery-capacity question that returns 'Not found in your documents'.

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

Knowbase runs on an OVHcloud VPS. Coolify manages the Docker Compose services, and Traefik routes HTTPS traffic to the frontend and API.

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

Knowbase combines keyword and vector search to find relevant passages, then asks Gemini to answer from those passages and cite them.

Inside the app

Knowbase AI workspace dashboard: document counts (5 documents, 5 ready, 0 queued or processing, 0 failed, 10 indexed chunks), a list of five Markdown files marked Ready, today's question allowance, and an AI provider panel showing the Gemini answer and embedding models with the last successful call and last error.

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

Start an evaluation panel with three options — retrieval only, retrieval and hybrid answers, or retrieval, vector and hybrid answers — the run's cost of 26 embeddings and 26 generations against today's remaining budget, and a Start evaluation button.

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.

Evaluation run in progress (12 of 26 questions) with the dataset, answer and embedding models and retrieval settings, and a retrieval comparison table scoring vector-only, production hybrid and experimental keyword configurations on HitRate@5, Recall@5, MRR, keyword matches and search latency.

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.

API usage and estimated cost panel: about $0.0049 estimated at Gemini paid-tier pricing, marked incomplete, with input and output token totals and breakdowns by operation and by model.

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.