AI Tools

AutoFigure: Turn Text Descriptions Into Publication-Ready Scientific Diagrams

AutoFigure converts text descriptions and paper content into SVG/PNG scientific diagrams using a Gemini-backed API. Here's how the pipeline works and who should care.

LUMIEN5 min read
AutoFigure: Turn Text Descriptions Into Publication-Ready Scientific Diagrams

AutoFigure is an open-source tool from ResearAI that converts plain text descriptions and paper-like content into publication-ready scientific diagrams. A tutorial published by Marktechpost on 21 August 2026 walks through the full setup: cloning the repo, fixing Pillow compatibility issues, wiring up an API key, and producing SVG and PNG outputs using Google Gemini 3.1 Pro Preview. The result is a rendered pipeline diagram generated from a text description alone, with no manual drawing required.

What happened

Detail Value
Tool AutoFigure (ResearAI, open-source)
Default model Google Gemini 3.1 Pro Preview
Supported providers OpenRouter, Gemini, Bianxie
Default quality threshold 8.5 out of 10
Default max iterations 1
Output formats SVG, PNG, mxGraph XML
Target layout 16:9 wide, publication-ready

The tutorial covers the complete AutoFigure workflow running in a Google Colab environment. After cloning the repository from GitHub and resolving a Pillow version conflict, the notebook configures the API provider, sets the model name, and points the tool at a text description of the figure to generate.

The main demo builds a diagram of an agentic document intelligence pipeline. The pipeline itself has seven stages: document ingestion (PDFs, scanned reports, markdown, tables), a normalization layer, a routing planner, five specialized expert modules, a budget-aware orchestration layer, a verification layer, and a final analyst-ready output workspace. AutoFigure converts that written description directly into a labeled box-and-arrow diagram.

How the generation workflow is structured

The tool accepts either a raw text description or a markdown-formatted paper as input. The environment variable AUTOFIGURE_PROVIDER sets which API backend to use. Model selection is handled via AUTOFIGURE_MODEL, defaulting to google/gemini-3.1-pro-preview on OpenRouter.

Four separate run flags control which parts of the pipeline execute:

  • RUN_TEXT_TO_FIGURE: generates a figure from a plain text description (enabled by default)
  • RUN_PAPER_TO_FIGURE: converts a markdown paper into figures (disabled by default)
  • RUN_MXGRAPH_DEMO: produces mxGraph XML output (disabled by default)
  • RUN_IMAGE_ENHANCEMENT: post-processes the rendered image (disabled by default)

The art style prompt instructs the model to produce “clean publication-ready scientific illustration, precise alignment, subtle shadows, clear academic typography, high contrast, minimal clutter.” That style string is passed directly to the LLM alongside the figure description.

What the sample paper covers

The tutorial also includes a short markdown paper titled “Efficient Agentic Document Intelligence for Long Financial Reports.” It describes a method that normalizes incoming documents into a structured graph, routes nodes to expert modules based on modality and complexity, and uses a budget-aware layer to pick model size dynamically. Simple chunks go to cheaper models; complex chunks escalate to stronger ones. A verification layer then checks schema validity, citation support, numerical consistency, and table integrity before final output.

The paper covers experiments on financial filings and analyst reports, measuring extraction accuracy, grounding precision, table reconstruction quality, and total inference cost. AutoFigure can take this markdown as input and render figures for each section, then compile the whole thing into a PDF.

Why it matters

Producing clear architecture diagrams is a consistent bottleneck for researchers, technical writers, and teams documenting AI pipelines. The usual path involves a designer, a diagramming tool, and several revision rounds. AutoFigure skips all of that by treating the figure as a code output: write the description, run the notebook, get an SVG.

For business teams building AI integration workflows or documenting internal automation systems, this changes the economics of technical documentation. A well-described pipeline can become a shareable diagram in one step, with the quality gate (the 8.5 threshold) filtering out low-quality renders before they reach a human reviewer.

The connection to financial document intelligence is also notable. The tutorial explicitly targets “finance or enterprise document intelligence” as the intended audience for the generated diagram. Teams processing long financial reports, legal filings, or compliance documents could use both the diagram tool and the underlying pipeline architecture as a starting point for their own systems. We have covered related work on the rapid growth of AI data processing that makes tooling like this increasingly relevant.

Our take

AutoFigure is genuinely useful for a narrow but real problem: getting a decent diagram out of a text description without opening Figma or Lucidchart. The quality threshold mechanic is smart. Setting it to 8.5 and running one iteration by default keeps costs predictable, though it also means you may need to tune the description to get a passing result on the first try.

The dependency on Gemini 3.1 Pro Preview via third-party providers adds a layer of fragility. If the model is deprecated or the provider changes pricing, the whole generation step breaks. Anyone adopting this in production should abstract the model selection behind a config file and test with at least one fallback model.

The bigger picture is that text-to-diagram tooling is maturing fast. AutoFigure is closer to a research prototype than a polished product, but the core idea, treating a figure as a prompt output, is sound and will only get more capable as underlying models improve.

What to do about it

  1. Clone the AutoFigure repo from GitHub and run the setup in a Colab environment to test without a local dependency conflict.
  2. Write your pipeline description as a numbered list with clear stage names and flow direction before passing it to the tool.
  3. Set MAX_ITERATIONS to 2 or 3 if your first render scores below the 8.5 threshold, rather than adjusting the threshold down.
  4. Export SVG rather than PNG as your primary output so the diagram scales cleanly for slides, papers, and web use.
  5. If you are documenting an internal AI system, consider pairing this with a proper web documentation build so diagrams are version-controlled alongside code.

Start with a single, clearly scoped pipeline and treat the first output as a draft: AutoFigure saves the drawing time, not the thinking time.

Source: Marktechpost

Frequently asked questions

What is AutoFigure and what does it do?

AutoFigure is an open-source toolkit by ResearAI that generates scientific figures, such as architecture diagrams and method flowcharts, directly from plain text descriptions or markdown paper content. It uses an LLM API backend (defaulting to Google Gemini 3.1 Pro Preview) and outputs SVG or PNG files.

Which AI model does AutoFigure use to generate figures?

By default it uses Google Gemini 3.1 Pro Preview, accessed via providers including OpenRouter, Gemini, or Bianxie. The model can be overridden with the AUTOFIGURE_MODEL environment variable.

What output formats does AutoFigure support?

AutoFigure supports SVG and PNG for standard scientific figures, and mxGraph XML for diagram-tool-compatible exports.

How does the quality threshold work in AutoFigure?

AutoFigure scores each generated figure and only accepts outputs that meet or exceed the quality threshold, which defaults to 8.5 out of 10. The default maximum number of generation attempts is 1, but this can be increased via the AUTOFIGURE_MAX_ITERATIONS setting.

More from AI