Assignment Solving Engine

How the Agentic Orchestrator decomposes a messy prompt into a clean, submittable artifact.

The orchestrator is a planner-executor loop. Given a prompt (text, PDF, or image), it produces a plan, executes each step with the right skill, and assembles the output in the format you asked for.

Inputs

  • Text prompt: the assignment brief, pasted into Telegram.
  • PDF: parsed with pdf-parse, chunked if large.
  • Image: routed through Tesseract.js OCR; passed to the LLM as both extracted text and the original image (for multimodal models).

The pipeline

bash
# simplified trace for a typical assignment
1. ingest → normalize prompt + attachments
2. plan → LLM produces JSON plan of sub-tasks
3. dispatch → orchestrator routes each sub-task to a skill
4. solve → theory / code / math / citation skills run
5. format → render to PDF | code file | freeze screenshot
6. package → bundle artifacts into a single submission

Example plan

Scuba asks the model to emit something like this:

json
{
"course": "CS2003 — Data Structures",
"title": "Lab 04: Linked List",
"deliverables": [
{ "type": "code", "file": "linked_list.py" },
{ "type": "pdf", "sections": ["Introduction", "Algorithm", "Output"] },
{ "type": "freeze", "source": "linked_list.py" }
],
"submit": {
"target": "google-classroom",
"course": "CS2003",
"assignment": "Lab 04"
}
}

Skills

  • theory: long-form answers, well-cited.
  • code: generates + runs code in a sandbox, captures stdout.
  • math: LaTeX-first answers, rendered into the PDF.
  • cite: adds references when the rubric requires them.

The human-in-the-loop

Before submitting, Scuba sends you a preview of the final PDF and a Confirm / Edit / Regenerate inline keyboard. Nothing gets turned in without your tap.

Why Scuba asks, even when it's confident

Professors have feelings. A 30-second review catches the 1% of cases where the model misreads the brief, and saves you from a resubmit.

Next

See Output Formats for how artifacts are rendered, or Google Classroom Integration for the submission step.