calibrate_query_mapper¶
Calibrate query in question-answer pairs based on reference text.
This operator adjusts the query (question) in a question-answer pair to be more detailed and accurate, while ensuring it can still be answered by the original answer. It uses a reference text to inform the calibration process. The calibration is guided by a system prompt, which instructs the model to refine the question without adding extraneous information. The output is parsed to extract the calibrated query, with any additional content removed.
基于参考文本校准问答对中的查询。
该算子调整问答对中的查询(问题),使其更加详细和准确,同时确保其仍能由原始答案回答。它使用参考文本来指导校准过程。校准过程由系统提示引导,指示模型在不添加无关信息的情况下细化问题。输出被解析以提取校准后的查询,并移除任何附加内容。
Type 算子类型: mapper
Tags 标签: cpu, api
🔧 Parameter Configuration 参数配置¶
name 参数名 |
type 类型 |
default 默认值 |
desc 说明 |
---|---|---|---|
|
<class ‘str’> |
|
API model name. |
|
typing.Optional[str] |
|
URL endpoint for the API. |
|
typing.Optional[str] |
|
Path to extract content from the API response. |
|
typing.Optional[str] |
|
System prompt for the calibration task. |
|
typing.Optional[str] |
|
Template for building the model input. |
|
typing.Optional[str] |
|
Template for formatting the reference text. |
|
typing.Optional[str] |
|
Template for formatting question-answer pairs. |
|
typing.Optional[str] |
|
Regular expression for parsing model output. |
|
typing.Annotated[int, Gt(gt=0)] |
|
The number of retry attempts when there is an API |
|
typing.Dict |
|
Parameters for initializing the API model. |
|
typing.Dict |
|
Extra parameters passed to the API call. |
|
|
Extra keyword arguments. |
📊 Effect demonstration 效果演示¶
not available 暂无