The Biergarten Data PipelineThe Biergarten Data PipelineValidatesmocked,model,temperature,top-p, etc.ParseArguments(argc, argv)spdlog::error usage infonoAre arguments valid?yesInit CurlGlobalState & LlamaBackendStateBinds CURLWebClient, WikipediaService,Gemma4JinjaPromptFormatter, andeither MockGenerator or LlamaGeneratordi::make_injector(...)injector.create<BiergartenDataGenerator>()BiergartenDataGenerator::Run()Return 0QueryCitiesWithCountries()Lookup failed?yesnospdlog::warn "context lookup failed"Store EnrichedCity{Location, region_context}Remaining citiesFor each sampled Location?DoneGenerateBreweries(enriched_cities)Exception thrown?yesnospdlog::warn "brewery generation failed"Store GeneratedBreweryspdlog::info dump of generated JSON fieldsLogResults()JsonLoader::LoadLocations("locations.json")std::ranges::sample(all_locations, 50)GetLocationContext(loc)FetchExtract("City, Country")FetchExtract("beer in Country")Backed by CURLWebClient::GetFetchExtract("beer in City")Generator ModeMockGeneratorLlamaGeneratorDeterministicHash(location)Select from kBreweryAdjectives, kBreweryNouns,kBreweryDescriptionsFormat BreweryResultPrepareRegionContext(region_context)LoadBrewerySystemPrompt("prompts/system.md")Format user_promptAttempt = 0Uses Gemma4JinjaPromptFormatter,llama_tokenize, and llama_sampler_sampleInfer(system_prompt, user_prompt, max_tokens, kBreweryJsonGrammar)ValidateBreweryJson(raw, brewery)Is JSON Valid?yesnomax_tokens += 700yesError == "incomplete JSON"Update user_prompt with validation errorAttempt++Attempt < 3?yesStill Invalid?yesnothrow std::runtime_errorReturn BreweryResultRemaining citiesFor each EnrichedCity?Donemain.ccBiergartenDataGeneratorJsonLoaderWikipediaServiceDataGenerator