[Model] Let more models to support the score template. (#31335)
Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io> Signed-off-by: wang.yuqi <noooop@126.com> Co-authored-by: Cyrus Leung <cyrus.tl.leung@gmail.com>
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
A: {{ (messages | selectattr("role", "eq", "query") | first).content }}
|
||||
B: {{ (messages | selectattr("role", "eq", "document") | first).content }}
|
||||
Given a query A and a passage B, determine whether the passage contains an answer to the query by providing a prediction of either 'Yes' or 'No'.
|
||||
8
examples/pooling/score/template/mxbai_rerank_v2.jinja
Normal file
8
examples/pooling/score/template/mxbai_rerank_v2.jinja
Normal file
@@ -0,0 +1,8 @@
|
||||
<|im_start|>system
|
||||
You are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>
|
||||
<|im_start|>user
|
||||
query: {{ (messages | selectattr("role", "eq", "query") | first).content }}
|
||||
document: {{ (messages | selectattr("role", "eq", "document") | first).content }}
|
||||
You are a search relevance expert who evaluates how well documents match search queries. For each query-document pair, carefully analyze the semantic relationship between them, then provide your binary relevance judgment (0 for not relevant, 1 for relevant).
|
||||
Relevance:<|im_end|>
|
||||
<|im_start|>assistant
|
||||
11
examples/pooling/score/template/qwen3_reranker.jinja
Normal file
11
examples/pooling/score/template/qwen3_reranker.jinja
Normal file
@@ -0,0 +1,11 @@
|
||||
<|im_start|>system
|
||||
Judge whether the Document meets the requirements based on the Query and the Instruct provided. Note that the answer can only be "yes" or "no".<|im_end|>
|
||||
<|im_start|>user
|
||||
<Instruct>: {{ messages | selectattr("role", "eq", "system") | map(attribute="content") | first | default("Given a web search query, retrieve relevant passages that answer the query") }}
|
||||
<Query>: {{ messages | selectattr("role", "eq", "query") | map(attribute="content") | first }}
|
||||
<Document>: {{ messages | selectattr("role", "eq", "document") | map(attribute="content") | first }}<|im_end|>
|
||||
<|im_start|>assistant
|
||||
<think>
|
||||
|
||||
</think>
|
||||
|
||||
Reference in New Issue
Block a user