ASCIITermDraw-Bench

ASCII Diagram Generation and Editing Benchmark

ASCIITermDraw-Bench tests whether a model can draw and edit readable ASCII diagrams in plain text. Tasks cover box layouts, network topologies, clusters, software architectures, and image-conditioned diagram editing at increasing difficulty, scored with structural assertions and a DeepEval LLM-as-a-judge rubric.

  • Organized task categories
  • Reproducible generators
  • Playwright rendering
  • Together AI batch inference
  • Structural (JSON) + Semantics LLM-As-A-Judge (DeepEval)

Problem Statement

The idea started while I was trying to follow an AI assistant's explanation of a network topology. It replied with an ASCII diagram, and that sketch made the problem and solution click in a way the surrounding prose hadn't.

That made the value of ASCII diagrams clear. They help an AI assistant explain structure visually, and you can copy, edit, and paste the diagram straight back as a follow-up prompt.

Vision

The benchmark treats ASCII diagrams as a practical way to communicate ideas when plain words fall short.

It tests open-source VLMs, LLMs, and especially smaller language models, so you can see how well a model small enough to run on a phone, tablet, or laptop handles visual diagrams.

Overview

ASCIITermDraw-Bench evaluates structured ASCII diagram generation and editing. It checks whether models can place labels, keep spacing aligned, route arrows, maintain overall structure, and apply constrained edits to an existing diagram.

The benchmark covers four families of tasks:

  • Box Layout Basics: single boxes, rows, columns, arrows, and spacing-sensitive layout
  • Network Topology Diagrams: clusters, buses, data flows, and connection topology
  • Diagram Editing: image-conditioned edits applied to an existing ASCII diagram
  • Software Architecture Diagrams: real-world gateways, pipelines, feeds, and storage layers

Every task ships with a prompt, a reference ASCII artifact (a PNG to be rendered), and structured assertions.

Every candidate diagram is judged through an LLM-as-a-judge pipeline: a DeepEval BaseMetric judge (OpenAI or Anthropic), following the shared judge prompt, scores each candidate against the reference on two axes, averaged over multiple judge rounds and combined into the final geval_score:

  • Structural score: do the required labels, entities, and edges actually appear, checked against structured assertions.
  • Semantic score: does the layout, spacing, and connection routing actually match the prompt.
Current benchmark size. Loading benchmark metadata...

Leaderboard

Early results. Generation runs on Together AI or local Ollama. Judged by GPT-5.4. Score is each model's mean combined structural + semantic score across all 80 tasks (5 judge rounds per task), shown with a 95% confidence interval computed over the 80 tasks. The raw mean +/- stdev is averaged (out of 2.0) and converted to percentages for display. See outputs/<model>/metrics.json and scripts/judge/compute_metrics.py for the exact methodology. More rows will appear as more models are benchmarked.

Task Categories

Category What it measures

Benchmark Anatomy

Step 1
Prompt
prompt.txt (plus source.png for editing tasks)
Step 2
Model Inference
Together AI chat-completions call
Step 3
ASCII Output
Raw candidate .txt
Step 4
Rendered PNG
Playwright screenshot of the ASCII
Step 5
DeepEval Judge
BaseMetric (OpenAI or Anthropic) scored against assertions.json and the shared judge prompt
Step 6
Results
results.csv and gval/result.json per task

Category 3 is multimodal: the model receives a rendered source.png and must apply a textual edit instruction while still returning plain ASCII. The remaining categories are text-to-ASCII generation tasks.

Judge / GEval Process

Step 1
Candidate + Reference PNGs
The rendered candidate diagram, alongside the task's reference diagram
Step 2
Judge Prompt + Assertions
Task-specific vlm_judge_prompt.txt plus assertions.json, appended to the shared judge prompt
Step 3
Judge Round
DeepEval BaseMetric call (GPT-5.4 or Claude Sonnet 5), repeated num_judgments times (default 5) per task
Structural
Observations
Labels, entities, and edges the judge reports seeing, checked against assertions.json
Semantic
Rubric Score
The judge's own 0.0-1.0 layout/spacing/routing judgment
Step 4
geval_score
Structural + semantic scores, averaged across all judge rounds for the task
Step 5
Results
outputs/<model>/results.csv and gval/result.json per task

Each candidate is judged num_judgments times independently (no cached repeats), so the reported score is a mean with a population stdev across rounds rather than a single judge call. See the Leaderboard for published results and metrics.json for the methodology notes.

Key Features

Benchmark Coverage

  • Box Layout Basics: simple boxes, chains, stacks, fan-in, fan-out, diamonds, and spacing-sensitive arrangements.
  • Network Topology Diagrams: brokers, parameter servers, service meshes, CDNs, DNS flows, and cluster communication patterns.
  • Diagram Editing: image-conditioned edit tasks that require keeping the original structure intact while applying the requested change.
  • Software Architecture Diagrams: 3-tier systems, event pipelines, API gateways, queues, ETL layouts, and other engineering sketches.

Inference Pipeline

