AI engineering glossary · RAG vector search

What is inverted index?

Inverted index: A data structure that maps each term to the list of documents containing it, like the index at the back of a book. It makes keyword lookups fast and is the basis of search engines and BM25 scoring.

Level: intermediateTopic: RAG vector search

Inverted index: an example

The term 'GST' points to documents 4, 19 and 203, so a query for 'GST' reads only those three.

Related terms

More RAG vector search terms

Where you learn it

Inverted index is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.