Removed from Wikantik (2026-07). This page documents an algorithm that Wikantik no longer runs. The reranker shipped, was measured, and was deleted after a ceiling experiment found no net retrieval lift even with a high-quality knowledge graph — see Knowledge Graph Rerank for the verdict. The algorithm and its analysis are kept because the technique is sound and the negative result is worth understanding; production search is BM25 + dense fused with RRF.
Wikantik's search pipeline once ended in a Graph-Aware Reranker. Where the earlier stages score textual and vector similarity, this stage used the topology of the Knowledge Graph to surface related content that might lack direct keyword or vector overlap.
The reranker operated on a simple and appealing intuition: "If a page mentions entities that are closely connected in the Knowledge Graph to the user's intent, that page is likely highly relevant."
The process began by resolving query terms into a set of seed entity IDs (Q), then performed a multi-source Breadth-First Search (BFS) through the kg_edges adjacency map up to a maximum radius (H_{max}, typically 2).
The proximity score S_{prox} for a candidate page was determined by the maximum proximity of its mentioned entities:
The implementation was built for high performance and graceful degradation.
Candidate Anchoring: The input was the fused list from the RRF stage. No pages were added or removed; the candidate set was fixed.
Bulk Loading: All entity mentions for the entire candidate set (e.g., top 100 pages) were fetched in a single SQL round-trip using the ANY(?) operator.
Base Rank Scaling: To keep the boost proportional to initial relevance, each page was assigned a base score derived from its fused rank: B(p) = 1.0 - (\text{rank} / N).
The Boost Calculation:
Stable Reordering: The list was re-sorted by the final score. Because the sort was stable, pages with equal proximity scores retained their relative RRF ordering.
The reranker was a non-critical enhancement, wrapped in fail-closed logic:
kg_edges table was being rebuilt or exceeded memory caps, returned the input list.The fail-safe design worked exactly as intended — and that turned out to be the problem. The stage could only reorder pages it was handed, and the shipped context bundle stopped handing it anything: the bundle retrieves chunks globally, never page-gating, so the rerank sat outside the serving path entirely. On the path where it did run, a much richer knowledge graph moved measured recall from slightly-negative to merely neutral. Entity proximity answers which entities relate; it does not answer which passage answers the question.
See Also: