Learning to Code with Context: A Study-Based Approach
This paper presents a user study within a university game development course that investigates how students utilize generative AI tools throughout the software lifecycle and evaluates the effectiveness of a repository-aware, locally deployed LLM assistant using Retrieval-Augmented Generation to provide contextually grounded support.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
The Big Picture: Teaching Coders in the Age of AI
Imagine a university class where students are like a team of architects and builders tasked with constructing a complex video game from scratch. This is a "programming project" course. Usually, these students learn to build by doing it themselves, but now, they have a new, powerful tool in their pocket: Generative AI (like ChatGPT or GitHub Copilot).
The researchers at the University of the Bundeswehr Munich wanted to answer two big questions:
- How are students actually using these AI tools right now?
- Can we build a better AI tool that actually understands the specific game the students are building, rather than just guessing?
Part 1: The "Wild West" Study (What Students Did Naturally)
First, the researchers watched what happened when students were left to their own devices with free, public AI tools. They asked 38 students to fill out a survey after their project was done.
The Findings:
- The "Text" vs. "Code" Divide: Students loved using AI for writing things down. It was like having a super-fast secretary who could draft requirements, write user manuals, or explain what a piece of code might do.
- The "Hallucination" Problem: When it came to actually writing code for their specific game, the AI often got lost. Imagine asking a travel agent to book a flight to a city that doesn't exist yet. The AI would confidently invent details that didn't match the students' actual project.
- The "Context" Gap: The biggest issue was that the public AI tools didn't know about the specific "blueprints" (source code) the students were working with. They were like a mechanic trying to fix a Ferrari while looking at a manual for a Ford. The AI would suggest parts that didn't fit or didn't exist in the students' code.
The Verdict: Students used AI a lot (89% of them!), mostly to save time on writing and explaining. But when they tried to use it to build the actual game, they often had to fix the AI's mistakes because the AI didn't "know" their specific project.
Part 2: The "Local Librarian" Experiment (The New Solution)
Realizing that the public AI tools were like "general knowledge" encyclopedias that lacked specific details, the researchers built their own custom AI assistant.
How it Works (The Analogy):
Think of the public AI as a genius but amnesiac writer. They know how to write code, but they don't know what your specific house looks like.
The researchers built a Local Librarian.
- The Library: They put the students' entire game code and documentation into a private, local library (a "repository").
- The Librarian: This AI assistant lives on a computer right on campus (for privacy). Before it answers a question, it doesn't just guess; it goes to the library, finds the exact blueprints and code files relevant to the question, and reads them.
- The Result: Now, when a student asks, "How do I add a sound effect to the ship?", the Librarian looks at the actual ship code in the library and gives an answer that fits perfectly, rather than making things up.
The Experiment:
They tested this "Local Librarian" with two specific tasks:
- Task A: Changing how ships look in the game (from boxes to 3D models).
- Task B: Adding background music that can be turned on/off.
They tested different "personalities" of the AI (different models) and different settings (how creative vs. how strict the AI should be).
The Results:
- Context is King: The Local Librarian was much better at giving answers that actually fit the project. It didn't invent fake code as often because it had the real blueprints to look at.
- The "Goldilocks" Setting: They found that if the AI was too "creative" (high randomness), it started hallucinating again. If it was too "strict," it was boring. A middle-ground setting worked best.
- Size Doesn't Always Matter: Interestingly, the biggest, most powerful AI models weren't always the best. A medium-sized model actually did a great job, while the smallest model struggled to understand the complex instructions.
- One Stubborn Flaw: Even with the Librarian, the AI sometimes forgot to update a specific "resource list" (like forgetting to register a new sound file in the game's menu). This happened across almost all models, suggesting it's a tricky habit for AI to break, not just a lack of knowledge.
The Bottom Line
The paper concludes that while AI is a fantastic tool for helping students write documentation and understand general concepts, it struggles when it tries to build specific software without "reading the room" (the project context).
By building an AI that has direct access to the project's code and documents (the "Local Librarian"), the researchers showed that AI can become a much more reliable partner. It stops guessing and starts helping with accurate, context-aware solutions.
What's Next?
The researchers plan to turn this "Local Librarian" into a true Tutor. Instead of just giving the answer, they want the AI to guide students through the problem, helping them learn how to solve it, rather than just handing them a ready-made solution. This ensures students still learn the skills they need, even with AI by their side.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.