diff --git a/pipeline/README.md b/pipeline/README.md index 54eda46..914c13f 100644 --- a/pipeline/README.md +++ b/pipeline/README.md @@ -180,6 +180,10 @@ The post-build step copies `prompts/` into `build/prompts/`. Rebuild after editi | `name_local`, `description_local` | Local-language display content | | `region_context` | Richer copy for cards and detail pages | +## Process Flow + +![An activity diagram](./diagrams/activity-diagram.svg) + ## Next Steps The pipeline currently produces city-aware brewery records. The next passes add SQLite output and additional fixture types so the app can exercise the full brewery domain without live data. diff --git a/pipeline/diagrams/activity-diagram.svg b/pipeline/diagrams/activity-diagram.svg new file mode 100644 index 0000000..0d92bee --- /dev/null +++ b/pipeline/diagrams/activity-diagram.svg @@ -0,0 +1 @@ +Biergarten Pipeline - Activity Diagram (Swimlanes)Biergarten Pipeline - Activity Diagram (Swimlanes)Determines mode (mocked vs model)and LLM sampling parameters.Parse Command-Line ArgumentsLog Error & Display UsagenoAre arguments valid?yesInitialize Global StatesConstruct Dependency Injector (Boost.DI)Instantiate BiergartenDataGeneratorLog WarningDumps generated JSON fields to spdlogLogResults()Exit Pipeline Successfully (0)JsonLoader::LoadLocations("locations.json")Randomly samples from loaded arraySample up to 50 LocationsGetLocationContext(Location)Fetch extract for Region (City, Country)Fetch extract for "beer in <Country>"Fetch extract for "beer in <City>"Store EnrichedCity (Location + Context)Remaining locationsFor each sampled Location?DoneGenerator ModeMockGeneratorLlamaGeneratorCalculate Deterministic HashSelect Adjective, Noun, and DescriptionBuild BreweryResultStore GeneratedBrewery into resultsPrepare System and User PromptsAttempt Counter = 1Applies Gemma 4 Jinja formattingand GBNF JSON GrammarRun Model Inference (llama.cpp)Validate JSON Output (ValidateBreweryJson)Is JSON Valid?yesnoParse into BreweryResultIncrease max_tokens thresholdyesError == "incomplete JSON"noAppend Error details to Prompt for LLM correctionIncrement Attempt CounterAttempt <= 3?yesStill Invalid after 3 attempts?yesnoSkip CityStore GeneratedBrewery into resultsRemaining enriched citiesFor each EnrichedCity?DoneOrchestratorDataLoaderEnrichmentGenerator