Expand description
The LLM feedback layer: a pure prompt builder and the rig-core provider client that turns a model’s structured tool call into a typed verdict.
Three concerns, one submodule each (§4.1): prompt builds the
injection-hardened prompt (pure, §2.1); provider is the closed set of LLM
backends; feedback runs the request and maps the result to a Verdict
(the only effectful part, §2.2). The split keeps the pure prompt core separate
from the effectful request (§3.1). This layer owns prompt-build, provider-client
construction, and the DTO → domain mapping; it does not run learner code or
score evals — that is the runner and grade
layers’ job. See ADR-0006.
The public names are re-exported here, so callers use core::llm::build_prompt,
core::llm::OPEN_CODE, etc., without depending on the internal split.
Structs§
- Exec
Results - A graded run: what the submission produced, paired with its per-check verdicts.
- Prompt
- A rendered LLM feedback prompt.
- Submission
- A learner’s submitted code, awaiting feedback.
Enums§
- Feedback
Error - Why feedback could not be produced.
- Provider
Choice - The LLM backend used to grade a submission.
- Verdict
- A graded verdict on a submission: correct or incorrect, each carrying the learner-facing message.
Constants§
- CHECKS_
LABEL - Labels the check-results section.
- CLOSE_
CODE - Closes the fence around the verbatim student submission.
- OPEN_
CODE - Opens the fence around the verbatim student submission.
- OUTPUT_
LABEL - Labels the captured-output section.
Functions§
- build_
prompt - Build the LLM feedback prompt for a graded submission.
- request_
feedback - Request structured feedback for a
promptfrom the chosen provider.