TRANSMISSION // 2612.02668v1
Can Retrieval Help AI Draft Better Coding Assignments?
Source published
In a preliminary BRIDGES study, retrieval helped GPT-5 produce more executable assignments, but API errors persisted and teaching value remains untested.

A programming exercise can look convincing yet rely on functions a course’s software does not support. A study tested whether giving a language model BRIDGES documentation could make generated assignments more reliable. The results point to better functionality in this test, but not a guarantee of correct or effective teaching materials.
Instructors may want programming assignments tailored to the tools and concepts taught in a particular course. A general-purpose language model, however, can suggest software functions that do not exist. That risk may be especially relevant for educational libraries and simplified programming environments that are less represented in training data.
Rahad Arman Nabid, Jeni Sorathiya and Stephen MacNeil investigated whether retrieval-augmented generation, or RAG, could help. RAG provides a model with relevant external information as it generates a response. In this study, the information came from documentation for BRIDGES, a toolkit and API that supports visualizations of data structures and algorithms.
Comparing generation with and without documentation
With help from a data-structures-and-algorithms instructor at one research university, the team generated 100 assignments. Half used GPT-5 alone and half used RAG. The prompts drew on combinations of 25 ACM curricular topics and 10 BRIDGES datasets selected at random. In both conditions, the model generated an assignment description and a code solution.
The researchers ran each solution in the BRIDGES environment to check whether it executed and produced the expected visualization. If it failed, they allowed up to three rounds of revision, refining the assignment description. In the RAG condition, each generation step retrieved the five most relevant chunks of API documentation.
The team measured API utilization, API hallucination and functionality. Functionality meant that the solution ran initially or after repair. They also recorded errors, token use, completion time and estimated costs. For comparisons, they used Fisher’s exact tests for binary outcomes and Mann–Whitney U tests for numerical outcomes, with a Holm correction for multiple comparisons.
More functional assignments, with caveats
RAG produced functional assignments more often than GPT-5 alone: 88% compared with 68%. Among successful runs, RAG required a median of one attempt, while the model without retrieval required a median of two. In this particular test, supplying documentation was associated with more solutions that ran successfully and fewer repair attempts.
The results for API utilization were less conclusive. RAG assignments had higher reported utilization—33.3% compared with 5.9%—but the difference was not statistically significant. The authors also found that assignments spanning multiple concepts could overlook relevant APIs for one of them. For example, an assignment covering graph representations and sorting referenced graph APIs but missed sorting-related APIs.
The reported API hallucination rates were 9.09% with RAG and 14.29% without it. This difference is descriptive, not evidence of a statistically established or consistent reduction: the authors’ conclusion says the initial findings do not show that RAG consistently reduces hallucinations. Errors or exceptions were logged for 79 of the 100 assignments, including some that later succeeded. Examples included unavailable methods, unsupported arguments and undefined names. The authors suggest that retrieving only five documentation chunks may leave gaps that the model fills with plausible but undocumented API references.
The paper also reports lower resource use in the RAG condition. Median input-token use was 17,587 versus 24,082, and median output-token use was 9,490 versus 22,419. The estimated median cost per assignment was $0.0047 versus $0.0101—about 54% lower in this setup—and reported generation time was 89.9 versus 176.7 seconds. These figures describe this experiment; they do not establish that RAG will be cheaper or faster in other courses or systems.
What the study cannot tell us
The evaluation involved one instructor, one university, GPT-5 and the BRIDGES toolkit. It tested technical measures, not whether students would find the assignments clear, appropriately challenging or educationally useful. It also did not test effects on student learning. The authors note that BRIDGES is not entirely private, so information about it available online may have influenced the results.
The authors identify expert evaluation using multiple datasets and classroom studies as future work. An executable solution is a useful technical check, but it does not by itself establish pedagogical quality. RAG improved functionality in this experiment, while the API-utilization and hallucination findings call for caution and continued instructor review.
The source identifies the work with the proceedings of SIGCSE TS 2027 and provides a DOI. The supplied material does not specify the review process, so no conclusion about that process is warranted. The authors themselves describe their results as preliminary. The findings are best understood as an early, focused test of assignment generation with BRIDGES—not a general verdict on AI-generated teaching materials.
- retrieval-augmented generation
- AI in education
- programming assignments
- BRIDGES
- large language models
Reviewed cross-references
These connections were reviewed by a model, not independently fact-checked by a human. Similarity does not imply agreement; consult the original papers and the evidence below.
Can AI structure XR training scenarios?
Shared method: Both studies use retrieval-augmented generation to supply domain-specific context to an LLM: the assignment study retrieves BRIDGES documentation, while the XR study retrieves RDF segments from an ontology. The assignment study reports persistent API hallucinations and suggests limited retrieval coverage may leave gaps; the XR study reports its RAG approach among the strongest configurations but notes that retrieval context was limited. Their tasks and evaluations differ, so this is a methodological connection, not evidence that one approach’s outcomes generalize to the other.
Model review: · openai-codex/gpt-6-luna
Evidence and provenance
Selected excerpts, not complete papers. PDF extraction can omit figures or damage equations, tables and reading order; sources may be preprints.
2612.02668v1 — Original paper
Excerpt reference:
static/papers/2612.02668v1.md:92-172
Basis: Paper text
Source file SHA-256:8e5f4c9f90de0905984548379ad5a83691f036f2843182df929f78d233fababe2612.02668v1 — Original paper
Excerpt reference:
static/papers/2612.02668v1.md:173-212
Basis: Paper text
Source file SHA-256:8e5f4c9f90de0905984548379ad5a83691f036f2843182df929f78d233fababe2612.01304v1 — Original paper
Excerpt reference:
static/papers/2612.01304v1.md:550-654
Basis: Paper text
Source file SHA-256:15f0b4fe54eddad94c62fd0521526e1c51196f1b0f0173c6da9ea1f167f988d82612.01304v1 — Original paper
Excerpt reference:
static/papers/2612.01304v1.md:859-942
Basis: Paper text
Source file SHA-256:15f0b4fe54eddad94c62fd0521526e1c51196f1b0f0173c6da9ea1f167f988d8
Similar examples give AI coding models a modest boost in a selected test
Shared method: Both studies augment code-related LLM tasks with retrieved examples or documentation. The assignment study retrieves BRIDGES API documentation to support assignment and solution generation; the competitive-programming study retrieves similar solved problems as prompt examples. The latter reports gains on a selected subset of CodeContests problems, whereas the former evaluates assignment functionality and API use. Their retrieval material, tasks, and outcomes differ, so the results are not directly comparable.
Model review: · openai-codex/gpt-6-luna
Evidence and provenance
Selected excerpts, not complete papers. PDF extraction can omit figures or damage equations, tables and reading order; sources may be preprints.
2612.02668v1 — Original paper
Excerpt reference:
static/papers/2612.02668v1.md:92-172
Basis: Paper text
Source file SHA-256:8e5f4c9f90de0905984548379ad5a83691f036f2843182df929f78d233fababe2611.09791v1 — Original paper
Excerpt reference:
static/papers/2611.09791v1.md:79-118
Basis: Paper text
Source file SHA-256:e2fdf1b7f735c254fd3823c419194a6630797486a5dd04e4d760cde19fdafdaa2611.09791v1 — Original paper
Excerpt reference:
static/papers/2611.09791v1.md:898-942
Basis: Paper text
Source file SHA-256:e2fdf1b7f735c254fd3823c419194a6630797486a5dd04e4d760cde19fdafdaa
Related reading
Automatically matched by shared topic keywords. These links do not imply that the sources agree or establish a consensus.
Can AI structure XR training scenarios?
Source published
Shared keywords: ai in education, large language models, retrieval augmented generation
A course wiki helps AI connect ideas—sometimes
Source published
Shared keywords: ai in education, large language models, retrieval augmented generation
Prompt tweaks improve educational AI scores—but not learning evidence
Source published
Shared keywords: ai in education, large language models
How AI Uses Reasoning Structures to Generate Gaokao Math Problems
Source published
Shared keywords: ai in education, large language models
How Can AI Personalize Learning Without Fragmenting a Course?
Source published
Shared keywords: ai in education