Class NegativeTrainingDumper
java.lang.Object
org.ek9lang.assist.NegativeTrainingDumper
Outputs negative training examples as JSONL for LLM fine-tuning.
Each NegativeExample produces 1-3 training entries:
- "What's wrong with this code?" — always generated
- "How do I fix Exxxxx?" — when howToFix is non-empty
- "How does EK9 differ from {language}?" — for each language comparison
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final recordA single training entry with a user question and assistant response. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) List<NegativeTrainingDumper.TrainingEntry> buildTrainingEntries(NegativeExample example) Build all training entries for a single negative example.intwriteTrainingData(List<NegativeExample> examples, Path outputDir) Write negative training data with stratified 90/10 train/valid split by category.
-
Constructor Details
-
NegativeTrainingDumper
public NegativeTrainingDumper()
-
-
Method Details
-
writeTrainingData
Write negative training data with stratified 90/10 train/valid split by category.- Parameters:
examples- the negative examples to outputoutputDir- the directory to create (e.g., ./ek9_negative_training_data)- Returns:
- the total number of JSONL entries written
- Throws:
IOException
-
buildTrainingEntries
Build all training entries for a single negative example.
-