The service
Knowledge Assistants (RAG)
Assistants that deliver answers from your wiki, your PDFs and manuals. With sources, access rights and measured quality.
A chat that answers questions from the internal wiki and a legal reference work of around 1,400 pages – in German and with sources. Built alone, from requirements to operation.
01 — Starting point
The question behind it
“Is that in the wiki or in the reference work?”
The school’s knowledge lived in two places: an internal wiki and a legal reference work of around 1,400 pages as a PDF. Anyone who needed an answer first had to know where to look – and then read. A keyword search only helps if you already know the right word.
02 — Solution
An assistant that knows both sources of knowledge, answers in German and shows where each answer comes from.
The wiki is read in automatically every night, and the reference work is split along its sections. Nobody has to maintain content for the assistant by hand.
Semantic search and German full-text search work together: the assistant finds what you mean – and the exact technical term.
Every question is classified first: wiki, reference work or both. A custom reranking step sorts the hits before the AI answers.
The answer appears live in the chat, with a reference to the passage in the wiki or the reference work. Anyone who wants to can check it.
03 — Architecture
Simplified. Two sources of knowledge, one search, one chat – and measurement in production.
A · Sources
Behind a login. Read in again every night.
Scraping · nightly
Legal, around 1,400 pages.
PDF · Sections
B · Preparation
Reads in both sources and splits them into sections.
Python · OpenAI API
Vectors and German full text in one database.
PostgreSQL · pgvector
C · Search
Assigns the question: wiki, reference work or both.
LangChain
D · Answer
The model writes the answer from the hits, with sources.
FastAPI · SSE
Live answer, source to check, login per user.
React · TypeScript
E · Operation
Every answer is logged, and users rate it right in the chat. Langfuse, self-hosted.
04 — My role
Solely responsible: gathering requirements, building, rolling out, operating. No handover to a second developer.
Which questions get asked, which sources count and who gets access.
Ingestion for wiki and PDF, hybrid search, reranking and routing across two sources.
API with streaming and source citations, user management, chat interface.
Automated deployment and feedback per answer in the monitoring.
05 — Result
I only share concrete usage numbers with the school’s approval. I’m happy to tell you more in a conversation.
06 — Tech
For technical readers, teams and agencies.
The wiki runs on HumHub. The nightly ingestion reads the CSRF token, logs in with a session, filters out navigation and comments, follows linked resources and deduplicates content. This boundary to the wiki is covered by deterministic tests against mocked HTTP transports.
The PDF is split along its sections. Every chunk carries the edition year, page range and section path and lives in its own vector table.
No separate vector database: pgvector (cosine distance) and PostgreSQL’s German full-text search (websearch_to_tsquery) run in one database. A deterministic reranker weighs the vector score, keyword ranking and term overlap in content and headings.
Legal material is only included when the question carries legal signals – such as “§” or the German words for “law” or “parental leave” – or its score passes a higher threshold. That keeps everyday answers clean and legal questions well-founded.
An LLM condenses follow-up questions and the history into standalone search queries. Answers arrive via server-sent events, citations are structured: wiki URL and title, or edition, pages and section. If there is no matching context, the assistant says so instead of guessing.
Session-based authentication with Argon2, saved chat histories, an admin area with user management and CSV import, and a Typer CLI for operational tasks.
Database migrations with Alembic, nightly re-ingestion via cron in the app container and self-hosted Langfuse: trace IDs attach users’ feedback to the answer it belongs to. Shipped as one image behind Traefik, with TLS via Let’s Encrypt.
07 — Next
The service
Assistants that deliver answers from your wiki, your PDFs and manuals. With sources, access rights and measured quality.
Similar project
Specialized agents answer analysis questions across several data sources, in a chat interface with live streaming.
Start a project
Tell me in two or three sentences what it’s about. You’ll get an honest assessment within one business day – even if it says you don’t need AI at all.