Relational reranking: scoring search results with structured facts
RT is an 85M Relational Transformer that reranks search results from structured product data for realtime search.
11 Aug 2026 · Research · 8 min
Traditional enterprise search produces a large set of candidate products from a query to be reorganized as search results. These queries can have conditions over structured product data, such as "goggles under $50", have deep personalization requirements, and need to incorporate recent buy signals. Rather than treating all reranking candidates as text, we select typed data from the context graph, parse the query into generalized structured data, and condition the 85M Relational Transformer network. We find this outperforms traditional rerankers in the weight class that realtime search requires.
What is in the context?
RT receives each structured fact as a "Cell" with a name, type and value. The field name supplies meaning and the declared type influences how the model reads the value. Rows can act as nodes connected through typed schema relationships, allowing an also_buy Cell to point toward a linked product row. Each scoring context gathers candidate Cells and query-derived facts from selected linked rows.
name type value
products.price float 38.00
inventory.in_stock bool true
ratings.total_reviews int 1200
products.title string "Dragon Alliance Rouge"
relationships.also_buy string "DX_Violet_Purple_Ion"Feature Engineering
RT weights the Cells in its context inside the transformer network. The published RT study measured 22.8 mean R² across zero-shot regression tasks with the full context. Schema-name ablation reduced the score to 20.5, and removing the target entity’s history drove it to -5.5. Applied to reranking, this method measures held-out NDCG after removing a product field or linked-row group.
Parsing Query Text for Candidate Context
Long text query blobs degrade the performance of RT to the accuracy of the embedding model and the quality of the surrounding context. To improve the quality of RT, we include an LLM query parsing step to enrich the context with possible database cells. Semantic context can be added, such as what qualifies as "cheap", and what "popular" could mean. Converting to arbitrary cells doubled the accuracy of the model, and parsing to a known schema made the model competitive with an LLM reranker 7x its size.
Why RT Belongs After Retrieval
In RelBench, relational systems matched or beat tuned LightGBM models built from task-specific features on 11 of 15 tasks. Learning across primary and foreign key links gave the relational models access to fields beyond the target table. Cell attention brings that structure into RT reranking through a bounded context tied to its schema information.
On the product-search portion of MTEB DeepPlanning, MiniLM retrieval scored 0.286 NDCG@10, a metric that rewards relevant products near the top. Training on 87 queries brought RT to 0.633 across 24 held-out queries and all 4,047 candidates.
How Relational Facts Change the Rank
STaRK benchmarks search over text and relationships using an Amazon graph that records products people often buy together. For a request naming one product and asking for matching goggles, the pipeline resolves the product to a row before adding a direct also_buy edge to connected candidate contexts. RT uses the also_buy edge to move the relevant candidate from second under title similarity to first.
Sources
- 2016XGBoost: A Scalable Tree Boosting SystemChen & Guestrin
- 2019Passage Re-ranking with BERTNogueira & Cho
- 2020Document Ranking with a Pretrained Sequence-to-Sequence ModelNogueira et al.
- 2021ColBERTv2: Effective and Efficient Retrieval via Lightweight Late InteractionSanthanam et al., NAACL 2022
- 2022Why do tree-based models still outperform deep learning on tabular data?Grinsztajn et al., NeurIPS 2022
- 2023Is ChatGPT Good at Search? Investigating Large Language Models as Re-Ranking AgentsSun et al., EMNLP 2023
- 2023Fine-Tuning LLaMA for Multi-Stage Text RetrievalMa et al.
- 2023Relational Deep Learning: Graph Representation Learning on Relational DatabasesFey et al.
- 2024STaRK: Benchmarking LLM Retrieval on Textual and Relational Knowledge BasesWu et al., NeurIPS 2024
- 2024RelBench: A Benchmark for Deep Learning on Relational DatabasesRobinson et al.
- 2025Relational Transformer: Toward Zero-Shot Foundation Models for Relational DataRanjan et al., ICLR 2026
- Codestanford-star/rt-jthe pretrained checkpoint used here