flowchart LR data[("Catalog and pattern files")] lm["LM Studio API"] sql[("SQL Server")] subgraph generator["RLHF.Generator.Api + RLHF.Generator"] routes["HTTP Endpoints
Program.cs
Validation, contracts,
status mapping"] reader["TrainingDataReader
Validates and parses subjects,
categories, and patterns"] generation["TrainingGenerationService
Plans, fingerprints, resumes,
parallelizes, orders, validates,
and checkpoints"] lmclient["LmStudioClient
Local token resolution,
prompt construction,
HTTP completion"] keyword["Keyword Services
Load canonical values/variants;
dry-run or apply unique backfill"] reset["TrainingItemResetService
Clears generated rows
and run checkpoints"] db["RlhfGeneratorDbContext
EF Core mappings, seeds, indexes,
relationships, and transactions"] options["Options
GenerationOptions
LmStudioOptions
SentenceTenses"] routes -->|Dispatches| generation routes -->|Dispatches| keyword routes -->|Dispatches| reset generation -->|Reads definitions| reader generation -->|Normalizes| lmclient generation -->|Persists batches| db keyword -->|Uses| db reset -->|Uses| db options -->|Configures| generation options -->|Configures| lmclient end data -->|Reads| reader lmclient -->|HTTP chat completion| lm db -->|EF Core SQL| sql classDef component fill:#85bbf0,stroke:#0b4884,color:#000; classDef primary fill:#1168bd,stroke:#0b4884,color:#fff; classDef external fill:#e1d5e7,stroke:#9673a6,color:#000; class routes,reader,lmclient,keyword,reset,db,options component; class generation primary; class data,lm,sql external;