A coding assistant needs the files relevant to a requested change, without filling its input with unrelated code. Relace describes a two-stage approach for large repositories. First, precomputed numerical representations of code help find a shortlist resembling the request. A second model, the Retrieval rerankingReordering retrieved candidates with a stronger relevance model.Full definition →, reads the request alongside each shortlisted candidate and scores its relevance more directly. This concentrates the more expensive comparison on fewer files. The retrieval article emphasizes preserving relevant files during filtering: excluding a necessary file can leave the coding model without information it needs to make the change.
Terms in this piece · Glossary
Retrieval reranking — Reordering retrieved candidates with a stronger relevance model.
Retrieval — Selecting evidence relevant to the current request.
embedding — A list of numbers representing a piece of text's meaning, so that similar meanings end up numerically close and can be searched.