app:
  description: 本工作流主要是用到了知识检索组件+知识库实现私有化知识库检索功能
  icon: 🤖
  icon_background: '#FFEAD5'
  mode: advanced-chat
  name: 知识库检索工作流
  use_icon_as_answer_icon: false
kind: app
version: 0.1.5
workflow:
  conversation_variables: []
  environment_variables: []
  features:
    file_upload:
      allowed_file_extensions:
      - .JPG
      - .JPEG
      - .PNG
      - .GIF
      - .WEBP
      - .SVG
      allowed_file_types:
      - image
      allowed_file_upload_methods:
      - local_file
      - remote_url
      enabled: false
      fileUploadConfig:
        audio_file_size_limit: 50
        batch_count_limit: 5
        file_size_limit: 15
        image_file_size_limit: 10
        video_file_size_limit: 100
        workflow_file_upload_limit: 10
      image:
        enabled: false
        number_limits: 3
        transfer_methods:
        - local_file
        - remote_url
      number_limits: 3
    opening_statement: ''
    retriever_resource:
      enabled: true
    sensitive_word_avoidance:
      enabled: false
    speech_to_text:
      enabled: false
    suggested_questions: []
    suggested_questions_after_answer:
      enabled: false
    text_to_speech:
      enabled: false
      language: ''
      voice: ''
  graph:
    edges:
    - data:
        sourceType: llm
        targetType: answer
      id: llm-answer
      source: llm
      sourceHandle: source
      target: answer
      targetHandle: target
      type: custom
    - data:
        isInIteration: false
        sourceType: start
        targetType: knowledge-retrieval
      id: 1741011655068-source-1741011662463-target
      source: '1741011655068'
      sourceHandle: source
      target: '1741011662463'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: knowledge-retrieval
        targetType: llm
      id: 1741011662463-source-llm-target
      source: '1741011662463'
      sourceHandle: source
      target: llm
      targetHandle: target
      type: custom
      zIndex: 0
    nodes:
    - data:
        desc: ''
        selected: false
        title: 开始
        type: start
        variables: []
      height: 52
      id: '1741011655068'
      position:
        x: -191
        y: 263
      positionAbsolute:
        x: -191
        y: 263
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 242
    - data:
        context:
          enabled: true
          variable_selector:
          - '1741011662463'
          - result
        desc: ''
        memory:
          query_prompt_template: '{{#sys.query#}}'
          role_prefix:
            assistant: ''
            user: ''
          window:
            enabled: false
            size: 10
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: internlm/internlm2_5-7b-chat
          provider: siliconflow
        prompt_template:
        - id: ee1d7987-4534-40ac-ba95-acb929d54559
          role: system
          text: 请根据文本内容{{#context#}}回答
        selected: false
        title: LLM
        type: llm
        variables: []
        vision:
          enabled: false
      height: 96
      id: llm
      position:
        x: 382.09148099252593
        y: 263
      positionAbsolute:
        x: 382.09148099252593
        y: 263
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 242
    - data:
        answer: '{{#llm.text#}}'
        desc: ''
        selected: false
        title: 直接回复
        type: answer
        variables: []
      height: 102
      id: answer
      position:
        x: 690.637221488789
        y: 263
      positionAbsolute:
        x: 690.637221488789
        y: 263
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 242
    - data:
        dataset_ids:
        - 51b9628b-0be9-4096-b77f-e6f5d0b8728c
        desc: ''
        multiple_retrieval_config:
          reranking_enable: true
          reranking_mode: reranking_model
          reranking_model:
            model: netease-youdao/bce-reranker-base_v1
            provider: siliconflow
          top_k: 4
        query_variable_selector:
        - '1741011655068'
        - sys.query
        retrieval_mode: multiple
        selected: false
        title: 知识检索
        type: knowledge-retrieval
      height: 90
      id: '1741011662463'
      position:
        x: 91
        y: 263
      positionAbsolute:
        x: 91
        y: 263
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 242
    - data:
        author: 周辉
        desc: ''
        height: 134
        selected: false
        showAuthor: true
        text: '{"root":{"children":[{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"本工作流主要是实现了一个非常简单的知识库检索的工作流。用到了知识检索和LLM大语言模型。","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":0}],"direction":"ltr","format":"","indent":0,"type":"root","version":1}}'
        theme: blue
        title: ''
        type: ''
        width: 434
      height: 134
      id: '1741016688282'
      position:
        x: -203.1114017200174
        y: 346.54053777085
      positionAbsolute:
        x: -203.1114017200174
        y: 346.54053777085
      selected: true
      sourcePosition: right
      targetPosition: left
      type: custom-note
      width: 434
    viewport:
      x: 440.0745507905722
      y: 124.4394606281229
      zoom: 1.014524010738462
