• About Us
  • Disclaimer
  • Contact Us
  • Privacy Policy
Friday, August 21, 2026
mGrowTech
No Result
View All Result
  • Technology And Software
    • Account Based Marketing
    • Channel Marketing
    • Marketing Automation
      • Al, Analytics and Automation
      • Ad Management
  • Digital Marketing
    • Social Media Management
    • Google Marketing
  • Direct Marketing
    • Brand Management
    • Marketing Attribution and Consulting
  • Mobile Marketing
  • Event Management
  • PR Solutions
  • Technology And Software
    • Account Based Marketing
    • Channel Marketing
    • Marketing Automation
      • Al, Analytics and Automation
      • Ad Management
  • Digital Marketing
    • Social Media Management
    • Google Marketing
  • Direct Marketing
    • Brand Management
    • Marketing Attribution and Consulting
  • Mobile Marketing
  • Event Management
  • PR Solutions
No Result
View All Result
mGrowTech
No Result
View All Result
Home Al, Analytics and Automation

Building Agentic Document Intelligence Pipelines: Creating Scientific Figures with AutoFigure

Josh by Josh
August 21, 2026
in Al, Analytics and Automation
0
Building Agentic Document Intelligence Pipelines: Creating Scientific Figures with AutoFigure


heading("4. Creating a custom reference figure")
reference_dir = OUTPUT_ROOT / "01_custom_references"
reference_dir.mkdir(parents=True, exist_ok=True)
reference_path = reference_dir / "reference_architecture_style.png"
W, H = 1333, 750
img = Image.new("RGB", (W, H), "white")
draw = ImageDraw.Draw(img)
try:
   title_font = ImageFont.truetype("DejaVuSans-Bold.ttf", 36)
   box_font = ImageFont.truetype("DejaVuSans-Bold.ttf", 24)
   small_font = ImageFont.truetype("DejaVuSans.ttf", 18)
except Exception:
   title_font = None
   box_font = None
   small_font = None
