Topics
Goal is to score how similar a query and a document is. A less expensive approach is to use bi-encoders which simply encode the query and document into single vector embeddings. Similarity is computed between these embeddings. Such modelling for semantic similarity is also called as no-interaction modelling since query and document terms do not interact with each other (apart from the final cosine similarity calculation) as seen in vanilla RAG.
- Advantages:
- Fast and easy to implement
- Efficient extraction of query embeddings at inference time
- Document embeddings can be pre-computed
- Disadvantages:
- Less effective than cross-encoders