app:
  description: 翻译 GPT 的提示词更新和优化
  icon: 🤖
  icon_background: '#FFEAD5'
  mode: workflow
  name: 宝玉的英译中优化版
kind: app
version: 0.1.0
workflow:
  environment_variables: []
  features:
    file_upload:
      image:
        enabled: false
        number_limits: 3
        transfer_methods:
        - local_file
        - remote_url
    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:
        isInIteration: false
        sourceType: start
        targetType: llm
      id: 1722490886911-source-1722490889313-target
      source: '1722490886911'
      sourceHandle: source
      target: '1722490889313'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: end
      id: 1722490889313-source-1722490913713-target
      source: '1722490889313'
      sourceHandle: source
      target: '1722490913713'
      targetHandle: target
      type: custom
      zIndex: 0
    nodes:
    - data:
        desc: ''
        selected: false
        title: 开始
        type: start
        variables:
        - label: content
          max_length: 50000
          options: []
          required: true
          type: paragraph
          variable: content
      height: 90
      id: '1722490886911'
      position:
        x: 80
        y: 282
      positionAbsolute:
        x: 80
        y: 282
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        model:
          completion_params:
            temperature: 1.1
          mode: chat
          name: deepseek-chat
          provider: deepseek
        prompt_template:
        - id: ce2408e0-ce41-490f-a9ac-dd7e43b23344
          role: system
          text: 'You are a highly skilled translator tasked with translating various
            types of content from other languages into Chinese. Follow these instructions
            carefully to complete the translation task:


            ## Input


            Depending on the type of input, follow these specific instructions:


            1. If the input is a URL or a request to translate a URL:

            First, request the built-in Action to retrieve the URL content. Once you
            have the content, proceed with the three-step translation process.


            2. If the input is an image or PDF:

            Get the content from image (by OCR) or PDF, and proceed with the three-step
            translation process.


            3. Otherwise, proceed directly to the three-step translation process.


            ## Strategy


            You will follow a three-step translation process:

            1. Translate the input content into Chinese, respecting the original intent,
            keeping the original paragraph and text format unchanged, not deleting
            or omitting any content, including preserving all original Markdown elements
            like images, code blocks, etc.

            2. Carefully read the source text and the translation, and then give constructive
            criticism and helpful suggestions to improve the translation. The final
            style and tone of the translation should match the style of 简体中文 colloquially
            spoken in China. When writing suggestions, pay attention to whether there
            are ways to improve the translation''s

            (i) accuracy (by correcting errors of addition, mistranslation, omission,
            or untranslated text),

            (ii) fluency (by applying Chinese grammar, spelling and punctuation rules,
            and ensuring there are no unnecessary repetitions),

            (iii) style (by ensuring the translations reflect the style of the source
            text and take into account any cultural context),

            (iv) terminology (by ensuring terminology use is consistent and reflects
            the source text domain; and by only ensuring you use equivalent idioms
            Chinese).

            3. Based on the results of steps 1 and 2, refine and polish the translation


            ## Glossary


            Here is a glossary of technical terms to use consistently in your translations:


            - AGI -> 通用人工智能

            - LLM/Large Language Model -> 大语言模型

            - Transformer -> Transformer

            - Token -> Token

            - Generative AI -> 生成式 AI

            - AI Agent -> AI 智能体

            - prompt -> 提示词

            - zero-shot -> 零样本学习

            - few-shot -> 少样本学习

            - multi-modal -> 多模态

            - fine-tuning -> 微调



            ## Output


            For each step of the translation process, output your results within the
            appropriate XML tags:


            <step1_initial_translation>

            [Insert your initial translation here]

            </step1_initial_translation>


            <step2_reflection>

            [Insert your reflection on the translation, write a list of specific,
            helpful and constructive suggestions for improving the translation. Each
            suggestion should address one specific part of the translation.]

            </step2_reflection>


            <step3_refined_translation>

            [Insert your refined and polished translation here]

            </step3_refined_translation>


            Remember to consistently use the provided glossary for technical terms
            throughout your translation. Ensure that your final translation in step
            3 accurately reflects the original meaning while sounding natural in Chinese.'
        - role: user
          text: '{{#1722490886911.content#}}'
        selected: false
        title: LLM
        type: llm
        variables: []
        vision:
          enabled: false
      height: 98
      id: '1722490889313'
      position:
        x: 384
        y: 282
      positionAbsolute:
        x: 384
        y: 282
      selected: true
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        desc: ''
        outputs:
        - value_selector:
          - '1722490889313'
          - text
          variable: output
        selected: false
        title: 结束
        type: end
      height: 90
      id: '1722490913713'
      position:
        x: 688
        y: 282
      positionAbsolute:
        x: 688
        y: 282
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    viewport:
      x: 226
      y: 108
      zoom: 1
