feat: add REPL hints for LLMs using FINAL_VAR#77
Merged
alexzhang13 merged 1 commit intoalexzhang13:mainfrom Feb 1, 2026
Merged
feat: add REPL hints for LLMs using FINAL_VAR#77alexzhang13 merged 1 commit intoalexzhang13:mainfrom
alexzhang13 merged 1 commit intoalexzhang13:mainfrom
Conversation
- Improved FINAL_VAR error messages to show available variables and explain that variables must be created before use - Added SHOW_VARS() helper function to all REPL environments - Updated system prompt with WARNING section about common mistake - Documented SHOW_VARS() in REPL initialization instructions This helps weaker LLMs (like gemini-3-flash-preview) avoid the common mistake of calling FINAL_VAR before creating the variable. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
alexzhang13
approved these changes
Feb 1, 2026
Contributor
Author
|
woot! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Some models need help understanding the REPL interaction pattern. This adds hints that guide LLMs to use
FINAL_VARfor returning results.Test results with gemini-3-flash-preview:
Context
Discussion: https://x.com/raw_works/status/2016515555088322858
Test plan
🤖 Generated with Claude Code