Skip to content

Demo 02 · Client-side

Keyword vs semantic retrieval

Type a query — or load a preset — and watch the same corpus ranked three ways: BM25 keyword scoring, embedding similarity, and a hybrid fusion of the two. Some queries only one side gets right; that is the point. The best-ranked passages are then stitched into a cited answer.

The corpus covers my own projects — read the case studies →

All three rankings are computed live in your browser. For preset queries the semantic column uses real 384-dim embeddings — bge-small-en-v1.5, an open-weight model run locally through ONNX Runtime, precomputed and shipped as JSON. Free-text queries fall back to a lexical proxy over a hand-built concept map, and the method chip says which one you are looking at. The hybrid column fuses the other two by rank (RRF); the same corpus, constants, and precomputed vectors, with a cross-encoder reranker added, are measured in the full study →

Presets

Semantic wins — the embedding surfaces a speed win that shares no words with the query.Both agree — a rare exact term that the embedding also reads correctly.Semantic wins — a paraphrase that shares almost no tokens with its target passage.Both agree — the wording and the meaning point at the same passage.Keyword wins — the corpus wording is close, and the embedding drifts to a neighboring project.Neither side answers — the corpus has nothing on this, and the floors refuse.

Semantic wins — the embedding surfaces a speed win that shares no words with the query.

designed cases: semantic wins 2 · keyword wins 1 · both agree 2 · neither answers 1

Runs locally in your browser.

What’s in the corpus — 12 passages

CodLab

  • Author disambiguation at scale
  • The O(N²) read pattern
  • Out of core, one machine
  • Signals, vetoes, and safeguards

Mitsubishi

  • YOLO inference optimization
  • Both axes at once

DIATICS

  • Full-cycle computer vision
  • Plate recognition and pose estimation
  • Serving models with FastAPI

Senior project

  • An assistant for Alzheimer's patients
  • Recall in conversation
  • Medication tracking and exercises