Visualising AI Embeddings in APEX

Image
" To deal with hyper-planes in a 14-dimensional space, visualize a 3-D space and say 'fourteen' to yourself very loudly. Everyone does it."     - Geoffrey Hinton , 2018 Turing Award winner. Within the wonderful world of  Generative AI , one concept that is all the rage is RAG, or  Retrieval Augmented Generation , which is an  AI framework that combines the strengths of traditional information retrieval systems (such as databases) with the capabilities of generative large language models (LLM s) . RAG's goal is to improve the accuracy, relevance, and timeliness of information  generation  - such as  documents, text and images -  by optimizing LLM output.  When creating a RAG system, it’s essential to store information in a format that a LLM can retrieve. This is where  data is converted into embeddings through a pro...

APEX and Graph Visualisation Libraries


I was recently asked by a client to create a quick POC in APEX to demonstrate how relationships between physical assets (in this case oil refineries) could be maintained using a graphical tool.  So I looked at a number of different Javascript graphing libraries and chose MXGraph from JGraph which seemed to have the most features and looked relatively easy to integrate.   It's worth mentioning that it is not Open Source and has a fairly hefty licence fee.

The requirement was to be able to show the process flow between units in a particular oil refinery with relationships representing the refined output from one processing unit and the input into another.  The idea is to build out quite detailed maps of the process flows within refineries and then use this with other 3rd party outage data to predict the affect on production and thus ultimately the change in price of crude and refined oil products.

The POC was quite simple, as you can see from the screenshot below, and was really just put together to show off what could be done with a graphing tool.  The refinery units and relationships are pulled from the DB and, at the point a graph is saved, all the positional and sizing data is saved as well.  It would need a lot of work to get it up to scratch but it was just starting point to illicit further ideas from the client.

Oracle Apex with MXGraph
Oracle APEX with MXGraph
I've uploaded the demo to apex.oracle.com  if you want to take a look.  There's an example refinery configuration for 'BP Texas City' (in case anyone notices it's not an accurate representation!).   I've disabled the 'Save' functionality as the demo doesn't allow for the creation of new refinery units, but does allow deletion, so each time you view it it should look the same.

I'm really interested to know what other uses people are finding for graphical interfaces within their APEX apps, as I often come across complex data sets that would benefit from being maintained graphically rather than using a form based approach.  Also does anyone have a particular preference for  a Javascript library?

Comments

Anonymous said…
I use Google Charts (it's free) to create GraphViz directed graphs.

https://developers.google.com/chart/image/docs/gallery/graphviz
Paul Brookes said…
Thanks, I'll take a look.

Popular posts from this blog

Visualising AI Embeddings in APEX

Oracle Select AI and APEX

Fun with Bubbles!