opendcai/dataflow-webui/bench-answer-generator
Claude Code and agent skill by opendcai/dataflow-webui
- community
Checking that the SKILL.md file is still in the repository.
Reference documentation for the BenchAnswerGenerator operator. Covers the constructor, full run() signature, actual generation behavior, and integration notes for unified bench evaluation pipelines. Use when: generating model answers from benchmark question rows before passing the dataframe into UnifiedBenchDatasetEvaluator.
Install
npx vskill@latest install opendcai/dataflow-webui/bench-answer-generatorSKILL.md
BenchAnswerGenerator Operator Reference
BenchAnswerGenerator generates model answers from a benchmark dataframe and is designed to align with UnifiedBenchDatasetEvaluator.
1. Import
2. Constructor
| Parameter | Required | Default | Description | |
|---|---|---|---|---|
eval_type | No | "key2_qa" | Evaluation type | |
llm_serving | Yes | None | LLM service object implementing generate_from_input(...) | |
prompt_template | No | FormatStrPrompt | Prompt object used to build prompts. In practice, pass a FormatStrPrompt(...) instance, None, or a DIYPromptABC subclass instance | |
system_prompt | No | "You are a helpful assistant specialized in generating answers to questions." | System prompt forwarded to the serving layer when supported | |
allow_overwrite | No | False | Whether to overwrite an existing output column | |
force_generate | No | False | Whether to force generation for some types that are skipped by default |
Important prompt_template Note
Although the source code sets the default value to FormatStrPrompt, that default is the class object itself, not an instance.
In normal usage, you usually want to pass a FormatStrPrompt(...) instance so you can explicitly control the prompt text. None is also supported and makes the operator fall back to its built-in prompt builder.
Use one of these patterns instead:
or
When prompt_template is a FormatStrPrompt instance, the current source may pass these fields into build_prompt(...):
eval_typequestioncontextchoiceschoices_text
For key2_qa and key2_q_ma, the practical required field is question. For key3_q_choices_a and key3_q_choices_as, the practical required fields are question and choices. If you want cleaner formatting for choice tasks, prefer {choices_text} over {choices}.
Supported eval_type Values
| eval_type | Default behavior in current source | |
|---|---|---|
key1_text_score | Skips generation | |
key2_qa | Generates | |
key2_q_ma | Generates | |
key3_q_choices_a | Skips generation by default | |
key3_q_choices_as | Generates | |
key3_q_a_rejected | Skips generation |
If force_generate=True, the current implementation generates for all types except key1_text_score.
3. run() Signature
| Parameter | Required | Default | Description | |
|---|---|---|---|---|
storage | Yes | None | Current operator-step storage object | |
input_text_key | No | None | Declared for evaluator API alignment; not used in current run() implementation | |
input_question_key | Conditionally required | None | Required whenever generation is actually performed | |
input_target_key | No | None | Declared for API alignment; not used in current run() implementation | |
input_targets_key | No | None | Declared for API alignment; not used in current run() implementation | |
input_choices_key | Conditionally required | None | Required for key3_q_choices_a and key3_q_choices_as when generation is performed | |
input_label_key | No | None | Declared for API alignment; not used in current run() implementation | |
input_labels_key | No | None | Declared for API alignment; not used in current run() implementation | |
input_better_key | No | None | Declared for API alignment; not used in current run() implementation | |
input_rejected_key | No | None | Declared for API alignment; not used in current run() implementation | |
input_context_key | No | None | Optional context column name | |
output_key | No | "generated_ans" | Output column written back into the dataframe |
4. Actual Execution Logic
The current implementation behaves as follows:
- Read the dataframe from
storage. - Decide whether generation is needed by calling
_need_generation(eval_type). - If generation is not needed, write the dataframe back unchanged and return
[]. - If
output_keyalready exists andallow_overwrite=False, write the dataframe back unchanged and return[]. - Require
input_question_keyto exist whenever generation is performed. - For
key3_q_choices_aandkey3_q_choices_as, also requireinput_choices_key. - If
input_context_keyis provided and exists, normalize it into a prompt context string. - Build one prompt per row using
prompt_template.build_prompt(...)when available; otherwise fall back to an internal prompt template. - Call
llm_serving.generate_from_input(...). - Write the generated answers into
dataframe[output_key], persist viastorage.write(df), and return[output_key].
5. Important Rules
- In the current source,
key3_q_choices_adoes not generate by default. It is skipped unlessforce_generate=True. - In the current source,
key1_text_scorenever generates, even ifforce_generate=True. input_question_keyis the only mandatory input column for generated question-answer flows in the current implementation.- The declared parameters
input_text_key,input_target_key,input_targets_key,input_label_key,input_labels_key,input_better_key, andinput_rejected_keyare currently exposed for API compatibility, but they are not consumed insiderun(). - If
input_choices_keyis present but a row contains an empty or invalid value, the implementation substitutes[""]instead of failing that row. - The return value is a list: usually
[output_key]on success, or[]when skipped.
6. Typical Usage
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/canonical/core_text/generate/bench-answer-generator/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/opendcai/dataflow-webui/bench-answer-generator)