Brume · Docs
Files

Understand how Brume finds your documents

The journey from a question to your documents: hybrid search, embeddings and text matching, and what search does not promise.

In brief

When the agent searches your files, Brume runs two searches in parallel — one by meaning (embeddings), one by words (text matching) — then merges the two rankings. This page explains the mechanism and its limits; the cluster's procedures rely on it.

The question search answers

An uploaded document is only useful if it surfaces at the right moment. When you ask the agent a question, it does not reread the whole corpus: it queries an index, built in advance, and brings the model only the most relevant documents. Everything therefore happens in two stages — what happens at upload, and what happens at each question.

At upload: the document becomes segments

When a file is uploaded, a worker processes it in the background — that is what the Processing Center shows.

  1. Extraction. The content becomes text: a PDF's text layer, a spreadsheet's cells, an audio transcription, an image description produced by the model's vision.
  2. Chunking. The text is cut into segments of controlled size. It is the segment, not the whole file, that will be compared to your question.
  3. Vectorization. Each segment goes through an embeddings model that turns it into a vector — a numerical representation of its meaning. Vectors are stored in PostgreSQL (pgvector), on your side.

Until this processing finishes, the file does not exist for search: that is why a freshly uploaded document does not answer yet.

At each question: two searches, one ranking

When the agent queries the corpus, Brume runs two independent searches, because neither is enough on its own.

PathWhat it comparesWhat it catches
Semantic (embeddings)The question's vector against the segments' vectorsRephrasings: "leave" finds a document that says "authorized absences"
Textual (pg_trgm)The question's characters against the files' textExact terms: a product code, an acronym, a proper noun that meaning alone would miss

The two rankings are then merged through RRF (reciprocal rank fusion, constant k = 60): a document ranked well by both paths comes before a document excellent on only one. The agent receives the top few files — not an exhaustive list — and relies on them to answer, sources attached.

The question itself is vectorized at each search: every semantic search therefore consumes one embeddings call, on the same route as indexing.

The embeddings model is pinned

Comparing vectors only makes sense if they come from the same model. Brume therefore pins the workspace's embeddings model at the first successful index: index and questions live in the same vector space, permanently.

Two consequences:

  • Changing the embeddings policy does not rewrite the index. If the configured route drifts from the pin, Brume does not mix two vector spaces: search degrades cleanly to text-only rather than returning wrong results.
  • With no embeddings route at all (no key, route unavailable), same degradation: text matching keeps answering, but rephrasings are no longer caught. That is the "the whole workspace only answers through exact terms" symptom of Prepare the knowledge base.

What search does not promise

  • It is not exhaustive. It returns the best documents, not every relevant document. To target a specific file, mention it with @: the mention bypasses search.
  • It only reads what is indexed. A file being processed or failed is invisible; an image without business terms in its context only surfaces through its generated description.
  • It does not leave the workspace. Each workspace has its own index; a question asked in one workspace never digs into another's files.
  • It does not understand better than the corpus is written. Acronyms never spelled out, tables without headers, contradictory versions: source preparation remains decisive.

To go further

On this page