Assessments — create, take, submit, and grade — are implemented in the demo (Go app), not in the docproc CLI. docproc is document processing only.
- Backend:
demo/go/— API routes for assessments, questions, submissions; grading ininternal/grade/(single-select, formula, conceptual, derivation). - Frontend:
demo/web/— Create assessments, take them, view results. - Database: PostgreSQL (from
demo/docker-compose.yml):docproc_assessments,docproc_questions,docproc_submissions.
See demo/README.md for how to run the demo.
| Type | Mode | Behavior |
|---|---|---|
| single_select / mcq | single_select | Deterministic: student choice matches correct choice → full marks, else 0. |
| short_answer (equation-like ref) | formula | LLM: "Are these two mathematical expressions equivalent?" → score 0–100. |
| short_answer (default) | conceptual | LLM: grade by coverage of key concepts; paraphrases get credit. |
| long_answer | derivation | LLM: rubric-based partial credit per step. |
Grading uses the demo’s OpenAI client (OPENAI_API_KEY). No docproc CLI involved.
- POST /assessments/:id/submit with
answers: { question_id: value, ... }. - Go loads questions, infers mode per question, runs the grader (single_select in-process; formula/conceptual/derivation via LLM).
- Results are stored in
docproc_submissions(score_pct, question_results) and returned.
No background queue for grading; submission is synchronous.