Demo: semantic search over Shop's help-center articles
On This Lesson 3 topics
This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.
In this lesson
build the semantic and hybrid search endpoint that prepares MID-067-LAB1.
Draft outline details
Step by step
- Create the
help_chunktable and the pgvector extension in a Flyway migration. - Embed 20 articles with the embedding model and insert vectors with the model name and content hash.
- Add
GET /help/search?q=: embed the query, run the top-5 cosine query. - Planned mistake: the table was filled with one embedding model and the query embedded with another; results look random. Fix: compare the
modelcolumn and re-embed one side. - Add the HNSW index; measure recall against the exact query and record latency and index size.
- Add
mode=hybridwith full-text plus RRF and compare on a few questions.
Practice
Apply this lesson with the module's lab, exercises and quiz.
Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.