def vqa_prompt(questions, n_frames): head = (f"These are {n_frames} frames from one video, in order. The first is the video's " "first frame and the last is its final frame; the rest are sampled evenly from " "in between.\n\n" f"Answer each of the following {len(questions)} questions about that video. " "Each is a yes/no question about what is physically visible.\n\n") body = "\n".join(f"{i}. {q['question']}" for i, q in enumerate(questions, 1)) return (head + MISSING_RULE + "\n" + body + "\n\nReply with one line per question, in order, formatted exactly as:\n" "1. Yes\n2. No\n3. Missing\n(and so on). Give no other text.")