-
Notifications
You must be signed in to change notification settings - Fork 361
Expand file tree
/
Copy pathanalyze_article_flow_en.yml
More file actions
1246 lines (1245 loc) · 61.5 KB
/
Copy pathanalyze_article_flow_en.yml
File metadata and controls
1246 lines (1245 loc) · 61.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
app:
description: Use LLMs to summarize article, extract keywords, main points, and key
quotes.
icon: sparkle
icon_background: '#D3F8DF'
mode: workflow
name: BestBlogs Article Analysis Workflow
workflow:
features:
file_upload:
image:
enabled: false
number_limits: 3
transfer_methods:
- local_file
- remote_url
opening_statement: ''
retriever_resource:
enabled: false
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: code
targetType: iteration
id: 1718353568276-source-1718354838381-target
source: '1718353568276'
sourceHandle: source
target: '1718354838381'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
sourceType: iteration
targetType: template-transform
id: 1718354838381-source-1718355718469-target
source: '1718354838381'
sourceHandle: source
target: '1718355718469'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
sourceType: template-transform
targetType: llm
id: 1718355718469-source-1718355814693-target
source: '1718355718469'
sourceHandle: source
target: '1718355814693'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
sourceType: start
targetType: http-request
id: 1718352852007-source-1719356422842-target
source: '1718352852007'
sourceHandle: source
target: '1719356422842'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
sourceType: http-request
targetType: code
id: 1719356422842-source-1719357159255-target
source: '1719356422842'
sourceHandle: source
target: '1719357159255'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
sourceType: llm
targetType: llm
id: 1719381882148-source-1719444170368-target
source: '1719381882148'
sourceHandle: source
target: '1719444170368'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
sourceType: llm
targetType: llm
id: 1719647683007-source-1719650938792-target
source: '1719647683007'
sourceHandle: source
target: '1719650938792'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
sourceType: llm
targetType: llm
id: 1719650938792-source-1719381882148-target
source: '1719650938792'
sourceHandle: source
target: '1719381882148'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
sourceType: llm
targetType: end
id: 1719444170368-source-1718356146046-target
source: '1719444170368'
sourceHandle: source
target: '1718356146046'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
sourceType: code
targetType: if-else
id: 1719357159255-source-1719660246354-target
source: '1719357159255'
sourceHandle: source
target: '1719660246354'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
sourceType: llm
targetType: variable-aggregator
id: 1719660406112-source-1720093031703-target
source: '1719660406112'
sourceHandle: source
target: '1720093031703'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
sourceType: llm
targetType: variable-aggregator
id: 1718355814693-source-1720093031703-target
source: '1718355814693'
sourceHandle: source
target: '1720093031703'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
sourceType: variable-aggregator
targetType: llm
id: 1720093031703-source-1719647683007-target
source: '1720093031703'
sourceHandle: source
target: '1719647683007'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
sourceType: if-else
targetType: code
id: 1719660246354-false-1718353568276-target
source: '1719660246354'
sourceHandle: 'false'
target: '1718353568276'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
sourceType: if-else
targetType: llm
id: 1719660246354-true-1719660406112-target
source: '1719660246354'
sourceHandle: 'true'
target: '1719660406112'
targetHandle: target
type: custom
zIndex: 0
nodes:
- data:
desc: Input article ID.
selected: false
title: Start
type: start
variables:
- label: Article ID
max_length: 20
options: []
required: true
type: text-input
variable: input_article_id
height: 120
id: '1718352852007'
position:
x: 981.6617142857144
y: -314.3451428571427
positionAbsolute:
x: 981.6617142857144
y: -314.3451428571427
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
code: "import re\n\ndef main(markdown_text: str) -> dict:\n \"\"\"\n \
\ \u5C06 Markdown \u6587\u672C\u5212\u5206\u4E3A\u6BB5\u843D\uFF0C\u5E76\
\u5408\u5E76\u8F83\u5C0F\u7684\u6BB5\u843D\u4F7F\u5176\u957F\u5EA6\u4E0D\
\u8D85\u8FC7 3000 \u4E2A\u5B57\u7B26\u3002\n\n \u53C2\u6570\uFF1A\n \
\ markdown_text (str): Markdown\u683C\u5F0F\u7684\u6587\u672C\u3002\
\n\n \u8FD4\u56DE\uFF1A\n Dict[str, List[str]]: \u5305\u542B\u6BB5\
\u843D\u5217\u8868\u7684\u5B57\u5178\uFF0C\u6BCF\u4E2A\u6BB5\u843D\u4F5C\
\u4E3A\u5217\u8868\u4E2D\u7684\u4E00\u9879\uFF0C\u957F\u5EA6\u4E0D\u8D85\
\u8FC7 3000 \u4E2A\u5B57\u7B26\u3002\n \"\"\"\n max_length = 3000\n\
\n # \u9884\u5904\u7406\uFF1A\u79FB\u9664YAML\u524D\u7F6E\u5143\u6570\
\u636E\uFF08\u5982\u679C\u5B58\u5728\uFF09\n markdown_text = re.sub(r'^---\\\
n.*?\\n---\\n', '', markdown_text, flags=re.DOTALL)\n\n # \u521D\u6B65\
\u6309\u6362\u884C\u5206\u9694\uFF0C\u4FDD\u7559\u7A7A\u884C\n initial_paragraphs\
\ = markdown_text.split('\\n')\n \n paragraphs = []\n current_paragraph\
\ = \"\"\n in_code_block = False\n \n for line in initial_paragraphs:\n\
\ stripped_line = line.strip()\n \n # \u5904\u7406\u4EE3\
\u7801\u5757\n if stripped_line.startswith('```'):\n in_code_block\
\ = not in_code_block\n if current_paragraph:\n \
\ paragraphs.append(current_paragraph)\n current_paragraph\
\ = \"\"\n paragraphs.append(line)\n continue\n \
\ \n if in_code_block:\n paragraphs.append(line)\n\
\ continue\n \n # \u5904\u7406\u6807\u9898\u3001\
\u5F15\u7528\u3001\u5217\u8868\u7B49\n if (stripped_line.startswith(('#',\
\ '>', '-', '*', '+')) or \n re.match(r'^\\d+\\.', stripped_line)\
\ or\n stripped_line.startswith('|') or # \u8868\u683C\n \
\ stripped_line == '---' or # \u6C34\u5E73\u7EBF\n re.match(r'^\\\
[.*\\]:.*', stripped_line)): # \u94FE\u63A5\u5F15\u7528\n if\
\ current_paragraph:\n paragraphs.append(current_paragraph)\n\
\ current_paragraph = \"\"\n paragraphs.append(line)\n\
\ elif stripped_line == \"\":\n if current_paragraph:\n\
\ paragraphs.append(current_paragraph)\n current_paragraph\
\ = \"\"\n else:\n if current_paragraph:\n \
\ current_paragraph += \" \" + stripped_line\n else:\n \
\ current_paragraph = stripped_line\n \n if current_paragraph:\n\
\ paragraphs.append(current_paragraph)\n \n # \u5408\u5E76\u6BB5\
\u843D\u4F7F\u5176\u957F\u5EA6\u4E0D\u8D85\u8FC7max_length\n merged_paragraphs\
\ = []\n current_paragraph = \"\"\n\n for para in paragraphs:\n \
\ if len(current_paragraph) + len(para) + 2 <= max_length: # +2 for\
\ potential '\\n\\n'\n if current_paragraph:\n \
\ current_paragraph += \"\\n\\n\" + para\n else:\n \
\ current_paragraph = para\n else:\n if current_paragraph:\n\
\ merged_paragraphs.append(current_paragraph)\n \
\ if len(para) > max_length:\n # \u5982\u679C\u5355\u4E2A\
\u6BB5\u843D\u8D85\u8FC7\u6700\u5927\u957F\u5EA6\uFF0C\u8FDB\u884C\u5206\
\u5272\n words = para.split()\n temp_para\
\ = \"\"\n for word in words:\n if len(temp_para)\
\ + len(word) + 1 <= max_length:\n temp_para += \"\
\ \" + word if temp_para else word\n else:\n \
\ merged_paragraphs.append(temp_para)\n \
\ temp_para = word\n if temp_para:\n \
\ merged_paragraphs.append(temp_para)\n else:\n \
\ current_paragraph = para\n\n if current_paragraph:\n \
\ merged_paragraphs.append(current_paragraph)\n\n return {\n \"\
paragraphs\": merged_paragraphs,\n \"totalParagraphCount\": len(merged_paragraphs)\n\
\ }"
code_language: python3
desc: Divide the article into segments, each containing no more than 3,000
characters.
outputs:
paragraphs:
children: null
type: array[string]
totalParagraphCount:
children: null
type: number
selected: false
title: Article Segmentation
type: code
variables:
- value_selector:
- '1719357159255'
- markdown
variable: markdown_text
height: 120
id: '1718353568276'
position:
x: 1246
y: 495
positionAbsolute:
x: 1246
y: 495
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
desc: Analyze the content of each segment in succession.
height: 269
iterator_selector:
- '1718353568276'
- paragraphs
output_selector:
- '1718354999060'
- text
output_type: array[string]
selected: false
startNodeType: llm
start_node_id: '1718354999060'
title: Sequential Segment Analysis
type: iteration
width: 376
height: 269
id: '1718354838381'
position:
x: 1550
y: 495
positionAbsolute:
x: 1550
y: 495
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 376
zIndex: 1
- data:
context:
enabled: true
variable_selector:
- '1718354838381'
- item
desc: Summarize each paragraph, provide an abstract, list main points, and
extract key terms.
isInIteration: true
isIterationStart: true
iteration_id: '1718354838381'
model:
completion_params:
temperature: 0.5
mode: chat
name: deepseek-chat
provider: deepseek
prompt_template:
- id: 982fdfa5-0a05-4858-b89e-d9bf8205a4d2
role: system
text: "# Article Paragraph Analysis Assistant\n\n## Input Format\nYou will\
\ receive an XML-formatted paragraph from an article, including elements\
\ such as title, source, URL, and content. The paragraph content will\
\ be enclosed in a CDATA section.\n\n## Objective\nAnalyze the given XML-formatted\
\ paragraph, extracting core content, main points, potential key quotes,\
\ and relevant tags. This analysis will prepare for subsequent full-text\
\ summarization and review steps. Focus primarily on large language models,\
\ AIGC, AI applications, AI development technologies and frameworks (e.g.,\
\ prompts, RAG, WorkFlow, Agent, LangChain, Dify). Secondary focus includes\
\ development, product, design, impact, business, entrepreneurship, and\
\ related topics. Output in {{#1719357159255.languageName#}}.\n\n## Output\
\ Format\nUse {{#1719357159255.languageName#}} to output the analysis\
\ results in the following Markdown format:\n\n```markdown\n### Core Content\n\
[Concisely summarize the paragraph's core content in 50-80 words]\n\n\
### Main Points (2-3)\n- [Point 1]\n- [Point 2]\n- [Point 3] (if applicable)\n\
\n### Key Quotes (2-3)\n> [Quote 1]\n> [Quote 2]\n> [Quote 3] (if applicable)\n\
\n### Tags (2-4)\n[Tag 1], [Tag 2], [Tag 3], [Tag 4]\n```\n\n## Guidelines\n\
1. Thoroughly analyze all XML information, including title, source, and\
\ URL, as these may provide crucial context.\n\n2. Keep the core content\
\ concise (50-80 words), highlighting key information.\n\n3. Ensure main\
\ points comprehensively cover all important content without omitting\
\ crucial information.\n\n4. Select key quotes that best represent the\
\ paragraph's core ideas or offer the most insight. Choose sentences that\
\ are both self-contained and summarize central concepts.\n\n5. Tag selection:\n\
\ - Choose 2-4 most relevant tags from these categories: topic, technology/field,\
\ application/product, company/platform/person, and trend.\n - Prioritize\
\ tags reflecting unique content, avoiding overly broad descriptors.\n\
\ - Tags should capture main topics, technologies/fields, applications/products,\
\ mentioned entities, and apparent trends.\n - Select tags that effectively\
\ categorize and filter articles, not just keywords.\n\n6. Maintain an\
\ objective, professional tone, avoiding colloquialisms or emotional language.\n\
\n7. Ensure the analysis accurately reflects the paragraph content without\
\ speculation.\n\n8. Match the output language to the original text. For\
\ Chinese output, add spaces between Chinese characters and English words,\
\ numbers, or symbols."
- id: 24d97f72-bbd2-4d77-ab03-90368accf732
role: user
text: "Please analyze this content according to the steps and principles\
\ outlined in the system prompt, and output the specified format of analysis\
\ results using {{#1719357159255.languageName#}}.\n\n<article>\n <title>{{#1719357159255.title#}}</title>\n\
\n <source>{{#1719357159255.sourceName#}}</source>\n\n <url>{{#1719357159255.url#}}</url>\n\
\n <paragraph>\n <index>{{#1718354838381.index#}}</index>\n\n <content>\n\
\ <![CDATA[\n {{#1718354838381.item#}}\n\n ]]>\n </content>\n\
\ </paragraph>\n</article>"
selected: false
title: Paragraph Analysis
type: llm
variables: []
vision:
enabled: false
extent: parent
height: 164
id: '1718354999060'
parentId: '1718354838381'
position:
x: 117
y: 85
positionAbsolute:
x: 1667
y: 580
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
zIndex: 1001
- data:
desc: Merge the analysis results from all segments into a cohesive whole.
selected: false
template: '{{ articleSections | join("\n") }}'
title: Merge Analysis Results
type: template-transform
variables:
- value_selector:
- '1718354838381'
- output
variable: articleSections
height: 102
id: '1718355718469'
position:
x: 1986
y: 495
positionAbsolute:
x: 1986
y: 495
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
context:
enabled: true
variable_selector:
- '1718355718469'
- output
desc: Use a large language model to perform a comprehensive analysis of the
segmented results.
model:
completion_params:
temperature: 0.7
mode: chat
name: deepseek-chat
provider: deepseek
prompt_template:
- id: 2e9ab6fb-4504-4891-95a1-39dff0e8ed6d
role: system
text: "# Expert Technical Article Analyzer\n\nYou are a professional technical\
\ article analyzer. Your task is to analyze given article metadata and\
\ segmented analysis results, providing an overall summary of the text.\
\ The analysis targets developers, product managers, and technical personnel,\
\ helping them quickly grasp the article's core content, technical points,\
\ and practical value. Focus primarily on AI-related fields (e.g., large\
\ models, AIGC, AI applications, development technologies, and frameworks),\
\ but also cover other technical domains as appropriate.\n\n## Analysis\
\ Guidelines\n\n1. Review all information thoroughly. Identify the article's\
\ background, key points, arguments, data, and conclusions. Highlight\
\ innovative viewpoints and practical applications.\n\n2. Structure information\
\ logically. Use concise, professional language to express core content.\
\ Maintain objectivity while emphasizing insightful or innovative aspects.\n\
\n3. Ensure accurate use of technical terms. Balance professional depth\
\ with readability.\n\n4. Merge and deduplicate tags. Select 3-10 most\
\ representative ones. Order them by: topic, technology/field, application/product,\
\ company/platform/notable figures, and trends.\n\n5. Prioritize main\
\ points and key quotes by importance. Select 3-5 most crucial items for\
\ each category.\n\n6. Match the output language to the original text.\
\ For Chinese, add spaces between Chinese and English text or numbers.\
\ Maintain logical coherence across all sections.\n\n## Input Format\n\
\nXML format containing article metadata and segmented analysis results.\n\
\n## Output Format\n\nUse the specified language and adhere to the following\
\ Markdown format:\n\n```markdown\n### One-Sentence Summary\n[Core content\
\ and main conclusions]\n\n### Article Tags (3-10)\n[Key tags, ordered\
\ by importance]\n\n### Abstract\n[Comprehensive overview including background,\
\ approach, details, data, core content, and insights]\n\n### Main Points\n\
1. **[Point 1]**\n - [Explanation]\n2. **[Point 2]**\n - [Explanation]\n\
3. **[Point 3]**\n - [Explanation]\n[Up to 5 points]\n\n### Key Quotes\n\
1. \"[Quote 1]\"\n - Importance: [Explanation]\n2. \"[Quote 2]\"\n \
\ - Importance: [Explanation]\n3. \"[Quote 3]\"\n - Importance: [Explanation]\n\
[Up to 5 quotes]"
- id: cde18505-a2fe-45a5-a765-40dbe1c10c0f
role: user
text: "Based on the provided article metadata and segmented analysis results,\
\ please conduct a comprehensive analysis of the entire article following\
\ the steps and principles outlined in the system prompt. Output the analysis\
\ results in the specified format using {{#1719357159255.languageName#}}.\n\
\n<article>\n <metadata>\n <title>{{#1719357159255.title#}}</title>\n\
\ <source>{{#1719357159255.sourceName#}}</source>\n <url>{{#1719357159255.url#}}</url>\n\
\ </metadata>\n <analysis>\n <![CDATA[\n {{#1718355718469.output#}}\n\
\ ]]>\n </analysis>\n</article>"
selected: false
title: Comprehensive Analysis
type: llm
variables: []
vision:
enabled: false
height: 164
id: '1718355814693'
position:
x: 2290
y: 495
positionAbsolute:
x: 2290
y: 495
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
desc: Output the JSON result.
outputs:
- value_selector:
- '1719444170368'
- text
variable: analysisResult
selected: false
title: End
type: end
height: 120
id: '1718356146046'
position:
x: 3251.1519999999996
y: -379.5154285714284
positionAbsolute:
x: 3251.1519999999996
y: -379.5154285714284
selected: true
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
authorization:
config: null
type: no-auth
body:
data: ''
type: none
desc: Call HTTP API to fetch article content.
headers: ''
method: get
params: 'id:{{#1718352852007.input_article_id#}}
language:en'
selected: false
timeout:
max_connect_timeout: 0
max_read_timeout: 0
max_write_timeout: 0
title: Retrieve Article Information
type: http-request
url: https://api.bestblogs.dev/api/resource/markdown
variables: []
height: 154
id: '1719356422842'
position:
x: 981.6617142857144
y: -132.49371428571422
positionAbsolute:
x: 981.6617142857144
y: -132.49371428571422
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
code: "import json\n\ndef main(json_body):\n \"\"\"\n \u5904\u7406 REST\
\ \u8BF7\u6C42\u8FD4\u56DE\u7684 JSON \u5B57\u7B26\u4E32\u3002\n \n \
\ \u82E5\u8F93\u5165\u4E3A\u7A7A\u5B57\u7B26\u4E32\u6216JSON\u89E3\u6790\
\u5931\u8D25\uFF0C\u5219\u8FD4\u56DE {'success': 'false'}\u3002\n \u82E5\
\ JSON \u5B57\u7B26\u4E32\u89E3\u6790\u6210\u529F\u4E14 'success' \u4E3A\
\ 'true'\uFF0C\u5219\u8FD4\u56DE\u5305\u542B\u6307\u5B9A\u952E\u503C\u7684\
\u5B57\u5178\u3002\n \u5426\u5219\u8FD4\u56DE {'success': 'false'}\u3002\
\n\n \u53C2\u6570:\n json_body (str): \u5305\u542B JSON \u6570\
\u636E\u7684\u5B57\u7B26\u4E32\u3002\n \n \u8FD4\u56DE:\n dict:\
\ \u5305\u542B 'success' \u952E\u548C\u6307\u5B9A\u7684\u6570\u636E\u952E\
\u503C\u5BF9\u7684\u5B57\u5178\u3002\n \"\"\"\n \n result = {'success':\
\ 'false'}\n \n if not json_body:\n return result\n\n try:\n\
\ data = json.loads(json_body)\n if isinstance(data, dict)\
\ and data.get('success') == 'true':\n result['success'] = 'true'\n\
\ result['markdown'] = data.get('markdown', '')\n \
\ result['sourceName'] = data.get('sourceName', '')\n result['languageName']\
\ = data.get('languageName', '\u4E2D\u6587')\n result['title']\
\ = data.get('title', '')\n result['url'] = data.get('url', '')\n\
\ result['wordCount'] = data.get('wordCount', 100)\n return\
\ result\n except json.JSONDecodeError:\n return result\n except\
\ Exception:\n return result"
code_language: python3
desc: Parse response and extract article content.
outputs:
languageName:
children: null
type: string
markdown:
children: null
type: string
sourceName:
children: null
type: string
success:
children: null
type: string
title:
children: null
type: string
url:
children: null
type: string
wordCount:
children: null
type: number
selected: false
title: Parse Article Information
type: code
variables:
- value_selector:
- '1719356422842'
- body
variable: json_body
height: 102
id: '1719357159255'
position:
x: 981.6617142857144
y: 88.19657142857142
positionAbsolute:
x: 981.6617142857144
y: 88.19657142857142
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
context:
enabled: false
variable_selector: []
desc: Examine the analysis results, focusing on accuracy, contextual understanding,
key point identification, language expression, and logical coherence.
model:
completion_params:
temperature: 0.7
mode: chat
name: deepseek-chat
provider: deepseek
prompt_template:
- id: 38022a40-3101-4709-9a69-57ddef9e086a
role: system
text: "# Technical Article Analysis Review Guidelines\n\n## Background and\
\ Objectives\nAs a senior technical content reviewer, your task is to\
\ evaluate preliminary analysis results of technical articles. Ensure\
\ the analysis accurately reflects the original content and provide recommendations\
\ to enhance its quality, insight, and practical value.\n\n## Input Format\n\
XML format containing:\n1. <metadata>: Article title, source, and URL\n\
2. <content>: Full Markdown content of the original article\n3. <previousAnalysisResult>:\
\ Initial analysis including one-sentence summary, abstract, main points,\
\ and key quotes\n4. <previousDomainAndTagResult>: Domain identification\
\ and generated tags\n5. <previousScoringResult>: Standardized article\
\ score\n\n## Review Process and Focus Areas\n\n1. One-Sentence Summary\n\
\ - Assess accuracy in capturing core content\n - Evaluate conciseness\
\ and completeness\n\n2. Abstract\n - Check comprehensive coverage of\
\ article content\n - Ensure inclusion of key elements: background,\
\ topic, challenges, approach, solutions, implementation, outcomes\n \
\ - Verify highlight of key conclusions and innovations\n - Evaluate\
\ logical structure and flow\n\n3. Main Points and Key Quotes\n - Verify\
\ accurate reflection of core arguments\n - Assess coverage of critical\
\ content and insights\n - Evaluate relevance and impact of selected\
\ quotes\n - Review logical ordering of points\n\n4. Domain Identification\
\ and Tags\n - Evaluate accuracy of domain classification\n - Check\
\ tag coverage: topics, technologies, applications, companies, trends\n\
\ - Assess relevance and completeness of tags\n - Pay special attention\
\ to AI-related tags\n - Identify any irrelevant or misleading tags\n\
\ - Review handling of cross-domain content\n\n5. Scoring\n - Assess\
\ comprehensiveness of scoring dimensions\n - Evaluate justification\
\ for each dimension score\n - Review appropriateness of bonuses and\
\ deductions\n - Ensure final score reflects overall article quality\n\
\ - Check consistency between score and other analysis sections\n\n\
6. Overall Consistency\n - Ensure alignment across all analysis components\n\
\ - Identify any contradictions or inconsistencies\n - Evaluate how\
\ well the analysis represents the original content\n\n## Output Format\n\
\n```markdown\n### One-Sentence Summary\n- Assessment: [Brief quality\
\ evaluation]\n- Improvement Suggestions: [1-3 specific recommendations]\n\
\n### Abstract\n- Assessment: [Brief quality evaluation]\n- Improvement\
\ Suggestions: [1-3 specific recommendations]\n\n### Main Points and Key\
\ Quotes\n- Assessment: [Brief quality evaluation]\n- Improvement Suggestions:\
\ [1-3 specific recommendations]\n\n### Domain Identification and Tags\n\
- Assessment: [Brief quality evaluation]\n- Improvement Suggestions: [1-3\
\ specific recommendations]\n\n### Scoring\n- Assessment: [Brief quality\
\ evaluation]\n- Adjustment Suggestions: [1-3 specific recommendations]\n\
\n### Overall Consistency\n- Assessment: [Brief evaluation of inter-section\
\ consistency]\n- Improvement Suggestions: [1-3 specific recommendations]\n\
\n### Overall Evaluation\n- Strengths: [1-3 points]\n- Areas for Improvement:\
\ [1-3 points]\n- Key Recommendations: [1-3 critical suggestions]\n```\n\
\n## Important Notes\n- Focus on the quality of the analysis, not the\
\ original article\n- Thoroughly review both the original content and\
\ all analysis components\n- Maintain objectivity and professionalism\n\
- Provide specific, actionable improvement suggestions\n- Consider the\
\ value for various audiences (e.g., decision-makers, researchers, general\
\ readers)\n- Pay extra attention to AI-related content analysis\n- Address\
\ specific needs of cross-domain content\n- Align review comments with\
\ the original text's style and target audience\n- Consider feasibility\
\ and potential impact of suggested improvements\n- Balance thoroughness\
\ with conciseness in your review"
- id: f42b8839-8a0b-45a6-a0f5-71db57e573ae
role: user
text: "Based on the XML input below, please conduct a comprehensive review\
\ and reflection on the original article and the previous analysis results.\
\ Provide the results according to the steps, principles, and output format\
\ specified in the system prompt.\n\n<article>\n <metadata>\n <title>{{#1719357159255.title#}}</title>\n\
\ <source>{{#1719357159255.sourceName#}}</source>\n <url>{{#1719357159255.url#}}</url>\n\
\ </metadata>\n <previousAnalysisResult>\n <![CDATA[\n {{#1720093031703.output#}}\n\
\ ]]>\n </previousAnalysisResult>\n <previousDomainAndTagResult>\n\
\ <![CDATA[\n {{#1719647683007.text#}}\n ]]>\n </previousDomainAndTagResult>\n\
\ <previousScoringResult>\n <![CDATA[\n {{#1719650938792.text#}}\n\
\ ]]>\n </previousScoringResult>\n</article>"
selected: false
title: Review and Reflection
type: llm
variables: []
vision:
enabled: false
height: 200
id: '1719381882148'
position:
x: 2907.042285714286
y: -165.40799999999993
positionAbsolute:
x: 2907.042285714286
y: -165.40799999999993
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
context:
enabled: false
variable_selector: []
desc: Optimize and improve the analysis based on the insights from the review
and reflection process.
model:
completion_params:
temperature: 0.7
mode: chat
name: gemini-1.5-pro-latest
provider: google
prompt_template:
- id: a3799a74-b248-4202-a6ee-134857c2d020
role: system
text: "# Final Optimization Steps for Article Analysis\n\nAs an expert in\
\ technical article review and prompt engineering, your task is to perform\
\ the final optimization on the preliminary analysis results of technical\
\ articles. This is the last processing node in the entire analysis workflow,\
\ and the quality of its output directly affects the effectiveness of\
\ the entire system.\n\n## Input Format\nThe input will be provided in\
\ XML format, containing the following sections:\n- `<metadata>`: Article\
\ metadata, including title, source, and URL\n- `<content>`: Full content\
\ of the article\n- `<previousAnalysisResult>`: Previous analysis results,\
\ including one-sentence summary, abstract, main points, and key quotes\n\
- `<previousDomainAndTagResult>`: Previous domain and tag analysis results,\
\ including the aiSubcategory value for AI-related articles\n- `<previousScoringResult>`:\
\ Previous scoring results\n- `<reflectionFeedback>`: Feedback from the\
\ review and reflection process\n\n## Analysis Guidelines and Considerations\n\
1. Carefully review all input content, identify and prioritize key aspects\
\ that need improvement.\n\n2. Retain all crucial information; avoid oversimplification\
\ or arbitrary modification of previously outputted content. The optimization\
\ goal is to improve readability while maintaining information integrity.\n\
\n3. Ensure the analysis results have practical value for software developers,\
\ product managers, and technical leaders, maintaining consistency across\
\ all sections.\n\n4. Reflect current technology trends, staying sensitive\
\ to the latest developments. Balance technical depth with readability,\
\ making the analysis both professional and accessible.\n\n5. Consider\
\ importance, innovation, and industry impact when selecting and ordering\
\ content. Provide actionable insights that inspire readers to think and\
\ act.\n\n6. The output language should match the original article. For\
\ mixed Chinese-English articles, prioritize Chinese, retaining necessary\
\ English terms with spaces between Chinese and English text.\n\n7. Only\
\ update fields when there's sufficient reason. All updates must provide\
\ a detailed updateReason explanation.\n\n## Output Format and Field Descriptions\n\
Please output the optimized analysis results in JSON format using JavaScript,\
\ including the following fields:\n\n```json\n{\n \"oneSentenceSummary\"\
: \"A concise one-sentence summary that accurately captures the article's\
\ core content\",\n \"oneSentenceSummaryUpdateReason\": \"Update reason\
\ (output only if updated)\",\n \n \"summary\": \"A 3-10 sentence summary\
\ covering the article's core elements\",\n \"summaryUpdateReason\":\
\ \"Update reason (output only if updated)\",\n \n \"domain\": \"Domain\
\ classification (Software Programming, Artificial Intelligence, Product\
\ Design, or Business Technology)\",\n \"domainUpdateReason\": \"Update\
\ reason (output only if updated)\",\n \n \"aiSubcategory\": \"AI Sub\
\ Category (AI Models, AI Development, AI Products, or AI News)\",\n \
\ \"aiSubcategoryUpdateReason\": \"Update reason (output only if updated)\"\
,\n \n \"tags\": [\"3-10 tags, ordered by Topic > Technology/Field >\
\ Application/Product > Company/Platform/Person > Trend\"],\n \"tagsUpdateReason\"\
: \"Update reason (output only if updated)\",\n \n \"mainPoints\": [\n\
\ {\n \"point\": \"Main point 1\",\n \"explanation\": \"\
Explanation of point 1, emphasizing practical application value or potential\
\ impact\"\n },\n // 3-5 main points\n ],\n \"mainPointsUpdateReason\"\
: \"Update reason (output only if updated)\",\n \n \"keyQuotes\": [\"\
3-5 representative article quotes that reflect unique insights, innovative\
\ ideas, or practical value\"],\n \"keyQuotesUpdateReason\": \"Update\
\ reason (output only if updated)\",\n \n \"score\": 80, // Integer\
\ from 0-100\n \"scoreUpdateReason\": \"Update reason (output only if\
\ updated)\",\n \n \"improvements\": \"Overall explanation of the main\
\ improvements made in this optimization, including what was changed and\
\ why\"\n}\n```\n\nPlease conduct a comprehensive review and optimization\
\ based on the above guidelines, providing high-quality, insightful analysis\
\ results with practical value for the target audience. Ensure the JSON\
\ format is correct and can be directly parsed. Output only the final\
\ JSON format result, without intermediate thought processes. Unless there's\
\ a compelling reason, do not arbitrarily modify or reduce the originally\
\ outputted content. If there are no updates, use the original values\
\ as the main fields in the output, without including the UpdateReason\
\ fields. For the \"aiSubcategory\" field, include it only if the article\
\ is in the AI domain, and provide an \"aiSubcategoryUpdateReason\" if\
\ there are any changes to this classification.\n```"
- id: 4836545e-d0f5-4703-8fb5-461cf5ede618
role: user
text: "Based on the XML input below, and considering the initial analysis\
\ results and the feedback from the review and reflection, please improve\
\ and optimize the article analysis. Follow the steps, principles, and\
\ output format specified in the system prompt, and output the analysis\
\ results in {{#1719357159255.languageName#}}.\n\n<article>\n <metadata>\n\
\ <title>{{#1719357159255.title#}}</title>\n <source>{{#1719357159255.sourceName#}}</source>\n\
\ <url>{{#1719357159255.url#}}</url>\n </metadata>\n <content>\n \
\ <![CDATA[\n{{#1719357159255.markdown#}}\n ]]>\n </content>\n <previousAnalysisResult>\n\
\ <![CDATA[\n {{#1720093031703.output#}}\n ]]>\n </previousAnalysisResult>\n\
\ <previousDomainAndTagResult>\n <![CDATA[\n {{#1719647683007.text#}}\n\
\ ]]>\n </previousDomainAndTagResult>\n <previousScoringResult>\n\
\ <![CDATA[\n {{#1719650938792.text#}}\n ]]>\n </previousScoringResult>\n\
\ <reflectionFeedback>\n <![CDATA[\n {{#1719381882148.text#}}\n\
\ ]]>\n </reflectionFeedback>\n</article>"
selected: false
title: Comprehensive Refinement
type: llm
variables: []
vision:
configs:
detail: high
enabled: true
height: 164
id: '1719444170368'
position:
x: 2912.0708571428577
y: -379.5154285714284
positionAbsolute:
x: 2912.0708571428577
y: -379.5154285714284
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
context:
enabled: false
variable_selector: []
desc: Identify the article's domain and extract structured tags.
model:
completion_params:
temperature: 0.7
mode: chat
name: deepseek-chat
provider: deepseek
prompt_template:
- id: 523ca58d-d9fd-45aa-b9a2-4f6d814cb633
role: system
text: "# Technical Article Classification and Tag Analyzer\n\n## Task Description\n\
\nPerform in-depth domain classification and tag analysis based on given\
\ article metadata and full-text analysis information.\n\n## Input\n\n\
1. Article metadata: title, link, source\n2. Full-text analysis information:\
\ one-sentence summary, full summary, main points, key quotes, and article\
\ tags\n\n## Output Format\n\nUse the following JSON format to output\
\ the analysis results:\n\n```json\n{\n \"domainProbabilities\": {\n\
\ \"Programming\": 0,\n \"Artificial Intelligence\": 0,\n \"\
Product & Design\": 0,\n \"Business & Tech\": 0\n },\n \"mainDomain\"\
: \"\",\n \"aiSubcategoryProbabilities\": {\n \"AI Development\":\
\ 0,\n \"AI Models\": 0,\n \"AI Products\": 0,\n \"AI News\"\
: 0\n },\n \"aiSubcategory\": \"\",\n \"tags\": []\n}\n```\n\n## Analysis\
\ Guidelines\n\n1. **Domain and AI Subcategory Analysis**:\n - Assign\
\ integer percentages (0-100) to domainProbabilities and aiSubcategoryProbabilities.\
\ Ensure each sum equals 100.\n - Set mainDomain and aiSubcategory to\
\ the category with the highest probability in each group.\n - Conduct\
\ AI subcategory analysis for all articles. If unrelated to AI, set AI\
\ News probability to 100%.\n\n2. **Tag Selection**:\n - Generate 3-7\
\ tags, based on article complexity.\n - Use the original language (treat\
\ mixed Chinese-English as Chinese).\n - Order tags: topic, technology/field,\
\ application/product, company/platform/notable figure, trend.\n - Prioritize\
\ tags from the core tag list. Create new tags when necessary.\n - Consider\
\ tags from the full-text analysis, ensuring they meet structural requirements.\n\
\ - Reflect the article's practical application value or potential impact.\n\
\n3. **Consistency Check**:\n - Ensure tags align with the main domain\
\ and AI subcategory (if applicable).\n - Verify that probability distributions\
\ accurately reflect the article's focus.\n\n## Core Tag List\n\n1. Programming\n\
JavaScript, Python, Java, HTML, CSS, Tailwind CSS, React, Spring, Next.js,\
\ Frontend Development, Backend Development, Mobile Development, Web Development,\
\ PostgreSQL, MySQL, Redis, Kafka, Big Data, Microservices, Architecture,\
\ DDD, Design Patterns, Serverless, Stability, GitHub, Docker, Testing,\
\ Code Quality, Performance Optimization, Observability, Code Review,\
\ Agile Development, Cloud, AWS, Azure, Aliyun, Open Source\n\n2. Artificial\
\ Intelligence\nAI, Deep Learning, Neural Networks, Speech Synthesis,\
\ ChatGPT, GPT-4, Gemini, DALL-E, Midjourney, Stable Diffusion, Copilot,\
\ Assistants, AI Agents, AI Applications, OpenAI, Google AI, Anthropic,\
\ Hugging Face, NVIDIA AI, Baidu, Alibaba, Tencent, ByteDance, Kimi, Zhipu,\
\ Pre-training, Fine-tuning, Prompt Engineering, Model Deployment, MLOps,\
\ Dify, Coze, LangChain, LlamaIndex, AGI, Explainable AI, Edge AI, AI\
\ Search, AI Education, AI Finance, AI Healthcare, AI Customer Service,\
\ AI Robotics, AI Ethics, AI Security\n\n3. Product & Design\nUE, UX,\
\ UI, Interaction Design, User Research, Prototype Design, Visual Design,\
\ Product Strategy, User Needs, User Stories, MVP, A/B Testing, Product\
\ Analysis, User Journey, User Personas, Usability Testing, Product Architecture,\
\ Responsive Design, Design Systems, Design Thinking, Product Roadmap,\
\ PMF\n\n4. Business & Tech\nEntrepreneurship, Business Models, Venture\
\ Capital, Financing, SaaS, Business Strategy, Market Analysis, Competitive\
\ Strategy, Brand Marketing, Digital Marketing, Content Marketing, Social\
\ Media Marketing, SEO, SEM, User Acquisition, User Retention, E-commerce,\
\ B2B, B2C, Customer Relationship Management, Market Segmentation, Pricing\
\ Strategy, Data Analysis, Case Studies\n\nNote: If you encounter important\
\ concepts or technologies not in the core list, you may add up to 3 additional\
\ relevant tags based on your judgment.\n\nPlease classify and tag the\
\ given technical article based on the above guidelines.\n\n## Output\
\ Example\n\n```json\n{\n \"domainProbabilities\": {\n \"Programming\"\
: 10,\n \"Artificial Intelligence\": 80,\n \"Product & Design\"\
: 5,\n \"Business & Tech\": 5\n },\n \"mainDomain\": \"Artificial\
\ Intelligence\",\n \"aiSubcategoryProbabilities\": {\n \"AI Development\"\
: 60,\n \"AI Models\": 30,\n \"AI Products\": 5,\n \"AI News\"\
: 5\n },\n \"aiSubcategory\": \"AI Development\",\n \"tags\": [\"Large\
\ Language Models\", \"RAG\", \"Prompt Engineering\", \"AI Application\
\ Development\", \"LangChain\", \"Intelligent Agents\", \"OpenAI\"]\n\
}\n```"
- id: 9ca6c658-2add-431c-a12e-2cd04d556bda
role: user
text: "Please classify the article and generate tags based on the provided\
\ article metadata and full-text analysis results, following the steps\
\ and principles outlined in the system prompt. Provide the results using\
\ the specified output format, with tags output in {{#1719357159255.languageName#}}.\n\
\n<article>\n <metadata>\n <title>{{#1719357159255.title#}}</title>\n\
\ <source>{{#1719357159255.sourceName#}}</source>\n <url>{{#1719357159255.url#}}</url>\n\
\ </metadata>\n <previousAnalysisResult>\n <![CDATA[\n {{#1720093031703.output#}}\n\
\ ]]>\n </previousAnalysisResult>\n</article>"
selected: false
title: Domain Identification and Tag Extraction
type: llm
variables: []
vision:
enabled: false
height: 146
id: '1719647683007'
position:
x: 2912.0708571428577
y: 300
positionAbsolute:
x: 2912.0708571428577
y: 300
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
context:
enabled: false
variable_selector: []
desc: Conduct a standardized assessment of the article.
model:
completion_params:
temperature: 0.7
mode: chat
name: gpt-4o
provider: openai_api_compatible
prompt_template:
- id: 81927624-e5ca-46d9-8c9a-516d749f0c5d
role: system
text: "# Technical Article Scoring Guide\n\n## Background\nYou are an experienced\
\ technical writing expert tasked with evaluating articles covering programming,\
\ artificial intelligence, product management, and business technology.\
\ Your goal is to provide an objective and comprehensive score based on\
\ the following criteria.\n\n## Input Description\nYou will receive:\n\
1. Article metadata: title, source, and URL\n2. Full article content\n\
3. Domain analysis results: domain classification and related tags\n4.\
\ Previous analysis results: article summary, main points, and key quotes\n\