add the zero_shot method - #45
Merged
Merged
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…tive mock for generate Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Owner
Author
|
Restructured the test: the placeholder/scaffold behavior is now tested directly on Written by Claude and Anna |
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.
Adds the
zero_shotmethod: styles are defined by rewrite instructions instead of example texts. It plugs into everything the previous PRs prepared — samegenerate(texts, style_dict, ...)interface and labeled output, its ownstyle_bank(sostylesandnselect instruction styles likeformal,simple,complex,caps,lowercase, ...), the shared causal LM base class (samemodel/precisionoptions, shared loaded model withprompting), and_run_promptsfor generation.The bank restores the previously deleted zero-shot prompts from git history under clean style names (curation note from the #35 spec: the one-line "more simple" prompt is dropped in favour of the detailed simplification prompt). With this method,
style_textsare instructions — exactly one per style (more errors, naming the style). An instruction may place the input text itself via[DOCUMENT SEGMENT]; otherwise the text is appended at the end with a fixed "output only the rewrite" ending.The method itself is ~30 lines of logic; the rest of the diff is the instruction bank (restored data), three tests, and the README/methods docs sections.
Closes #35. Part of #13.
Written by Claude and Anna