Skip to content

Commit 17c21a8

Browse files
JihaoXinclaude
andcommitted
Enforce text brevity in concept figures: labels ≤5 words, total ≤50 words
- Planner prompt: add "TEXT BREVITY" section — component labels MAX 3-5 words, connection labels 1-3 words, no sentences/paragraphs inside components, total visible text under 50 words - Critic: add automatic deductions for text overload (sentences inside components → Conciseness ≤ 2, labels > 5 words → ≤ 3) - PaperBanana integration: append brevity instruction to visual_intent - Principle: diagrams are visual abstractions, not text documents Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 6e5214a commit 17c21a8

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

ark/compiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ def _try_paperbanana(self, name: str, caption: str, paper_context: str,
684684
data = {
685685
"candidate_id": name,
686686
"content": paper_context,
687-
"visual_intent": caption,
687+
"visual_intent": f"{caption} IMPORTANT: Keep text minimal — component labels MAX 3-5 words, connection labels MAX 1-3 words. Use icons and visual layout to convey meaning, not text. Total visible text under 50 words.",
688688
"additional_info": {"rounded_ratio": aspect_ratio},
689689
}
690690

ark/nano_banana.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,11 +318,20 @@ def _run_planner(client, text_model_id: str, figure_name: str, caption: str,
318318
- The diagram should feel RICH and INFORMATIVE — not empty or sparse
319319
- Add small illustrative icons/thumbnails inside key components (2D vector-style, NOT emoji)
320320
- Use different shapes for different component types (not all rounded rectangles)
321-
- Add small detail annotations where helpful (e.g., "×N" for repeated blocks, "K pairs" for memory size)
322321
- Overall background: white or off-white (#FAFAFA)
323322
- NO drop shadows, NO gradients, NO 3D effects. Flat design with semantic richness.
324323
- Every visual element should encode meaning — if a color/shape/line doesn't convey information, remove it
325324
325+
### 6. TEXT BREVITY (CRITICAL — the #1 mistake is too much text)
326+
- A diagram is a VISUAL ABSTRACTION, not a text document. Communicate through shapes, colors, icons, and layout — NOT paragraphs.
327+
- **Component labels**: MAX 3-5 words (e.g., "LLM Semantic Detection", NOT "Uses a large language model to analyze skill instructions and classify them as benign or malicious")
328+
- **Connection labels**: MAX 1-3 words (e.g., "Benign", "Malicious", "Repaired")
329+
- **Annotations**: MAX 1 short phrase if essential (e.g., "F1=0.95", "N=18K"). Skip if not critical.
330+
- **NO sentences or descriptions inside components**. The caption and paper body handle explanations.
331+
- **NO bullet lists, paragraphs, or multi-line text blocks** inside any component.
332+
- If a component needs explanation beyond its label, use a small icon to convey meaning visually instead.
333+
- Total visible text in the entire figure should be under ~50 words.
334+
326335
IMPORTANT: Do NOT include font sizes (e.g., "12pt"), hex color codes (e.g., "#E6F3FF"), or CSS-like properties in component descriptions. Those are for the style guide only. Just describe WHAT to draw — shapes, labels, connections, zones, icons — in plain language. The image generator will interpret font specs as literal text to render.
327336
328337
Output ONLY the visual specification. No preamble."""
@@ -406,6 +415,9 @@ def _run_critic(client, text_model_id: str, description: str, image_bytes: bytes
406415
- All text same size (no typography hierarchy) → Publication Readiness ≤ 3
407416
- Sparse/empty layout with too much white space → Publication Readiness ≤ 3
408417
- Drop shadows or 3D effects (should be FLAT design) → Aesthetics ≤ 3
418+
- Text overload: sentences, paragraphs, or bullet lists inside components → Conciseness ≤ 2
419+
- Component labels longer than 5 words → Conciseness ≤ 3
420+
- Total visible text exceeds ~50 words → Conciseness ≤ 3
409421
410422
## Scoring Criteria (1-5, be VERY strict)
411423

0 commit comments

Comments
 (0)