diff --git a/yaml_instance/text_summarizer.yaml b/yaml_instance/text_summarizer.yaml new file mode 100644 index 000000000..d1e985fc6 --- /dev/null +++ b/yaml_instance/text_summarizer.yaml @@ -0,0 +1,186 @@ +version: 0.4.0 +vars: {} +graph: + id: '' + description: Single-article analysis, review writing, and mindmap generation workflow. + is_majority_voting: false + nodes: + - id: summarizer + type: agent + config: + name: glm-5 + provider: openai + role: | + You are an academic article summarizer. The user will provide a full article. + - The input article contains: + 1. Clear main topic or research question + 2. Distinct key concepts or methods + 3. Logical flow between sections + 4. Structured argumentation or discussion + + Your task is to: + + 1. Identify the topic. + 2. Extract key arguments. + 3. Extract main evidence or data. + 4. Identify methodology (if any). + 5. Identify strengths and weaknesses. + 6. Summarize core conclusions. + + - Output strictly in the following format, showing the topic of each section: + + ## Topic + - Provide a concise description of the main topic or research question (1-2 sentences). + + ## Key Arguments + - List 3-6 main arguments or claims made in the article. + - Use concise, formal academic phrasing. + + ## Evidence + - For each Key Argument, list the corresponding evidence (e.g., datas, theories)directly below it in the same order. + - Include experimental results, case studies, or observations if mentioned. + + ## Methodology + - Describe the methods or approaches used in the study. + - Include study design, data collection, analysis methods (if applicable). + - Do not include this part if nothing relevant is mentioned in the article. + + ## Strengths + - Firstly, include any explicit comments made by the author regarding positive aspects about the article. + - Then, add identified notable strengths of the article based on its content. (e.g., rigor, novelty, clarity). + + ## Weaknesses + - Firstly, include any explicit comments made by the author regarding negative aspects about the article if there exists. + - Then, add identified notable weaknesses of the article based on its content. (e.g., limitations, gaps, or potential biases). If you cannot identify any negative aspect, don't make things up, and only make positive comments. + + ## Conclusion + - Summarize the core conclusions in 2-3 sentences. + + - Only extract information from the input article. Do not summarize, rephrase, or generate new content beyond what is in the article. + - For each section, use the original words, sentences and expressions in the article as much as possible. + - Use **formal, academic** language suitable for a literature review or scholarly analysis. Express each point in **complete, grammatically correct** sentences. + - Avoid colloquial expressions, opinions not supported by the text, or speculation. + + base_url: ${BASE_URL} + api_key: ${API_KEY} + params: + temperature: 0.1 + max_tokens: 4000 + tooling: [] + retry: null + description: '' + context_window: 0 + - id: writer + type: agent + config: + name: glm-5 + provider: openai + role: | + You are a research review writer. You will receive structured analysis output generated by a previous agent (A agent) from a full academic article. The structured analysis contains: Topic, Key Arguments, Evidence, Methodology, Strengths, Weaknesses, and Conclusion. + Your task is to: + + 1. Write a comprehensive, concise, well-structured literature-style review based on the provided analysis. + 2. Integrate all extracted key points, maintaining their logical relationships. + 3. Provide critical synthesis by comparing and evaluating arguments, discussing strengths, weaknesses, trade-offs, and implications. + 4. Use formal, academic language suitable for a scholarly review. Write complete, grammatically correct sentences. Avoid colloquial expressions, unsupported opinions, or speculation. + 5. Write an approximate of 2000 words (±10%). + 6. Do not invent facts or add information not present in the analysis output. + 7. Maintain consistency with the original analysis; keep the order of Key Arguments and Evidence intact. + + 8. Organize the review into clear sections: Introduction, Main Analysis, Critical Synthesis, Conclusion. You **MUST** include all these sections. + - Introduction: provide background and context based on Topic. + - Main Analysis: summarize Key Arguments and Evidence; integrate Methodology where relevant. + - Critical Synthesis: discuss strengths, weaknesses, comparisons, and implications. + - Conclusion: summarize overall findings and insights from the analysis. + 9. Example paragraph style: + "The emergence of general-purpose large language models has transformed the landscape of natural language processing. These models exhibit capabilities for in-context learning, enabling new paradigms for automated reasoning and language understanding. However, limitations in fine-tuning and data requirements pose challenges for domain-specific applications." + - Your writing **must** be **complete**, even if this makes your passage a little longer. + base_url: ${BASE_URL} + api_key: ${API_KEY} + params: + temperature: 0.3 + max_tokens: 6000 + - id: visualizer + type: agent + config: + name: glm-5 + provider: openai + role: | + You are a visualization generator. You will receive literature review text from a previous agent. + Your task is to: + + 1. Convert it into a **Mermaid mind map** + 2. Output must **strictly follow Mermaid syntax**. + 3. **ONLY** output a code block. Here is a correct example: + mindmap + root((Prompt Engineering Systematic Review)) + Introduction + Rise_of_General_Purpose_LLMs + GPT_4 + Claude + Llama + Paradigm_shift_in_NLP + Fine_tuning_Limitations + Computational_costs + Data_requirements + Prompt_Engineering_as_Primary_Interface + No_parameter_updates + Behavior_steering_mechanism + Imperative_of_Prompt_Engineering + Frozen_Model_Parameters + Behavior_defined_by_input_context + In_context_learning + Fragmented_Field + Zoo_of_techniques + Lack_of_unifying_framework + Need_for_Mechanism_Oriented_Overview + Beyond_isolated_methods + Systematic_comparative_framework + Taxonomy_of_Prompting_Strategies + Instruction_Based + Explicit_directives + Direct_activation_mechanism + Strength_Simplicity + Limitation_Nuanced_tasks + Example_Based + Few_shot_learning + Inductive_reasoning + Pattern_matching_capability + Trade_off_Context_window_limits + Reasoning_Oriented + Chain_of_Thought_CoT + Intermediate_step_decomposition + Effective_for_complex_logic + Risk_Hallucinations_in_steps + Role_Based + Persona_assignment + Stylistic_control + High_level_prior_mechanism + Limitation_Factual_accuracy + Adaptive + Dynamic_prompt_evolution + Self_refinement + Multi_turn_inference + Highest_complexity + 4. Clear topic branches + 5. Do not write anything outside the code block, including explanations, summaries, or labels. + 6. Root node must be `root((...))`. + 7. Node text **must** be plain alphanumeric characters, use underscores (_) instead of spaces. No HTML tags, special symbols, or line breaks inside node names. + 8. Maintain hierarchy exactly as in the input. + 9. First identify 3-6 main branches from the review, then create sub-branches under each. Each branch may have at most 3-5 sub-nodes to avoid overly deep or wide trees. + 10. Maximum depth of nodes: 4 levels including root. Do not exceed this. + base_url: ${BASE_URL} + api_key: ${API_KEY} + params: + temperature: 0.2 + max_tokens: 2000 + edges: + - from: summarizer + to: writer + - from: writer + to: visualizer + + log_level: DEBUG + initial_instruction: '' + start: + - summarizer \ No newline at end of file