A simple scoring formula for better search reranking

Search results can be reordered by giving extra weight to documents that are linked from other documents. The formula first caps the link count at a chosen maximum, then uses a logarithm so the boost grows slowly.

This gives a useful lift even when there is only one link, while stopping heavily linked documents from taking over the whole result list. The method was used in a legal RAG app to include document popularity in search ranking.

It later worked in a different tool that found similar code with , where closeness inside the was used as the boost signal. The main idea is that search quality can sometimes improve with a cheap, predictable rule instead of adding another complex AI step.

Key points

  • The formula boosts results based on a signal such as link count or code distance.
  • The boost grows slowly, so very popular items do not dominate .
  • It was useful in both a legal RAG app and a similar-code search tool.
  • It is cheap and because it does not require another AI .
  • For , better can reduce irrelevant material sent to the model.
Read original