System Design
19. AI System Design and LLM InfrastructureAnimated
Reranking Architecture
A second pass that reorders results.
The idea
A cross-encoder scores the query and each candidate together for better precision.
Watch it work
Press play, pause, or step through. Some animations have settings you can change.
- client
- gateway / proxy
- service
- cache
- data store
- queue / stream
A fast first stage retrieves many candidates cheaply.
- step:
- 1/4
- at:
- Query
1/7
The green dot is a request moving through the system.
Step by step
- 1Retrieve many candidates
- 2Score each with a reranker
- 3Reorder
- 4Return the top few
Where it is used
RAG quality.
Watch out for
Adds latency, so rerank only a short list.