File size: 1,943 Bytes
2c60f1f
 
 
 
 
 
 
 
 
 
 
 
 
 
b9ba117
2c60f1f
b9ba117
2c60f1f
b9ba117
2c60f1f
 
 
b9ba117
 
 
2c60f1f
b9ba117
 
 
 
 
2c60f1f
 
 
 
 
b9ba117
 
 
2c60f1f
 
 
b9ba117
2c60f1f
 
b9ba117
 
 
2c60f1f
 
 
b9ba117
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
---
language:
- en
library_name: sentence-transformers
pipeline_tag: text-ranking
base_model: cross-encoder/ms-marco-MiniLM-L6-v2
tags:
- sentence-transformers
- text-ranking
- text2sql
- schema-linking
- aap-sql
---

# AAP-SQL candidate reranker

AAP-SQL 候選重排序器是完整 AAP-SQL 設定中的 cross-encoder。它對欄位檢索器召回的候選欄位重新評分,保留前 10 個核心欄位供後續提示增強使用。

AAP-SQL candidate reranker is the cross-encoder used after the first stage of schema retrieval. It scores the retrieved candidate columns and retains the top 10 core columns for prompt augmentation.

## Model details

- Base model: cross-encoder/ms-marco-MiniLM-L6-v2
- Training objective: BinaryCrossEntropyLoss
- Training seed: 42
- Training data: schema-ranking examples derived from the BIRD training split and schema descriptions
- Expected library: sentence-transformers>=5.1.2

## AAP-SQL publication branch

The complete AAP-SQL workflow, research method terminology, BIRD directory layout, and reproduction instructions are maintained in the [GitHub publication branch](https://github.com/Tommyweige/AAP-SQL/tree/codex/final-aap-sql-experiment/AAP-SQL-Original).

## Use with AAP-SQL

Download this repository into the path expected by the final runner:

~~~powershell
hf download TommyPanLab/AAP-SQL-Candidate-Reranker --local-dir models/cross_encoder_schema_paper_repro
~~~

Direct loading:

~~~python
from sentence_transformers import CrossEncoder

model = CrossEncoder("TommyPanLab/AAP-SQL-Candidate-Reranker")
scores = model.predict([ ("user question", "table.column: column description") ])
~~~

## Data and license notice

The training examples were derived from the BIRD benchmark. Review the [BIRD project terms](https://bird-bench.github.io/) before using the model. No additional license has been declared for these fine-tuned weights; the upstream model and dataset terms still apply.