{ "lesson": "57-end-to-end-research-demo", "title": "End-to-End Research Demo", "questions": [ { "stage": "pre", "question": "What is the demo's job in this lesson?", "options": [ "To benchmark the scheduler against a baseline", "To call a real language model on each branch", "To replace the earlier lessons with a single new framework", "To compose the primitives from the earlier lessons through plain Python imports" ], "correct": 3, "explanation": "The demo is a composition test. Each stage exists in its own lesson. The demo imports them and wires the report. No new framework, no new abstractions." }, { "stage": "pre", "question": "Why does the lesson load earlier lessons via importlib instead of a normal package import?", "options": [ "Because importlib is faster", "Because each earlier lesson is a standalone code/ folder, not an installed package; importlib loads them by file path", "Because asyncio requires importlib", "Because the lessons share a module name and would collide" ], "correct": 1, "explanation": "The lessons are not installed packages. Each ships a main.py inside its own code/ folder. importlib.util.spec_from_file_location loads them by path without polluting the global module namespace." }, { "stage": "check", "question": "How does the best-result picker decide between branches when more than one triggered a paper?", "options": [ "It picks the branch with the highest mean reward, breaking ties alphabetically by branch id", "It picks the branch with the most experiments run", "It picks at random for fairness", "It picks the first triggered branch" ], "correct": 0, "explanation": "Highest mean wins. Ties break on branch id so the demo is deterministic. Random would defeat the determinism test." }, { "stage": "check", "question": "What error does the picker raise when the scheduler reports zero paper triggers?", "options": [ "ValueError", "It returns None", "PaperValidationError", "NoTriggerError, which short-circuits the demo before the writer runs" ], "correct": 3, "explanation": "NoTriggerError is the typed failure mode. Returning None would let the writer run on a malformed input and break later with a less actionable error." }, { "stage": "post", "question": "Why does the demo run twice with the same seed in the determinism test?", "options": [ "To catch a memory leak", "To assert that the picked branch, reward, and paper section ids are identical across runs", "To exercise asyncio twice", "To prove that the scheduler is fair" ], "correct": 1, "explanation": "Determinism is part of the contract. Two runs with the same seed must produce the same artifacts. The test pins that." }, { "stage": "post", "question": "What does the demo report contain after a successful run?", "options": [ "Only the final LaTeX file", "Just the experiment count and a status string", "A model prompt and completion log", "scheduler_report, best_branch, best_reward, critic_result, paper_manifest, and stop_reason" ], "correct": 3, "explanation": "Every stage's output is preserved. The report is a composition of upstream outputs, not a transformed summary. Downstream tooling reads the manifest; debuggers read the trace inside scheduler_report." } ] }