Class TrainingDataDumper

java.lang.Object
org.ek9lang.assist.TrainingDataDumper

public class TrainingDataDumper extends Object
Outputs Q&A pairs in JSONL format for LLM fine-tuning. Supports both instruction/response format and chat-format. Used by the -Q CLI flag.
  • Constructor Details

    • TrainingDataDumper

      public TrainingDataDumper()
  • Method Details

    • dumpJsonl

      public void dumpJsonl(QuestionRegistry registry, PrintStream out)
      Dump all Q&A pairs as instruction/response JSONL to the given output stream. Each canonical question produces one entry, plus one entry per alternate phrasing.
    • dumpChatJsonl

      public void dumpChatJsonl(QuestionRegistry registry, PrintStream out)
      Dump all Q&A pairs as chat-format JSONL (for models expecting conversation).
    • escapeJson

      static String escapeJson(String value)