How it works Open app

How YPKWB works

This page explains the idea behind the app in everyday language — without jargon.

In one sentence

YPKWB is a private library for your own files: you upload documents, the system builds a searchable index, and you can ask questions in plain English (or German, if you choose). Answers are meant to stick to your material, not random internet guesses.

What happens when you upload a file?

  1. Your file is stored on the server in your own folder.
  2. The app reads the text — from PDFs, Word files, plain text, Markdown, and supported images — and splits it into many small pieces called chunks.
  3. Each chunk is saved in an index file (chunks.json) together with simple metadata (for example which file it came from). Think of it as many short “index cards” that point back to your originals.

Why “chunks” at all?

Whole books or long PDFs are too large to send to an AI in one go. Chunks are bite-sized paragraphs (roughly a few sentences each). That way the app can later pick only the few pieces that best match your question instead of flooding the model with irrelevant pages.

Overlapping chunks — why neighbouring pieces repeat a little

When the index is built, each file’s text is split into windows of about 1,100 characters, and the next chunk starts while still re-using roughly the last 330 characters of the previous one. In other words, consecutive chunks overlap on purpose. That keeps sentences that sit right on a window boundary from being cut in half everywhere, and it gives the keyword-style retrieval (BM25) more than one chance to surface a passage when your wording does not line up with a single fixed slice.

When you press “Send” on a question

Two main steps happen behind the scenes:

  1. Finding the right passages (retrieval). The app scores every chunk against your question using a classic search method (BM25 — similar in spirit to what library catalogues and keyword search do). The best matches are collected as context.
  2. Writing the answer (generation). That context, your question, and a short conversation history are sent to Google Gemini with strict instructions: answer from the supplied passages, cite sources, and admit when the documents do not contain enough information.

Broad or “big picture” questions. If your question looks like an overview or summary (for example phrasing such as “overview”, “what is this about”, “summarize”, or similar in German), the app treats it as a broad query: it keeps keyword scoring but may widen how many passages are considered, merge in extra chunks from several different files when matches are thin, and uses a prompt tuned for themes across the library — still tied to real excerpts, with sources where specific claims appear.

When nothing in the index fits well. If retrieval returns no sufficiently relevant passages, you still get a short reply: the model is told not to invent quotes from your files. It may add optional general hints only if it labels them clearly as general knowledge, separate from your indexed material.

Second block: “Gemini AI interpretation” in the chat. After the main, evidence-based answer, the app may run a second Gemini pass. That text is shown in its own panel under an explicit label (for example that it is speculative, may use general training knowledge, and is not verified like the main answer). It is meant as interpretive commentary — perspective, context, or plausible connections — not a second factual extraction from your documents. Saved chat history keeps the main answer for context; the interpretation is stored separately so it does not get mixed into the factual thread by mistake.

Optional: you can ask the app to translate your question to English before search, and you can request assistant replies in German — these are convenience switches, not a second brain on the side.

“API” — what does that mean here?

Your browser talks to small PHP scripts on this website (URLs under api/). Those scripts read your index, call Gemini on the server, and return JSON. Your Gemini key stays on the server; the browser never sees it. That is the same “API” idea people use when they say “the website talks to a service in the background.”

Demo vs. signed-in account

Not signed in: questions run against a public demo index so visitors can try the experience. You cannot upload to that demo unless an administrator grants special access.

Signed in: you get your own folder and your own index. After uploads, use Rebuild index when the app asks you to refresh the search data.

How you can use this site — and who it helps

Tools like YPKWB belong to the same family as retrieval-augmented assistants: you keep the documents, the software builds a private index, and questions are answered mainly from your corpus instead of from the open web. Typical uses (similar to how people use personal knowledge bases elsewhere) include:

What it is not. YPKWB does not replace professional advice (legal, medical, financial, or safety-critical decisions always need a qualified human). It also does not automatically know about files you never uploaded or never indexed — if the answer matters, check the cited sources in the main reply and treat the separate Gemini interpretation block as optional commentary, not proof.

Where your data lives

Text extracts and chunk data stay on this server under your user directory. Chats you save in the browser are stored only in that browser (local storage), not sent as permanent transcripts to the server unless future features change that.

← Back to the app