You need to enable JavaScript to run this app.
文档中心
云搜索服务

云搜索服务

复制全文
下载 pdf
检索结果调优
重排调优
复制全文
下载 pdf
重排调优
您在实际测试、生产的过程中,可能会遇到一些查询不符合预期的情况,针对这些难以调整搜索效果的场景,云搜索服务提供了多种调优策略。本文介绍重排调优方案。​
背景信息​
云搜索服务可以将整个混合搜索流程闭环在一个 Pipeline 中。您可以通过类似向量 embedding 模型的方式,启动一个 Rerank 模型,然后将模型配置在 Search Pipeline 中。​
您可以直接使用云搜索服务的公共 Rerank 模型,比如 cross-encoder 等;也可以创建自定义的模型,只需要在模型处理中实现 Rerank 接口,然后就可以开发业务相关的干预逻辑(快速支持调优上线)。​
  • 公共模型:选择 Rerank 模型。​
  • 自定义模型:单击创建模型,上传模型文件。​
重排调优配置​
在 Search Pipeline 中,使用以下示例中的 response_processors 添加 Rerank 模型的相关配置。​
​
PUT /_search/pipeline/my_pipeline​
{​
"description": "Pipeline for reranking with a cross-encoder",​
"response_processors": [​
{​
"remote_rerank": {​
"ml_opensearch": {​
"remote_config": { ​
"method": "POST",​
"url": "http://d-18283223**-serve-svc.r-00g0so8**:8000/v1/rerank",​
"params": { //主要是在 http url 里面注入 token 密钥等等​
"token": ""​
},​
"headers" : { //主要是在 http header 里面注入信息,例如 token、user等等​
"Content-Type" : "application/json"​
},​
"advance_request_body" : { //对应 OpenAI 协议中的 model​
"model" : "cross-encoder/ms-marco-MiniLM-L-6-v2"​
}​
}​
},​
"context": {​
"document_fields": [​
"passage_text"​
]​
}​
}​
}​
]​
}​
​
​
最近更新时间:2025.09.22 18:43:14
这个页面对您有帮助吗?
有用
有用
无用
无用