SWIRL 5

Relevance Built for Legal: Inside SWIRL 5's Three-Pass Re-Ranking

In legal language, "shall" and "may" are not synonyms and a defined term is not a loose paraphrase. SWIRL 5 ranks results in three passes so exact wording is honored first, then meaning is weighed, then true relevance is scored.

← Back to Blog

Most modern AI search leans on a single embedding model: turn the query into a vector, turn the documents into vectors, return the nearest neighbors. That works well for loose, conversational questions. It works badly for legal work, where the difference between two near-identical phrases can be the difference between two outcomes. A purely semantic ranker will happily treat a defined term and its everyday synonym as the same thing. Legal language does not allow that.

SWIRL 5 ranks in three passes, each correcting the weaknesses of the one before, and all of them run locally.

SWIRL 5 result scoped to a matter, showing a single high-confidence document ranked by the relevance pipeline with a confidence indicator and traceable source.
A matter-scoped result ranked by the three-pass pipeline. The most relevant document rises to the top with a confidence indicator and a link back to source.

Pass one: keyword and BM25, for exact terms

The first pass is lexical. Quoted phrases and exact terms are honored as written, with classic BM25 scoring. This is the pass that respects the precision legal language demands: a search for a specific statutory phrase, a defined term, or a citation finds the documents that actually contain it, not documents that are merely "about" the topic. Nothing in the later passes is allowed to quietly discard an exact match.

Pass two: embeddings with hybrid fusion

The second pass adds meaning. SWIRL re-ranks with an embedding model and fuses those scores with the lexical results using reciprocal rank fusion, so semantic and keyword signals reinforce each other rather than one overriding the other. A document that uses different words for the same concept can now surface, but it cannot push aside the exact-match results that pass one established.

Pass three: a cross-encoder reads query and document together

The third pass is where real relevance is decided. A cross-encoder reads the query and each candidate document together, as a pair, rather than comparing two separately made vectors. That joint reading is far better at judging whether a passage genuinely answers the question; whether the "reasonable person" in this opinion is the standard you are researching or merely a phrase that happened to appear. It is the most expensive pass, which is exactly why SWIRL runs it last, only on the candidates that survived the first two.

Local by design, with no vector database

Both models run locally. Nothing is sent over the wire to a third-party ranking service, and there is no vector database to build, secure, or keep in sync with the source systems. For legal teams that removes an entire category of risk: there is no second copy of privileged material sitting in an index that your information-governance policy never contemplated. The documents stay in iManage, Box, or wherever they live; only the ranking happens in SWIRL.

Why three passes instead of one

Each pass covers the next one's blind spot. Keyword search is precise but literal. Embeddings understand meaning but blur exact wording. A cross-encoder judges true relevance but is too costly to run on everything. Run in sequence, they give legal researchers what a single model cannot: exact terms respected, related concepts surfaced, and the most relevant authority scored to the top, with every result still traceable to its source.

See the three-pass pipeline rank results against your own legal sources.

Join the Preview