Generation follows the flow in Benchmark Anatomy: a task's prompt.txt (plus source.png for editing tasks) goes to Together AI for inference. The raw ASCII output is then rendered to a diagram-only PNG and passed to the judge.

  • Playwright PNG rendering: reference ASCII files are rendered as diagram-only images for editing tasks and visual inspection; see Technical Details.
  • Together AI generation: used for model responses only; judging runs separately on OpenAI or Anthropic.

Evaluation Pipeline

Single-path scoring. A DeepEval BaseMetric judge (OpenAI or Anthropic), following the shared judge prompt, reports a structural score and a semantic score per task: geval_score = geval_structural_score + geval_semantics_score. There is no separate deterministic or text-heuristic scoring step.

Judging follows the flow in Judge / GEval Process:

  1. Candidate and reference PNGs, plus the judge prompt and assertions.json, go to the judge.
  2. The judge round repeats num_judgments times (default 5).
  3. Structural score: computed by the harness from what the judge observes. Each observation is checked against assertions.json as an all-or-nothing check (no partial credit within a check), then averaged across whichever checks apply to the task:
    • required_labels: every required label appears somewhere in the diagram.
    • entity_count: the observed entity count matches the expected count exactly.
    • required_edges: every required connection is present.
    • required_edge_labels: editing tasks only, every required edge label is present.
    • preserved_elements: editing tasks only, elements that should survive the edit still do.
  4. Semantic score: the judge's own direct 0.0-1.0 rubric judgment, informed by its own checks on:
    • connections_correct: are the connections actually made where they should be.
    • text_inside_nodes_correct: is the text inside each node/box correct.
    • text_centered_in_nodes: is that text centered within its node/box.
    • labels_spelled_correct: are all labels spelled correctly.
    • arrows_cleanly_aligned: are arrows cleanly aligned to their source and target.
    • layout_matches_prompt: does the overall layout follow the prompt.
  5. Both scores are averaged across rounds and summed into geval_score.
  • Repeated judging: each task can be judged multiple times (default 5) with mean/stdev reported, to separate real quality differences from judge-scoring noise.
  • Repository-first organization: task directories, scripts, outputs, and website metadata are all arranged for extension and public contribution.

Example Tasks

One hard-difficulty task per category, loaded live from the public Hugging Face dataset (the same format as the private benchmark). Click a diagram to view it full size, or see every public example on the Tasks page.

Technical Details

Task assets live in named category directories, and the website data is built directly from the repository tree (see website/tools/build_site_data.mjs) rather than from hand-maintained content.

Rendering

Every ASCII artifact (reference or candidate) is rendered to a diagram-only PNG by scripts/rendered/render_ascii.mjs: headless Playwright/Chromium loads the raw text into a monospace <pre> element on a minimal page, resizes the viewport to exactly fit that content's bounding box, and screenshots only that region at 2x device scale. There is no surrounding page chrome in the output, just the diagram itself.

Inference and Scoring

  • Smoke generation: synchronous shared-module Together AI calls for fast spot checks on a random subset of tasks.
  • Full generation: the same synchronous Together AI transport, run across all tasks.
  • DeepEval judge: a custom BaseMetric against OpenAI or Anthropic, following the shared judge prompt. Structural score verifies visual evidence against assertions.json; semantic score comes from a task-specific rubric prompt.

Benchmark Summary

Overview of task counts and difficulty buckets across the four categories.

Category Tasks Difficulty Buckets

Documentation

Main guides and files for working with the benchmark:

  • Quick Start Guide Environment setup, rendering, smoke tests, batch runs, judging, and local website preview
  • Task Metadata Generated category and task index used by the published website
  • Tasks Full task inventory generated from the benchmark repository
  • Technical Details Inference, rendering, scoring, and repository layout notes

Publishing Notes

The site is static and hosted on GitHub Pages, with its JSON data generated directly from the task tree.

New tasks, judge improvements, renderers, and evaluation baselines can be contributed directly through the repository.

Video Summary

Citation

If you use ASCIITermDraw-Bench (the benchmark, tasks, tooling, leaderboard, or results), please credit this work and cite it as:

@misc{singh2026asciitermdrawbench,
      title={ASCIITermDraw-Bench: Benchmarking ASCII Diagram Generation and Editing},
      author={Yuvraj Singh},
      year={2026},
      howpublished={\url{https://github.com/YuvrajSingh-mist/ASCIITermDraw-Benchmark}},
      doi={10.5281/zenodo.23198058},
}

License

  • Code / tooling (runners, renderers, judge, website source): Apache License 2.0. Keep the copyright notice and NOTICE when you redistribute.
  • Benchmark task content (task definitions, reference diagrams, judge prompts, the public example dataset, and published evaluation artifacts): CC BY 4.0. Free to use and adapt, including commercially, with attribution to Yuvraj Singh (name + link; indicate changes if you modify).

The private 80-task evaluation set is not distributed and is not covered by the CC BY grant. Public tasks are published on Hugging Face.