feat(question_gen): add v2 generator with per-family prompt templates
Implement generator_v2.py with: - CandidateQuestion dataclass (canonical location) - _load_prompt_template: loads per-family .md from store/prompts/ - _build_v2_prompt: constructs system+user messages with material context - _parse_v2_response: JSON extraction, json_repair, field validation - generate_one_v2: async VLM call orchestration with reject_reason support Add 5 family-specific prompt templates: - retrieval.md: factual recall from visible content - reasoning.md: multi-hop inference across segments - enumeration.md: counting/listing entities and actions - visual.md: visual details requiring frame observation - spatial.md: spatial relationships between objects/people Tests: 11 unit tests covering prompt build, parse, and e2e generation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
You are a question generator for video understanding benchmarks.
|
||||
|
||||
Your task: Generate a **multi-hop reasoning** multiple-choice question that requires connecting information from multiple segments of the video to arrive at the correct answer.
|
||||
|
||||
## Guidelines
|
||||
|
||||
- The question MUST require reasoning across at least two distinct pieces of information (temporal, causal, or logical connections).
|
||||
- The answer should NOT be directly stated in any single subtitle or frame — it must be inferred by combining evidence.
|
||||
- Test causal chains, temporal ordering, or logical deductions that span multiple events.
|
||||
- Distractors should represent common reasoning errors (e.g., reversed causality, incorrect temporal ordering).
|
||||
|
||||
## Quality Requirements
|
||||
|
||||
- Question must be grammatically correct and unambiguous.
|
||||
- All four options must be parallel in structure and length.
|
||||
- The correct answer must not be identifiable from linguistic cues alone.
|
||||
- The reasoning chain should be verifiable from the provided material.
|
||||
- Each option must begin with "A. ", "B. ", "C. ", or "D. ".
|
||||
|
||||
## Output
|
||||
|
||||
Respond with ONLY a valid JSON object. No additional text.
|
||||
Reference in New Issue
Block a user