Skip to content

Langflow Workflow Visualizations

This document visualizes the langflow workflows found in the repository using mermaid diagrams.

1. Finanzprodukt-Namensgenerator Workflow

This workflow takes a financial product description as input and generates a creative name for it using GPT-3.5 Turbo.

flowchart LR
    input[/"Input Node:
    Produktbeschreibung
    Default: Grüner Rentenfonds mit ESG-Filter"/]
    template["PromptTemplate:
    'Finde einen kreativen Namen für folgendes Finanzprodukt: {input}.'"]
    llm["LLM Node:
    model: gpt-3.5-turbo"]
    output[/"Output Node"/]

    input --> template
    template --> llm
    llm --> output

    classDef inputNode fill:#e1f5fe,stroke:#0288d1,stroke-width:2px
    classDef promptNode fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
    classDef llmNode fill:#fff3e0,stroke:#f57c00,stroke-width:2px
    classDef outputNode fill:#fce4ec,stroke:#d81b60,stroke-width:2px

    class input inputNode
    class template promptNode
    class llm llmNode
    class output outputNode

2. Risiko-Router Workflow

This workflow analyzes a risk event by routing it to the appropriate risk category (market, credit, or operational) and then processes it with the corresponding prompt template before sending it to the LLM.

flowchart TD
    input[/"Input Node:
    Risikoereignis
    Default: Zinsanstieg in den USA"/]

    router{"Router Node:
    Routes based on risk type"}

    template_market["PromptTemplate:
    'Analysiere das Markt-Risiko: {input}'"]

    template_credit["PromptTemplate:
    'Bewerte das Kreditrisiko: {input}'"]

    template_operational["PromptTemplate:
    'Identifiziere das operationale Risiko: {input}'"]

    llm["LLM Node:
    model: gpt-3.5-turbo"]

    output[/"Output Node"/]

    input --> router

    router -->|market| template_market
    router -->|credit| template_credit
    router -->|operational| template_operational

    template_market --> llm
    template_credit --> llm
    template_operational --> llm

    llm --> output

    classDef inputNode fill:#e1f5fe,stroke:#0288d1,stroke-width:2px
    classDef routerNode fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
    classDef promptNode fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
    classDef llmNode fill:#fff3e0,stroke:#f57c00,stroke-width:2px
    classDef outputNode fill:#fce4ec,stroke:#d81b60,stroke-width:2px

    class input inputNode
    class router routerNode
    class template_market,template_credit,template_operational promptNode
    class llm llmNode
    class output outputNode

Combined Architecture Overview

This diagram shows a high-level overview of both workflows in the repository:

flowchart LR
    subgraph "Finanzprodukt-Namensgenerator"
        input1[/"Input: Produktbeschreibung"/] --> template1["Prompt Template"] --> llm1["GPT-3.5 Turbo"] --> output1[/"Output: Produktname"/]
    end

    subgraph "Risiko-Router"
        input2[/"Input: Risikoereignis"/] --> router["Router"]
        router -->|market| template_market["Markt-Risiko Template"]
        router -->|credit| template_credit["Kredit-Risiko Template"]
        router -->|operational| template_operational["Operationales-Risiko Template"]

        template_market & template_credit & template_operational --> llm2["GPT-3.5 Turbo"]
        llm2 --> output2[/"Output: Risikoanalyse"/]
    end

    classDef workflow1 fill:#e3f2fd,stroke:#1565c0,stroke-width:2px
    classDef workflow2 fill:#f9fbe7,stroke:#827717,stroke-width:2px

    class input1,template1,llm1,output1 workflow1
    class input2,router,template_market,template_credit,template_operational,llm2,output2 workflow2

Workflow Descriptions

Finanzprodukt-Namensgenerator

This is a simple linear workflow that: 1. Takes a financial product description as input 2. Passes it through a prompt template asking for a creative name 3. Sends the formatted prompt to GPT-3.5 Turbo 4. Returns the generated product name as output

Risiko-Router

This is a more complex workflow with conditional routing: 1. Takes a risk event description as input 2. Routes it to one of three templates based on the type of risk (market, credit, or operational) 3. Formats the appropriate prompt for the specific risk type 4. Sends the formatted prompt to GPT-3.5 Turbo 5. Returns the risk analysis as output

The router makes decisions based on the content of the input, determining whether the risk is related to market conditions, payment defaults, or internal processes.