app:
  description: "Spine-authored workflow generated from a natural-language request."
  icon: "🧩"
  icon_background: "#E4FBCC"
  mode: workflow
  name: "Cross-Industry Explainable Classification: Question Classify Knowledge"
  use_icon_as_answer_icon: false
dependencies:
  - type: marketplace
    current_identifier: null
    value:
      marketplace_plugin_unique_identifier: langgenius/openai:0.3.8@592c8252795b5f75807de2d609a03196ed02596b409f7642b4a07548c7ff57ef
kind: app
version: "0.6.0"
workflow:
  conversation_variables: []
  environment_variables: []
  features: {}
  graph:
    nodes:
      - id: start_1
        data:
          desc: ""
          selected: false
          type: start
          title: Start
          variables:
            - variable: "item_to_classify"
              label: "Item to classify"
              max_length: null
              options: []
              type: paragraph
              required: true
            - variable: "taxonomy"
              label: "Allowed taxonomy"
              max_length: null
              options: []
              type: paragraph
              required: true
            - variable: "decision_rules"
              label: "Decision rules"
              max_length: null
              options: []
              type: paragraph
              required: true
        height: 90
        position: {x: 30, y: 220}
        positionAbsolute: {x: 30, y: 220}
        selected: false
        sourcePosition: right
        targetPosition: left
        type: custom
        width: 244
      - id: llm_1
        data:
          context:
            enabled: false
            variable_selector: []
          desc: ""
          type: llm
          title: Generate result
          model:
            provider: langgenius/openai/openai
            name: gpt-4o-mini
            mode: chat
            completion_params:
              max_tokens: 2048
          prompt_template:
            - id: generated-system
              role: system
              text: "You are the specialist for this workflow. Goal: Use-case contract: classification. Classify the item using only the allowed taxonomy and decision rules. Do not invent a label when the evidence is insufficient. Output requirement: Return one JSON object with label, confidence, rationale, matched_rules, and missing_information. Specific use case: Help cross-industry teams classify input with an explicit rationale for supplied material centered on question, classify, knowledge, chatbot; preserve evidence and mark missing information.\nFollow the goal precisely, state material uncertainty, and return a focused result."
            - id: generated-user
              role: user
              text: "Item to classify:\n{{#start_1.item_to_classify#}}\n\nAllowed taxonomy:\n{{#start_1.taxonomy#}}\n\nDecision rules:\n{{#start_1.decision_rules#}}"
          selected: false
          vision:
            enabled: false
            configs:
              variable_selector: []
        height: 120
        position: {x: 334, y: 220}
        positionAbsolute: {x: 334, y: 220}
        selected: false
        sourcePosition: right
        targetPosition: left
        type: custom
        width: 244
      - id: end_1
        data:
          desc: ""
          type: end
          title: End
          outputs:
            - variable: "classification_result"
              value_selector: [llm_1, text]
              value_type: string
          selected: false
        height: 90
        position: {x: 638, y: 220}
        positionAbsolute: {x: 638, y: 220}
        selected: false
        sourcePosition: right
        targetPosition: left
        type: custom
        width: 244
    edges:
      - data:
          isInIteration: false
          isInLoop: false
          sourceType: start
          targetType: llm
        id: start_1-source-llm_1-target
        source: start_1
        target: llm_1
        sourceHandle: source
        targetHandle: target
        type: custom
        zIndex: 0
      - data:
          isInIteration: false
          isInLoop: false
          sourceType: llm
          targetType: end
        id: llm_1-source-end_1-target
        source: llm_1
        target: end_1
        sourceHandle: source
        targetHandle: target
        type: custom
        zIndex: 0
    viewport:
      x: 0
      y: 0
      zoom: 0.7
