一键导入
prompted-evaluator
Reference documentation for the PromptedEvaluator operator. Use when: scoring text quality with LLM without filtering rows.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Reference documentation for the PromptedEvaluator operator. Use when: scoring text quality with LLM without filtering rows.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | prompted-evaluator |
| description | Reference documentation for the PromptedEvaluator operator. Use when: scoring text quality with LLM without filtering rows. |
| trigger_keywords | ["PromptedEvaluator","prompted-evaluator","LLM scoring","quality evaluation"] |
| version | 1.0.0 |
PromptedEvaluator uses an LLM to score each row of text (1-5) and writes the score into a new column without deleting any rows.
from dataflow.operators.core_text import PromptedEvaluator
PromptedEvaluator(
llm_serving=llm_serving,
system_prompt="Please evaluate the quality of this text on a scale from 1 to 5.",
)
| Parameter | Required | Default | Description |
|---|---|---|---|
llm_serving | Yes | None | LLM service object |
system_prompt | No | "Please evaluate..." | System prompt defining scoring criteria (1-5 scale) |
op.run(
storage=self.storage.step(),
input_key="raw_content",
output_key="eval",
)
# returns: output_key string
| Parameter | Required | Default | Description |
|---|---|---|---|
storage | Yes | None | Storage step object |
input_key | No | "raw_content" | Column containing text to evaluate |
output_key | No | "eval" | Column to write LLM scores into |
from dataflow.operators.core_text import PromptedEvaluator
from dataflow.serving import APILLMServing_request
from dataflow.utils.storage import FileStorage
class MyPipeline:
def __init__(self):
self.storage = FileStorage(
first_entry_file_name="./data/input.jsonl",
cache_path="./cache",
file_name_prefix="step",
cache_type="jsonl"
)
self.llm_serving = APILLMServing_request(
api_url="https://api.openai.com/v1/chat/completions",
key_name_of_api_key="DF_API_KEY",
model_name="gpt-4o",
max_workers=10
)
self.evaluator = PromptedEvaluator(
llm_serving=self.llm_serving,
system_prompt="Evaluate text quality on a scale from 1 to 5."
)
def forward(self):
self.evaluator.run(
storage=self.storage.step(),
input_key="content",
output_key="quality_score"
)
if __name__ == "__main__":
pipeline = MyPipeline()
pipeline.forward()
input_key column.system_prompt to score the text (1-5).output_key column.output_key string.output_key column, keeps all rowsUse PromptedEvaluator + GeneralFilter for two-step scoring and filtering.
DataFlow 开发专家上下文加载器。当用户在 DataFlow 仓库中进行开发时触发, 涵盖:新建算子/Pipeline/Prompt、诊断报错、规范审查、 以及感知仓库变更并建议更新知识库。 Trigger: user is developing in DataFlow repo, asks to create operator/pipeline/prompt, encounters errors, wants code review, or asks about operators.
Reasoning-guided pipeline planner that generates standard DataFlow pipeline code
Reference documentation for the BenchDatasetEvaluatorQuestion operator. Extended version of BenchDatasetEvaluator with question and subquestion support. Use when: evaluating answers with question context or multiple subquestions.
Reference documentation for the BenchDatasetEvaluator operator. Covers the constructor, two comparison modes (match/semantic), and pipeline usage. Use when: comparing predicted answers against ground truth answers in benchmark evaluation.
Reference documentation for the Text2QASampleEvaluator operator. Use when: evaluating QA pair quality across multiple dimensions.
Reference documentation for the UnifiedBenchDatasetEvaluator operator. Use when: evaluating model answers on benchmark datasets.