TotalApp Docs

Embedding

How TotalApp finds records by meaning — turning text into vectors, ranking by similarity, and keeping the shortlist useful and fast.

Overview

Keyword search only finds records that share your words. Embedding finds records that share your meaning: an embedding model turns a piece of text into a vector — a list of numbers that captures what the text is about — and texts with similar meaning end up with similar vectors. A search for inertial navigation units for drones can therefore surface a rule about guidance systems even though no word matches.

Stage 1 of the AI pipeline

Embedding is the first, fast narrowing step. It shortlists candidates; an optional Reranking pass then sharpens the order, and the AI step reasons over the few records that remain.

How it works

Your text
→
Turned into a vector
→
Compared with every candidate
→
Scored 0–100%
→
Shortlist
  1. Your query text and each candidate record are converted into vectors by the selected embedding model.
  2. Each candidate gets a similarity score, shown as a percentage: the closer the meaning, the higher the score.
  3. Candidates below the screen’s minimum similarity are dropped, and only the best few are kept.
  4. The shortlist is shown to you, or handed to the next stage.

Each screen decides which fields of a record are embedded. On Trade Compliance & Sanctions, for example, a rule is represented by its target country or regime, commodity class, restriction type, authority, risk and status — and the same description feeds the AI diagnostic, so the search and the analysis always see the same facts.

Where embedding runs

Local (Ollama)Hosted (Cloud LLM)
ProviderOllama on your own machineModelion or OpenRouter, through the TotalApp server
Where your text goesStays on your machineSent to the provider you chose
SetupInstall Ollama and pull an embedding modelPick a model from the list — nothing to install
CostFreeFree models available; paid models billed by the provider
Works offlineYesNo

The two providers can be switched at any time. The catalog of models, with recommended starting points, is in Embedded Models; how TotalApp connects to Ollama is in Ollama Integration.

Set it up

  1. Open Settings → Agentic → Embedding.
  2. Choose Ollama or Cloud LLM (Hosted API) as the provider.
  3. Select an embedding model — an installed local one, or a hosted one from the list. Tick OpenRouter: free models only to see only no-cost models.
  4. Open any screen with a similar-record search and try it.

Changing the model

Vectors stored on your knowledge sources belong to the model that created them. When you switch models, they are recomputed automatically the next time those sources are ranked — nothing needs to be redone by hand. With a hosted model, that text is sent to the provider while this happens.

What shapes the results

Minimum similarity

Screens set a floor (for example 60% on Trade Compliance & Sanctions). Candidates below it never reach the shortlist.

Number of matches

Only the best few are kept (for example 5) so the next step stays focused.

The text that is embedded

Each record is described by the fields that matter for that screen, in a compact form.

Very long texts

Texts are shortened to roughly the first 3,000 characters before embedding, as embedding models have a limited context window.

Session cache

Vectors are remembered while you work, so repeating a search is instant. A record whose text changes is re-embedded automatically.

When embedding is unavailable

Embedding never blocks a screen. If no embedding model is selected, or it cannot be reached, TotalApp falls back to keyword matching: it splits your text into words and ranks candidates by how many appear in them. You still get a useful shortlist — just a rougher one — and the screen tells you it is in keyword mode.

If the embedding model works but no candidate clears the minimum similarity, keyword matching is used as a last resort rather than showing an empty list.

Where it is used today

AreaWhat embedding does
Attach Knowledge (Writer Tools)Ranks your own library as you type a topic, so the most relevant sources are suggested first
Patent & R&D OperationsFinds the closest prior art, literature benchmarks and licensing guidance for a disclosure or project
Customs & Global TradeSearch Similar Rules on Trade Compliance & Sanctions, and the same search on the other customs screens
Hospitality & Events OperationsFinds similar contracts, safety notes, policies and rules in your own records

On Trade Compliance & Sanctions the shortlist can additionally be re-scored by Reranking.

Frequently Asked Questions

Does embedding send my data anywhere?
Only if you choose a hosted model. With a local Ollama model, text stays on your machine. With a hosted model, the text is sent through the TotalApp server to the provider you selected.
Which model should I pick?
See Embedded Models. As a rule of thumb, a long-context model suits long English documents and a multilingual model suits Turkish or mixed-language content.
Why does a screen show a keyword notice?
No embedding model is selected, or the selected one could not be reached, so TotalApp used keyword matching instead.
Is a higher percentage always a better match?
It is a similarity score, not a guarantee. Scores depend on the model and the text, so compare results within one search rather than across models.