System prompt used at eval time:
You are a table relevance expert. Given a question and a set of candidate
tables, rank them from most to least useful for answering the question. Reason
in a <think>...</think> block, then output exactly JSON with key
ranked_tables.
The user message lists candidate tables as ### Table 1, ### Table 2, … The
model outputs, after a <think> reasoning block, a JSON object:
{"ranked_tables": [3, 1, 5, 2, 4, ...]}
where the integers are the 1-based candidate positions in the prompt, best
first. Map them back to your table ids to obtain the reranked list.
Evaluation
Evaluated as a single-call listwise reranker (think mode) reordering the
first-stage top-25 candidate list, on 4 out-of-domain table-QA datasets.
SQA / TAT-QA use the full test set; HybridQA / TabFact use a fixed shared
500-query sample.
Table with columns: Dataset, n, recall@10, ndcg@10, acc@10, MRR| Dataset | n | recall@10 | ndcg@10 | acc@10 | MRR |
|---|
| SQA | 148 | 0.893 | 0.764 | 0.838 | 0.735 |
| TAT-QA | 362 | 0.666 | 0.546 | 0.431 | 0.637 |
| HybridQA | 500 | 0.882 | 0.790 | 0.796 | 0.833 |
| TabFact | 500 | 0.809 | 0.726 | 0.634 |
acc@k = all gold tables within the top-k (strict).
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "CoTCond_merged"
tok = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype="bfloat16", device_map="auto")
SYSTEM = ("You are a table relevance expert. Given a question and a set of candidate "
"tables, rank them from most to least useful for answering the question. "
"Reason in a <think>...</think> block, then output exactly JSON with key ranked_tables.")
user = "Question: ...\n\n### Table 1\n...\n\n### Table 2\n...\n"
msgs = [{"role": "system", "content": SYSTEM}, {"role": "user", "content": user}]
text = tok.apply_chat_template(msgs, tokenize=False, add_generation_prompt=True)
out = model.generate(**tok(text, return_tensors="pt").to(model.device),
max_new_tokens=8192, temperature=0.6, top_p=0.95)
print(tok.decode(out[0], skip_special_tokens=True))
For high-throughput reranking use vLLM (loads directly, no LoRA flags).
Notes
- dtype: bfloat16. Single-file
model.safetensors (~16 GB).
- Sibling model: Forge-CoTCond — same task, trained with the forge /
model-forge pipeline on NQ-Tables + MultiTabQA. On the mean over these 4
datasets, Forge-CoTCond is slightly higher on recall@10 / acc@10 while this
in-repo CoTCond is slightly higher on ndcg@10 / MRR.
Citation
The accompanying paper is currently under review; a citation will be added here
once it is available on arXiv.