ZenTree Tabs is an open-source Chrome extension for organizing a crowded browser workspace. Its AI mode uses a compact MiniLM model in the browser to find tabs with related meaning. The extension then checks those matches against time, domain, and session rules before placing accepted groups into Chrome tab folders.
Because the work happens locally, tab titles and browsing context do not need to leave the browser. The result is a faster, more predictable organizer that can run inside an extension instead of depending on a remote inference API.
The short version
MiniLM is a small Transformer model from Microsoft that is useful for semantic embeddings. An embedding turns text into a vector: a list of numbers that places related phrases near one another in a high-dimensional space.
For example, these titles should produce nearby vectors:
React hydration errorNext.js hydration warning
While this pair should be much farther apart:
React hydration errorPasta carbonara recipe
That gives ZenTree Tabs a useful semantic signal. It does not, by itself, tell the extension what a task is or whether two tabs should be grouped.
What MiniLM actually gives the product
In the extension, MiniLM is used for two closely related things:
Similarity
The application can compare two embeddings with cosine similarity:
cosineSimilarity(vecA, vecB) // a value between -1 and 1
This answers one question:
How semantically similar are these two strings?
Semantic signal
The model can recognize that “React hydration error” and “Next.js hydration warning” are related even when the words are not identical. That is more useful than exact keyword matching for research sessions where every tab is phrased differently.
MiniLM does not provide the rest of the product decision:
- what a task is;
- whether a group represents one workflow;
- when a similar tab should stay separate;
- how confident the product should be;
- how a group should be named.
Those are application decisions, not embedding outputs.
The real problem: group tabs by task, not similarity
The product goal is:
Group tabs by task, not just by topic.
Similarity alone can produce the wrong result. A set of React debugging tabs may belong together because they were opened in the same work session. A YouTube tab may be part of that same debugging task, even though its domain and wording look unrelated. Another YouTube tab may belong to an entirely different task.
MiniLM cannot see that workflow on its own. ZenTree Tabs therefore uses a three-stage pipeline.
The deterministic grouping pipeline
Step A: build candidate groups with embeddings
The extension first creates a representation for each tab from its title and domain. MiniLM embeds that text, cosine similarity compares the vectors, and a clustering step creates candidate groups.
At this point the model has only suggested relationships. No group is final yet.
Step B: filter and validate with rules
The rules layer adds the context MiniLM does not know about:
- Prefer tabs opened within a 30-minute window.
- Require at least two tabs before creating a group.
- Require similarity to clear a conservative threshold.
- Treat shared domains as supporting evidence, never as the only reason to group.
- Reject borderline candidates instead of forcing every tab into a bucket.
The time signal is deterministic:
timeScore = clamp(1 - timeDiff / (30 * 60 * 1000), 0, 1)
The same input produces the same decision every time. That is valuable in an interface where users need to understand and correct the organizer's behavior.
Step C: compute confidence
Confidence is not something MiniLM predicts. It is calculated from the signals and rules the product can explain:
confidence =
0.5 * averageSemanticSimilarity +
0.3 * timeProximityScore +
0.2 * workflowConsistency
The exact weights can change as the grouping behavior is evaluated, but the principle stays the same: similarity is one term in the score, not the whole decision.
Naming groups without an LLM
The extension does not need a generative model to produce a useful label. A deterministic naming pass can:
- collect the titles in a group;
- tokenize the words;
- remove stopwords;
- score the remaining terms by frequency and TF–IDF;
- choose the top one to three terms;
- capitalize them as a short task label.
For example:
| Title | Useful terms |
|---|---|
| React hydration error | react, hydration, error |
| Next.js hydration warning | nextjs, hydration, warning |
| Fix hydration mismatch | fix, hydration, mismatch |
The resulting label can be Hydration Debugging without asking an LLM to invent a name.
Why MiniLM fits the extension
ZenTree Tabs has three constraints that make a compact local model a better fit than a remote general-purpose LLM:
| Constraint | Design choice |
|---|---|
| Privacy | Tab titles and browsing context stay on the device |
| Latency | Embeddings run locally through Transformers.js and WebAssembly |
| Distribution | The model is small enough to ship with a browser extension |
| Predictability | Deterministic rules decide when a group is accepted |
The model is roughly an 80 MB dependency in this kind of browser workflow, which is meaningfully smaller and easier to operate than a hosted reasoning system. The tradeoff is intentional: the extension gives up flexible language generation in exchange for local execution, repeatability, and a narrow task.
Language model vocabulary
LM means language model. LLM means large language model.
A language model estimates the probability of the next token given the tokens before it. In the sentence “The sky is …”, a model should assign more probability to “blue” than to “refrigerator” because the surrounding context points toward a likely continuation.
To process language, models split words and characters into smaller units called tokens. Training exposes the model to many examples and adjusts its parameters so that likely continuations receive higher probability.
There are three useful categories:
- Statistical language models such as n-grams use a fixed-size window of previous words.
- Neural language models learn richer representations and longer-range relationships.
- Large language models are very large neural models, commonly built with Transformer architectures, that can perform generation, coding, translation, and other tasks.
MiniLM is a small language model (SLM) in the sense that it is compact and fast. More precisely for ZenTree Tabs, it is used as a Transformer encoder for embeddings, not as a chat model that generates the next token.
The MiniLM twist: distillation
MiniLM gets its compact size through knowledge distillation. A larger teacher model provides more than a final answer: the smaller student can learn relationships inside the teacher's self-attention and value representations.
An analogy helps. Imagine a teacher solving a puzzle. Instead of only copying the completed puzzle, the student watches which pieces the teacher examined and how those pieces were related. The student has a smaller desk, but it learns a useful strategy from the teacher's internal work.
That is why MiniLM can preserve useful semantic relationships in a much smaller model. The matrices and linear algebra are not magic; they are the machinery that turns language into vectors and compares those vectors mathematically.
Embeddings as a map
The extension never “reads” a sentence the way a person does. It maps a sentence to coordinates:
| Sentence | Simplified embedding | Relationship |
|---|---|---|
| The weather is lovely today. | [0.32, -0.42, 0.15, ...] | Weather group |
| It's so sunny outside! | [0.31, -0.40, 0.18, ...] | Very close |
| He drove to the stadium. | [-0.84, 0.12, 0.02, ...] | Farther away |
This is why a semantic search can connect “nice day” with “lovely weather” even when the exact words differ. The vectors are close because the model learned relationships between their meanings.
What an LLM would add
ZenTree Tabs does not need an LLM for its current task. A reasoning model would become useful if the product needed:
- flexible reasoning across unusual workflows;
- more human-sounding group names;
- fewer hand-written rules;
- explanations that synthesize many different kinds of context.
That would also add network dependency, cost, latency, privacy questions, and less predictable behavior. For this extension, deterministic logic is a deliberate product choice rather than a temporary substitute.
Takeaway
MiniLM is not the brain of ZenTree Tabs. It is the semantic sensor. The grouping rules supply time, session continuity, conservative thresholds, confidence, and naming.
The result is a useful middle ground: an on-device model that understands enough meaning to propose relationships, surrounded by ordinary code that decides when those relationships are safe and useful to show.