Blazor WebAssembly App Runs Semantic Search on GitHub Pages With No Backend

A developer has implemented semantic search on the Blazing Story documentation site, a Blazor WebAssembly standalone app hosted entirely on GitHub Pages with no server, API, or database. The approach splits work into two stages: at build time, a C# console app generates vector embeddings from Markdown files and saves them into a static index file; at runtime, the browser loads that index and computes embeddings only for the user's search query. Vector search works by converting text into numerical arrays and measuring cosine similarity to find content that is close in meaning, even when exact keywords do not match. This allows users to search documentation semantically — for instance, querying 'fruit' could surface pages mentioning 'apple' or 'banana' — without any client-server round trips. The solution relies on Microsoft's ML.NET ONNX runtime and tokenizer NuGet packages to run a natural language processing model directly inside the browser via WebAssembly.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in