draw.text(
   (W // 2, 55),
   "Reference Layout: Modular Scientific Pipeline",
   anchor="mm",
   fill="black",
   font=title_font,
)
boxes = [
   (90, 215, 290, 120, "Input", "documents"),
   (365, 215, 290, 120, "Planner", "route by task"),
   (640, 215, 290, 120, "Experts", "summary / table / vision"),
   (915, 215, 290, 120, "Verifier", "grounded output"),
]
for i, (x, y, bw, bh, title, subtitle) in enumerate(boxes):
   draw.rounded_rectangle(
       [x, y, x + bw, y + bh],
       radius=22,
       fill=(245, 245, 245),
       outline=(20, 20, 20),
       width=3,
   )
   draw.text(
       (x + bw / 2, y + 45),
       title,
       anchor="mm",
       fill="black",
       font=box_font,
   )
   draw.text(
       (x + bw / 2, y + 82),
       subtitle,
       anchor="mm",
       fill=(70, 70, 70),
       font=small_font,
   )
   if i < len(boxes) - 1:
       ax = x + bw + 20
       ay = y + bh / 2
       bx = boxes[i + 1][0] - 20
       by = ay
       draw.line([ax, ay, bx, by], fill="black", width=5)
       draw.polygon(
           [(bx, by), (bx - 18, by - 10), (bx - 18, by + 10)],
           fill="black",
       )
draw.rounded_rectangle(
   [180, 500, 1150, 585],
   radius=24,
   fill=(252, 252, 252),
   outline=(80, 80, 80),
   width=2,
)
draw.text(
   (665, 542),
   "Design cue: aligned modules, sparse labels, strong flow direction, clean academic styling",
   anchor="mm",
   fill=(40, 40, 40),
   font=small_font,
)
img.save(reference_path)
print(f"Custom reference saved: {reference_path}")
display_file_if_possible(reference_path, "Custom reference figure")
heading("5. Configuring API-backed AutoFigure")
API_KEY = collect_api_key(PROVIDER)
if not API_KEY:
   print("No API key provided. Cloud generation sections will be skipped.")
else:
   print(f"Provider: {PROVIDER}")
   print(f"Generation model: {GENERATION_MODEL}")
   print("API key received. The key is not printed.")
config = None
agent = None
if API_KEY:
   config = Config(
       generation_api_key=API_KEY,
       generation_provider=PROVIDER,
       generation_model=GENERATION_MODEL,
       methodology_api_key=API_KEY,
       methodology_provider=PROVIDER,
       methodology_model=GENERATION_MODEL,
       enhancement_api_key=API_KEY if RUN_IMAGE_ENHANCEMENT else None,
       enhancement_provider=PROVIDER,
       enhancement_model=os.environ.get(
           "AUTOFIGURE_ENHANCEMENT_MODEL",
           "google/gemini-3.1-flash-image-preview"
           if PROVIDER == "openrouter"
           else "gemini-3.1-flash-image-preview",
       ),
       max_iterations=MAX_ITERATIONS,
       quality_threshold=QUALITY_THRESHOLD,
       output_dir=str(OUTPUT_ROOT / "02_text_to_figure"),
       custom_references=[str(reference_path)],
       art_style=ART_STYLE,
   )
   validation_errors = config.validate()
   print(f"Config validation errors: {validation_errors if validation_errors else 'none'}")
   print(f"References found by config: {len(config.get_references())}")
   agent = AutoFigureAgent(config)
heading("6. Prompt template preview")
prompt_preview = get_initial_prompt_template(
   topic="paper",
   content=FIGURE_DESCRIPTION[:2500],
   output_format="svg",
)
print(prompt_preview[:2500])
print("\n... prompt preview truncated ...")
if API_KEY and RUN_TEXT_TO_FIGURE:
   heading("7. Running text-to-figure generation")
   text_output_dir = OUTPUT_ROOT / "02_text_to_figure"
   text_output_dir.mkdir(parents=True, exist_ok=True)
   text_result = agent.generate(
       description=FIGURE_DESCRIPTION,
       max_iterations=MAX_ITERATIONS,
       quality_threshold=QUALITY_THRESHOLD,
       output_format=TEXT_OUTPUT_FORMAT,
       enable_enhancement=RUN_IMAGE_ENHANCEMENT,
       art_style=ART_STYLE,
       enhancement_input_type="code2prompt",
       enhancement_count=1,
       custom_references=[str(reference_path)],
       output_dir=str(text_output_dir),
       topic="paper",
   )
   summarize_generation_result(text_result, "Text-to-Figure Result")
else:
   print("Skipping text-to-figure generation.")



Source_link

READ ALSO

TVA Board Creates Data Center Rate to Shield Households From AI Power Costs – Unite.AI

Paving the way for greener ammonia production | MIT News

Related Posts

TVA Board Creates Data Center Rate to Shield Households From AI Power Costs – Unite.AI
Al, Analytics and Automation

TVA Board Creates Data Center Rate to Shield Households From AI Power Costs – Unite.AI

August 21, 2026
Paving the way for greener ammonia production | MIT News
Al, Analytics and Automation

Paving the way for greener ammonia production | MIT News

August 21, 2026
Meet S1-mini: Superwhisper’s 462 MB Open-Weights Text Normalizer That Turns Raw ASR Transcripts Into Clean Written Text
Al, Analytics and Automation

Meet S1-mini: Superwhisper’s 462 MB Open-Weights Text Normalizer That Turns Raw ASR Transcripts Into Clean Written Text

August 21, 2026
New AI Predicts Your Next Response From Your Past Conversations – Unite.AI
Al, Analytics and Automation

New AI Predicts Your Next Response From Your Past Conversations – Unite.AI

August 20, 2026
Auditing Preference Biases and Fine-Tuning Language Models with Direct Preference Optimization on Anthropic HH-RLHF Using TRL and LoRA
Al, Analytics and Automation

Auditing Preference Biases and Fine-Tuning Language Models with Direct Preference Optimization on Anthropic HH-RLHF Using TRL and LoRA

August 20, 2026
Ramp Opens Router.com Model Gateway With Free Routing Through 2026 – Unite.AI
Al, Analytics and Automation

Ramp Opens Router.com Model Gateway With Free Routing Through 2026 – Unite.AI

August 19, 2026
Next Post
TikTok Will Pay $400 Million To Settle Justice Department Lawsuit Over Child Privacy

TikTok Will Pay $400 Million To Settle Justice Department Lawsuit Over Child Privacy

POPULAR NEWS

Trump ends trade talks with Canada over a digital services tax

Trump ends trade talks with Canada over a digital services tax

June 28, 2025
15 Trending Songs on TikTok in 2025 (+ How to Use Them)

15 Trending Songs on TikTok in 2025 (+ How to Use Them)

June 18, 2025
Communication Effectiveness Skills For Business Leaders

Communication Effectiveness Skills For Business Leaders

June 10, 2025
Comparing the Top 7 Large Language Models LLMs/Systems for Coding in 2025

Comparing the Top 7 Large Language Models LLMs/Systems for Coding in 2025

November 4, 2025
App Development Cost in Singapore: Pricing Breakdown & Insights

App Development Cost in Singapore: Pricing Breakdown & Insights

June 22, 2025

EDITOR'S PICK

Dust hits $6M ARR helping enterprises build AI agents that actually do stuff instead of just talking

Dust hits $6M ARR helping enterprises build AI agents that actually do stuff instead of just talking

July 5, 2025
AI shapes autonomous underwater “gliders” | MIT News

AI shapes autonomous underwater “gliders” | MIT News

July 11, 2025
Top 10 Done-For-You Link Insertion Service Providers

Top 10 Done-For-You Link Insertion Service Providers

July 8, 2026
Cloud Kitchen Management Software Development Guide

Cloud Kitchen Management Software Development Guide

October 21, 2025

About

We bring you the best Premium WordPress Themes that perfect for news, magazine, personal blog, etc. Check our landing page for details.

Follow us

Categories

  • Account Based Marketing
  • Ad Management
  • Al, Analytics and Automation
  • Brand Management
  • Channel Marketing
  • Digital Marketing
  • Direct Marketing
  • Event Management
  • Google Marketing
  • Marketing Attribution and Consulting
  • Marketing Automation
  • Mobile Marketing
  • PR Solutions
  • Social Media Management
  • Technology And Software
  • Uncategorized

Recent Posts

  • ‘Not what Neutrogena stands for’: Beauty brand issues statement after death of Hayden Panettiere
  • TikTok Will Pay $400 Million To Settle Justice Department Lawsuit Over Child Privacy
  • Building Agentic Document Intelligence Pipelines: Creating Scientific Figures with AutoFigure
  • Ecommerce Website Maintenance: 15 Essential Checks
  • About Us
  • Disclaimer
  • Contact Us
  • Privacy Policy
No Result
View All Result
  • Technology And Software
    • Account Based Marketing
    • Channel Marketing
    • Marketing Automation
      • Al, Analytics and Automation
      • Ad Management
  • Digital Marketing
    • Social Media Management
    • Google Marketing
  • Direct Marketing
    • Brand Management
    • Marketing Attribution and Consulting
  • Mobile Marketing
  • Event Management
  • PR Solutions