Implement Al Semantic Search in a Nuxt Blog w/ Transformer.js
summary
A Nuxt blog gets keyword, fuse.js fuzzy, and offline semantic search by embedding titles/descriptions into vectors with Transformer.js, storing embeddings in the generated SQLite from Nuxt Content and querying via cosine similarity. An embedding-generator script and AST-based chunking produce per-paragraph embeddings that improve relevance; a web worker implementation using the workers module keeps the main thread responsive. A hybrid ranker merges fuzzy and semantic scores with tunable weights. It works locally (model ~40MB) but rebuilds and re-generates embeddings on content updates and can slow at scale.
AI-written summary · about
chapters (7)
- 0:00Nuxt Content search setup
- 8:19Keyword search with Nuxt Content
- 15:56Fuzzy search with Fuse.js
- 27:05Semantic search and embeddings
- 34:03Hybrid search combining methods
- 39:46Offline AI with Transformers.js
- 41:09Q&A on composables
related talks
24mEmpowering Vue Apps with AI
55mSupercharged Search with Semantic Search and Vector Embeddings
49mBuilding AI Enabled Web Apps
45mMaking semantic search & RAG real: How to build a prod-ready app
31mVue, You and AI Search
27mAI-Generated React Server Components
45mTomorrow’s SEO: How AI is Reshaping Search
44mSEO in a Vue.js world
