Multi-Rep & ColBERT Retrieval Fashions for RAGs

Listed here are my favourite strategies — one is quicker, the opposite is extra correct.

Retrieval models like Multi-representation and ColBERT help RAG produce faster or better results.
Picture by Alexander Gray

I construct RAG apps; it’s enjoyable!

However the apps I construct don’t do properly in manufacturing. They’re promising prototypes, however they by no means go stay!

The wrongdoer is nearly all the time the retrieval. Come on, that is the center of RAGs. What are we supposed to construct with out this?

That is till I index paperwork for quicker or higher retrieval.

Indexing helps us engineer options that retrieve information quicker. It considerably reduces latency, bettering the general app expertise. We use indexing in nearly each app we construct. It has nothing to do with LLMs or RAGs.

Virtually all of the databases ship with indexing help. As an example, Postgres can do B-Tree, GiST, SP-GiST, BRIN, GIN, and Hash varieties of indexing. That’s a listing lengthy sufficient to go to a separate future submit.

On this submit, I’ll focus on the favored indexing methods I ceaselessly use for higher doc retrieval. These strategies are, nonetheless, particular to RAG apps. You’ll see why in a second.

My two go-to indexing strategies are multi-representation and ColBERT. These aren’t the one strategies we now have. And it’s…