Skip to content
Ameen Abozaid
Planned lessonMID-067-L05

Hybrid search: keywords plus vectors

  • Lesson 5 of 6
  • Mid-level
On This Lesson 4 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

combine full-text and vector search and say when each wins.

Planned topics

  • Vectors win on meaning and paraphrase ("my package is late").
  • Keywords win on exact terms: order numbers, SKUs, error codes, names.
  • Hybrid: run both, then merge the rankings. Reciprocal Rank Fusion (RRF) merges by rank, so scores need no common scale.
  • PostgreSQL does both: tsvector with a GIN index plus pgvector.
  • Test with real questions; do not assume hybrid is always better.
Draft outline details

Demonstration

two ranked lists merged: RRF score = sum of 1 / (k + rank) per list (k = 60 is a common constant). An article ranked 1st in text and 3rd in vector beats one ranked 1st in only one list.

Check your understanding

Which search finds the order id "ORD-88231"?

Show answer

Keyword search; vectors do not match exact codes reliably.

Practice

Apply this lesson with the module's lab, exercises and quiz.

Lab and exercises Quiz

Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.

Continue to next lesson

Type to search levels, phases, modules and lessons.