- id: upload_study_material
name: upload_study_material
tool: INPUT_FILE
input:
- name: description
value: "Upload educational document for highlighting"
- id: identify_study_points
name: identify_study_points
tool: OPENAI_INVOKE
config:
- name: version
value: gpt-4
input:
- name: prompt
value: |
Analyze this educational content and categorize text for highlighting:
{{steps.extract_text.result.text}}
Categories:
1. Key concepts and definitions (YELLOW)
2. Important formulas or equations (GREEN)
3. Critical facts and dates (BLUE)
4. Examples and case studies (PURPLE)
5. Warning or caution notes (RED)
Return specific text phrases to highlight in each category.
- id: create_study_highlights
name: create_study_highlights
tool: PYTHON_SANDBOX_RUN
input:
- name: code
value: |
# Create educational highlight scheme
study_highlights = [
# Key terms and definitions
{"text": "definition", "color": "yellow", "case_sensitive": False},
{"text": "theorem", "color": "yellow", "case_sensitive": False},
{"text": "principle", "color": "yellow", "case_sensitive": False},
# Formulas and equations
{"text": "formula", "color": "green", "case_sensitive": False},
{"text": "equation", "color": "green", "case_sensitive": False},
{"text": "calculate", "color": "green", "case_sensitive": False},
# Important facts
{"text": "important", "color": "blue", "case_sensitive": False},
{"text": "note that", "color": "blue", "case_sensitive": False},
{"text": "remember", "color": "blue", "case_sensitive": False},
# Examples
{"text": "example", "color": "purple", "case_sensitive": False},
{"text": "case study", "color": "purple", "case_sensitive": False},
{"text": "for instance", "color": "purple", "case_sensitive": False},
# Warnings and cautions
{"text": "warning", "color": "red", "case_sensitive": False},
{"text": "caution", "color": "red", "case_sensitive": False},
{"text": "avoid", "color": "red", "case_sensitive": False}
]
import json
print(json.dumps(study_highlights, indent=2))
- id: apply_study_highlights
name: apply_study_highlights
tool: WORD_TEXT_HIGHLIGHT
input:
- name: file_url
value: "{{steps.upload_study_material.result.file_url}}"
- name: highlights
value: "{{steps.create_study_highlights.result.stdout}}"
- id: create_study_guide
name: create_study_guide
tool: OUTPUT_FILE
input:
- name: content
value: |
Study Guide - Highlighting Legend
================================
Color Coding System:
🟡 YELLOW - Key Concepts & Definitions
- Fundamental terms and concepts
- Important definitions to memorize
- Core principles and theories
🟢 GREEN - Formulas & Equations
- Mathematical formulas
- Calculation methods
- Problem-solving approaches
🔵 BLUE - Critical Facts & Information
- Important facts to remember
- Key points for exams
- Essential knowledge items
🟣 PURPLE - Examples & Case Studies
- Practical examples
- Real-world applications
- Case study references
🔴 RED - Warnings & Cautions
- Common mistakes to avoid
- Important warnings
- Critical safety information
Study Tips:
1. Focus on YELLOW highlighted definitions first
2. Practice GREEN highlighted formulas
3. Memorize BLUE highlighted facts
4. Review PURPLE highlighted examples
5. Pay special attention to RED highlighted warnings
Document processed: {{date | format('YYYY-MM-DD HH:mm:ss')}}
- name: filename
value: "study_guide_{{date | format('YYYY-MM-DD')}}.txt"
- name: fileType
value: "txt"