Skip to content

LitterBox+: LLM-Integration#10

Merged
b-fein merged 129 commits intomasterfrom
scratch_gpt
Oct 1, 2025
Merged

LitterBox+: LLM-Integration#10
b-fein merged 129 commits intomasterfrom
scratch_gpt

Conversation

@b-fein
Copy link
Copy Markdown
Member

@b-fein b-fein commented Jul 21, 2025

Implementation of the LitterBox⁺ extension submitted to the ASE 2025 Tool Demonstration Track.


gofraser and others added 30 commits January 26, 2025 15:09
Removes the warning messages printed on program startup.
The ArgGroup is exclusive by default, i.e. the user can either specify
a custom query (`-q`) or use one of the predefined ones, and the CLI
library automatically ensures the user did not choose both at the same
time.
We are using a recent-enough Java version that supports sealed
interfaces. It is easier to `if instanceof`/switch pattern-match on
those to ensure type safety.
Attempt to handle different types of LLM tasks for different types of targets

See merge request se2/scratch/litterbox/litterbox!717
Not really needed after thinking about it again.
Adds properties to choose the LlmApi and PromptBuilder via system
properties. This allows the construction of the analysers without
explicitly specifying them. The analysers still provide the option to
manually instantiate them with specific LlmApi and PromptBuilder
instances. This (a) makes them easier to test, and (b) allows for
more flexibility when using LitterBox as a library and using the
internal Java API directly.
make llm analysers independent of ScratchLlm

See merge request se2/scratch/litterbox/litterbox!720
b-fein added 26 commits July 4, 2025 19:24
Statically setting these options should work for most usecases. However,
during testing, we set different values for these properties. Therefore,
this breaks when statically loading such values *once* when initialising
the class for the first time. Now, we instead load the values every time
a new instance of the `JSONReportGenerator` is created. This is okay for
normal use performancewise, since when running LitterBox as CLI program,
the report generator is only ever instantiated once to write the report.
Todo: revert before merge
Make the system prompt-me-focussed and word it as ‘I am a student that
needs help’. Otherwise, we currently sometimes get answers like ‘In
your example, the student has used …’, which is not helpful for
showing the issue explanation in the Scratch GUI to the student.
We need to keep our special sprite- and script-identifying comments in
the ScratchBlocks code unchanged. Otherwise we cannot match the script
against existing ones again.
At least Gemma 3 occasionally generated new IDs for the scripts and/or
added more remarks to the same line.
It would be a nice improvement for programs that contain multiple
scripts if updated ones would not be placed at position 0/0 but instead
at the position of the script they are replacing.
Implementing this would probably be a bit finicky since we have to check
where the TopNonDataBlockMetadata resides (either the event, or the
first statement of the statement list). The new script might have a
different event, so we also need to find the correct location to place
the metadata. We cannot directly set attributes, but instead must apply
the NodeReplacementVisitor.
@b-fein b-fein merged commit ec150b5 into master Oct 1, 2025
2 checks passed
@b-fein b-fein deleted the scratch_gpt branch October 1, 2025 15:30
b-fein added a commit that referenced this pull request Mar 7, 2026
merge embeddedkittens back into LitterBox

Closes #14, #9, #10, #6, #4, and #2

See merge request se2/scratch/litterbox/litterbox!811
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants