1. Drug Mapping Performance
We evaluated THIRAWAT Mapper, which combined LanceDB retrieval with optional THIRAWAT reranking and deterministic tie-breaking, in three drug-mapping settings: Branded Drugs (n = 139), Clinical Drugs (n = 284), and TMT (n = 500).
Table 1 summarizes performance for TF-IDF, retriever-only ranking, retriever-only ranking with deterministic tie-breaking, retriever plus THIRAWAT reranking, and the full THIRAWAT Mapper pipeline. Across all settings, dense retrieval substantially outperformed TF-IDF, THIRAWAT reranking improved ranking quality beyond dense retrieval alone, and deterministic tie-breaking provided additional gains when clinically meaningful distinctions were not fully resolved by the embeddings.
TF-IDF performed poorly, consistent with the limitations of surface-form matching under synonymy and local naming variation—MRR@100 values of 0.491/0.216/0.143 and Hits@1 values of 0.309/0.116/0.058 for Branded/Clinical/TMT. Dense retrieval substantially improved both recall and ranking quality. Using SapBERT-XLMR retriever-only ranking, performance reached MRR@100 values of 0.901/0.756/0.504 and Hits@1 values of 0.856/0.683/0.364 for Branded/Clinical/TMT. Applying deterministic tie-breaking directly to retriever scores yielded only modest gains (for example, Clinical MRR@100, 0.756→0.770; TMT, 0.504→0.523), consistent with the tie-breaker having been designed as a conservative near-tie resolver rather than a primary ranker.
Building on this, adding THIRAWAT reranking with BiMaxSim pooling produced larger improvements. With SapBERT-XLMR retrieval, THIRAWAT reranking without tie-breaking achieved MRR@100 values of 0.931/0.810/0.576 and Hits@1 values of 0.899/0.729/0.426. Combining reranking with deterministic tie-breaking yielded the best overall performance: MRR@100 values of 0.954 (95% confidence interval [CI], 0.921–0.983), 0.898 (95% CI, 0.866–0.925), and 0.912 (95% CI, 0.891–0.931) for Branded/Clinical/TMT, with Hits@1 values of 0.942 (95% CI, 0.899–0.978), 0.859 (95% CI, 0.817–0.898), and 0.868 (95% CI, 0.838–0.896), respectively (see
Supplementary Materials for bootstrap CIs).
The largest marginal effect of tie-breaking was observed in TMT after reranking (MRR@100, 0.576→0.912; Hits@1, 0.426→0.868), consistent with local brand and product descriptors creating clinically meaningful near-ties. Gains for Branded Drugs and Clinical Drugs were smaller but remained consistent.
By contrast, BioLORD showed lower retriever-only performance than SapBERT in this setting (for example, retriever-only MRR@100 for SapBERT vs. BioLORD was 0.901 vs. 0.676 in Branded Drugs and 0.504 vs. 0.351 in TMT). However, BioLORD benefited substantially from reranking and deterministic tie-breaking, supporting the view that late interaction combined with explicit clinical cues can partially compensate for pooling limitations in dense retrieval.
A notable limitation of the TMT evaluation was that many branded products did not have corresponding branded entities in ATHENA. Only 113 of 500 TMT queries yielded acceptable same-brand exact matches. The remaining queries therefore relied on acceptable generic ingredient-strength-form targets that preserved core clinical identity while omitting the brand.
Failure analysis of the most effective pipeline, which combined SapBERT-XLMR retrieval, THIRAWAT-SapBERT reranking, and deterministic tie-breaking, showed that most false-at-1 cases involved candidates that were clinically close to the accepted target rather than unrelated drug errors. The largest group consisted of specificity errors, indicating that the system correctly identified the drug family but failed to select the exact accepted target because the accepted concept was more specific with respect to dosage strength, form, or release type.
2. Optional LLM Reordering
We evaluated an optional LLM reordering stage applied to the top 20 candidates ranked by THIRAWAT Mapper with deterministic tie-breaking and ATC preference, when available. Unless otherwise stated, these experiments used SapBERT-XLMR retrieval with THIRAWAT-SapBERT reranking.
Table 2 summarizes the effect of LLM reordering on MRR@100 and Hits@k.
LLM reordering was evaluated only as an optional post hoc comparison and was not part of the primary pipeline because it added latency, cost, and non-determinism. Under the Gemini 3 Flash Preview condition, Branded performance decreased (MRR@100, 0.954→0.943; Hits@1, 0.942→0.921), whereas Clinical performance improved to MRR@100 of 0.934 and Hits@1 of 0.905, and TMT improved to MRR@100 of 0.935 and Hits@1 of 0.898. This pattern suggests that LLM reordering can help when several clinically plausible alternatives remain near the top, but may be less reliable when deterministic cues already capture the exact branded or presentation-specific target.