News:

BB code in posts seems to be working again!
I haven't turned on every single tag, so please let me know if there are any that are used/needed but not activated.

Main Menu

Explaining an AI-Chatbot the content of your Visio drawings

Started by Yacine, March 24, 2024, 03:05:13 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Yacine



Been playing lately a lot with AI. First ChatGPT, now Gemini from Google.
Among the exercises I asked it to write a functional specification from a P&ID. A task that I absolutely hate. So tedious.

And now the jump to Visio - why am I telling you this.
How to tell an AI Chat-Bot how your Visio drawing looks like.

I spent quite a few days on this and am not done yet, but it's sunday and no one around to listen to my silly hobbies.

Here are the options I investigated with more or less success

1) Bitmap
That's probably the fastest and cheapest way. Make a screenshot of your drawing - Gemini supports this function - and ask it to interpret it.
Quite good results actually.

2) List of parts and connections
This should actually be the most promising, but surprinsingly enough it took me quite a while to set up - almost - correctly.
The issue here is that connectors can connect to sub-shapes of the actual shape. So checking for the connections of the shapes does not return the desired information. I needed to iterate over the connections object of the page and travel for each found object to the top level one.
Probably the solution to keep.


Now two solutions that rely on the preparation work done previously with the connections object of the page.

3) Ascii-Art
Give the AI a graph as Ascii-Art to understand your drawing.
I would first not be willing to do that by hand and for bigger drawings with several correction iterations it is just not feasible.
Generating the Ascii-Art - probably feasible - but actually too difficult.
Using libraries -specifically from Python - yes, but I did not finalize my investigations of this.
The whole relies on the previous preparation work of finding the correct nodes and connections (of the parents).

4) SVG
That is a quite neat one. Other than Ascii-Art, that would be human readable, SVG describes the geometry of a drawing in a XML-similar language (not really readable). And as in my case the drawings would be much too large with several thousand shapes and sub-shapes, you would / should redraw (automatically) your drawing - based on the preparation work with the nodes and edges of option 2. Keeping only the relevant information in the drawing. E.g. rectangles with their tags, connected according to the original drawing.
This new simplified drawing is now small enough to be handled by the AI.
Export the new drawing as SVG, open it in a text editor and past the code in the prompt of your AI-Bot of choice.


----


As summary, I can already tell the following.
No matter what the input method is, with a free subscription and limited amount of tokens, the bigger your inputs get, the vaguer and useless the outputs will be. So for bigger drawings, consider splitting your drawings into smaller chunks as what to be described.
Yacine

Yacine

And since Those AI cannot only generate the actual content of your post, but formulate the post itself, here is a revised version of my first one:

I've been diving into the world of AI lately, exploring both ChatGPT and now Gemini from Google. One of the tasks I threw at them was generating a functional specification from a P&ID – a chore I absolutely loathe!

This experience sparked a question: how can I leverage AI to understand my Visio drawings? (Stay with me, there's a method to the madness!)

My Visio Odyssey

I've spent several days (it's Sunday, and no one else is around to indulge my tech tinkering) exploring different approaches:

1. Bitmap (Screenshot): The fastest and simplest option. Grab a screenshot of your Visio drawing (Gemini can interpret these) and see what it comes up with. Surprisingly, this yielded decent results!

2. Part & Connection List: This seemed like the most promising route, but it proved trickier than expected.  The challenge lies in connectors attaching to sub-shapes within a main shape.  Just checking connections for each shape wouldn't capture the full picture. I had to delve deeper, iterating through the page's connections and tracing them back to their parent objects. This might be the keeper!

Beyond the Basics:

Here are two additional options that build upon the connection list approach:

3. Ascii Art: This involves representing your Visio diagram as text-based art. While manually creating Ascii Art for larger or complex diagrams with multiple revisions is impractical, generating it with Python libraries might be feasible. However, this path remains unexplored for now.

4. Simplified SVG Export: This gets interesting! Unlike Ascii Art, SVG isn't human-readable (not exactly user-friendly). It describes the geometry of your drawing in an XML-like language.  For large diagrams with thousands of shapes and sub-shapes, redrawing a simplified version based on the connections from option 2 is key. This new, streamlined version focuses on essential elements – tagged rectangles connected as per the original. This smaller version becomes manageable for AI processing. Finally, export the simplified drawing as SVG, paste the code into your chosen AI assistant's prompt, and voila!

Key Takeaway:

Regardless of the chosen input method (with free subscriptions and limited tokens), larger inputs tend to yield vaguer outputs. To overcome this, consider chunking your Visio diagrams into smaller, more manageable pieces for AI interpretation.
Yacine

Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 205 (show)
Files included: 32 - 1207KB. (show)
Memory used: 1020KB.
Tokens: post-login.
Cache hits: 15: 0.00128s for 26,764 bytes (show)
Cache misses: 4: (show)
Queries used: 16.

[Show Queries]