CourseNatural Language Processing: The Complete Course · Module 6: Word and Sentence Embeddings · part 44 of 73
Part 44 · Module 6: Word and Sentence Embeddings

Lab: Help-centre search for Ines

102 min read·14 Oct 2026
Module 6 · Lab · About 70 minutes · Needs: lessons 1 to 4 of this module, and the Module 5 lab (or its cells, pasted here)

What you are building

SETTLED FILES inbox/embed.py inbox/search.py test_search.py SCORED ON 60 QUERIES four searches BM25, GloVe average, encoder, fusion FOR INES her search recall@5 1.000 MRR 0.914 index and vectors in models/, scores in reports/search_v1.json
The lab settles the module's files (blue), scores four ways to search the help centre (amber) and keeps the one Ines will use (green).

It is Monday 12 October 2026, project week 6. Rosa's fourth job is to suggest the right help-centre article while Ines replies. Ines will see five suggestions, so the score that matters is recall at 5: how often the right article is among them. Mean reciprocal rank (MRR) adds how near the top it sits.

The four lessons appended parts to inbox/embed.py, inbox/search.py and tests/test_search.py. This lab settles each file once, rebuilds the saved word vectors and the article index in models/, and scores four searches on the 60 labelled queries: BM25 keyword search, an average of GloVe word vectors, a sentence encoder with a FAISS index, and the two lists fused. Then it builds the search Ines will use and writes the result to reports/.

Open a new Colab notebook, call it module-06-lab.ipynb, and run each cell in order.

The rest of this part opens with an account

Signing up is free and takes one email. Nothing to pay, and nothing renews.