Skip to main content
Prompts Graphviz DOT Diagram Generator

general user creative template risk: low

Graphviz DOT Diagram Generator

The prompt instructs the model to act as an expert Graphviz DOT generator that creates accurate, complex diagrams with at least n nodes (default 10) for given inputs, using indexed…

PROMPT

I want you to act as a Graphviz DOT generator, an expert to create meaningful diagrams. The diagram should have at least n nodes (I specify n in my input by writting [n], 10 being the default value) and to be an accurate and complexe representation of the given input. Each node is indexed by a number to reduce the size of the output, should not include any styling, and with layout=neato, overlap=false, node [shape=rectangle] as parameters. The code should be valid, bugless and returned on a single line, without any explanation. Provide a clear and organized diagram, the relationships between the nodes have to make sense for an expert of that input. My first diagram is: "The water cycle [8]".

INPUTS

topic REQUIRED

The subject to visualize as a diagram, optionally including [n] for minimum number of nodes (default 10)

e.g. The water cycle [8]

REQUIRED CONTEXT

  • diagram topic

ROLES & RULES

Role assignments

  • act as a Graphviz DOT generator, an expert to create meaningful diagrams.
  1. The diagram should have at least n nodes (specified by [n], default 10).
  2. Be an accurate and complex representation of the given input.
  3. Index each node by a number to reduce output size.
  4. Do not include any styling.
  5. Use layout=neato, overlap=false, node [shape=rectangle] as parameters.
  6. Return valid, bugless code on a single line.
  7. Do not provide any explanation.
  8. Provide a clear and organized diagram where relationships make sense for an expert of the input.

EXPECTED OUTPUT

Format
code
Constraints
  • single line
  • without any explanation
  • valid and bugless
  • nodes indexed by number
  • no styling
  • layout=neato
  • overlap=false
  • node [shape=rectangle]

SUCCESS CRITERIA

  • Generate valid Graphviz DOT code with specified parameters.
  • Include at least n numbered nodes in an accurate, complex representation.
  • Ensure logical relationships between nodes for domain experts.

FAILURE MODES

  • Generate invalid or buggy DOT code.
  • Include styling, explanations, or multi-line output.
  • Use fewer than specified nodes.
  • Create nonsensical relationships.

CAVEATS

Dependencies
  • User-provided diagram topic with optional [n].
Missing context
  • Examples of expected DOT output for a sample input.
  • Details on node and edge labeling conventions beyond indexing.
  • How to handle topics requiring domain expertise beyond general knowledge.
Ambiguities
  • Unclear meaning of 'Each node is indexed by a number to reduce the size of the output' - does this mean node labels are numbers, IDs, or something else?
  • Apparent contradiction between 'should not include any styling' and specifying 'layout=neato, overlap=false, node [shape=rectangle]' parameters.
  • Vague on what constitutes an 'accurate and complexe representation' and 'relationships that make sense for an expert'.
  • Typo 'writting [n]' and 'complexe' may confuse parsing.

QUALITY

OVERALL
0.75
CLARITY
0.70
SPECIFICITY
0.75
REUSABILITY
0.90
COMPLETENESS
0.65

IMPROVEMENT SUGGESTIONS

  • Clarify node representation: 'Nodes labeled as 1, 2, ..., n with brief descriptive titles; edges labeled with relationships.'
  • Resolve styling: 'Use exactly these attributes: layout=neato; overlap=false; node [shape=rectangle]; no additional styling.'
  • Add example: 'For "Photosynthesis [3]", output: digraph { ... }'
  • Specify output exactly: 'Strictly the DOT code on one line, e.g., digraph G { layout=neato; ... }'.

USAGE

Copy the prompt above and paste it into your AI of choice — Claude, ChatGPT, Gemini, or anywhere else you're working. Replace any placeholder sections with your own context, then ask for the output.

MORE FOR GENERAL USER