← Research

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

1e91e111e131e151e170.30.50.7FLOPs per query, log scaleNDCG@10MiniLM retrieverColBERTv2MiniLM cross-encoderRT pipelineBERT cross-encoderQwen3-Reranker-0.6BRankLLaMA-7BGPT-4 listwise

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.

prose serialization"Find me popular bike glovesaround $38.00 that are goodand can ship now."four fields written as prosetyped Cell contextproducts.price38.00numberrating.average4.7numberrating.total_reviews1200numberinventory.in_stocktruebooleanfour named cells with types and values

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.

NDCG@10, all candidates, held out0.286embedding retrieval0.633RT over relational facts

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.

query“…complement my recently purchasedDragon Alliance Goggle DX Violet Ion”query product rowGoggle DX_Violet_Purple Ioncandidate rowDragon Alliance Rouge Ski Gogglesthe right answeralso_buyrank#2 → #1 after also_buy enters contextthe also_buy edge changes the ranking score

Sources