-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Semantic Graphs for Interoperability between Websites and AI Assistants #168
Comments
CC @frankelavsky who works on visualization accessibility and created data navigator. |
I love the idea of using a graph structure to provide access to semantic information about e.g. charts. Two notes
|
There is an ongoing discussion over in aria about how best to structure data visualizations, and I think that this idea you've proposed @AdamSobieski actually goes even further than charts and graphs, which I love. But in that other discussion I mentioned that it might be useful to generate some structure as-needed, since not all semantic relationships are known until the graph is created and someone interacts with it. That being said, I think that the core idea of providing a graph with as many known or possible semantic relationships is great and the use-case for AI + intelligent agents is solid. I'd love to see a working prototype of this! |
@frankelavsky, thank you for that hyperlink to that ARIA discussion. Yes, I am hoping to find general solutions which can also enable AI-assistant interoperability with 3D illustrations and, eventually, CAD/CAE, computer simulations, interactive fiction, and videogames. @domoritz, to your first point, an end-user might ask a question about a chart or a diagram to an AI assistant; its response might include an image with a selection of content made; then, developers might want to obtain, e.g., to provide the AI assistant with, information about those components in that selection, navigating "from a visual into the semantic graph". If points on components' visual representations are involved, one could utilize Did I understand your first point? To your second point, brainstorming, one means of providing runtime-dynamic knowledge graphs while also ensuring privacy with respect to the presence of interoperating accessibility technologies would be for documents' elements/components to be able to write their overriding, custom knowledge graphs into a browser-held lookup table. For example, a custom element, var elem = document.getElementById('chart-123');
// build knowledge graph here
window.semantics.setDescription(elem, graph); Accessibility and AI-assistant technologies would then be able to interact with browsers, unbeknownst to webpages, to access and to read these lookup tables which map some elements/components to their custom knowledge graphs. Interfaces for accessing browser-held lookup tables should include synchronization constructs so that, for instance, webpages could request locks on such tables to create or update the descriptions of multiple elements/components before releasing those locks. var elem = document.getElementById('chart-123');
// build knowledge graph here
window.semantics.open();
window.semantics.setDescription(elem, graph);
window.semantics.close(); Browser-held lookup tables could protect privacy about the presence of accessibility or AI-assistant technologies while allowing these technologies to:
It would prove difficult to guarantee privacy about the presence of accessibility or AI-assistant technologies while allowing these technologies to:
So, if these capabilities for interacting with documents' elements/components were desired to be made available, a user permission might be required. |
Ok. I revised the initial post based on the feedback thus far. This new revision also broaches including graph updates – diffs or deltas of knowledge graphs – as first-class objects. As a feature, this would simplify updating components' descriptions when only small subgraphs changed, e.g., in response to a component's attribute's or property's value having been modified. In the event of such an update to a component, it would only need only to send a small graph-update object rather than needing to re-create and send its entire modified knowledge-graph description. |
Introduction
Semantic Web technologies could serve as a bridge or glue between websites and interoperating AI assistants.
Use Cases
It would enable accessibility scenarios for end-users to be able to use natural language with interoperating AI assistants to ask questions about, to engage in dialogues about, and to interact with documents' components (e.g., images, animations, videos, 3D graphics, and charts).
Use cases of interest also include using interoperable AI assistants as natural-language user interfaces for:
Objectives
By using Semantic Web technologies:
Capturing Components' Visual Representations
Interoperating multimodal AI systems could request and receive visual representations of Web documents' components to answer questions about and to engage in dialogues about them.
Navigating from Visual Representations to Components
An end-user might ask a question about a chart or a diagram to an AI assistant; its response might include an image with a selection of content made; then, developers might want to obtain, e.g., to provide the AI assistant with, information about any components in that selection, navigating from visual representations into semantic graphs describing components.
If points on components' visual representations are involved, one could utilize
elementFromPoint()
orelementsFromPoint()
. For 3D-graphics scenarios, there are techniques involving raycasting.Describing Components
To enhance Q&A and dialogue about Web documents' components, pertinent data and functionalities could accompany their captured visual representations.
With respect to describing Web document' components, alongside visual representations, one could additionally provide sets of components':
A useful model to consider is that of a semantic graph of interrelated components. Components could be subcomponents of one another, contain one another, be parts of one another, or be interrelated in other ways.
API Sketch
There are many possibilities with respect to JavaScript APIs and object models for using semantic graphs.
For a list of JavaScript libraries, see: https://rdf.js.org/ .
Here is a sketch of an API and object model, expressed using TypeScript:
Examples
Example 1
This example shows constructing and storing a knowledge graph about a custom chart element.
Example 2
Example 3
Ontologies
The ontologies sketched, above, are intended to be placeholders for illustration purposes.
Charts, for instance, can have more features than semantic classes, natural-language descriptions, data, relationships to their data points, and invokable functions for interaction. Projects like Vega and Data Navigator indicate that charts can also have readable and writeable properties as well as other subcomponents including signals, scales, projections, axes, legends, and marks.
Graph Updating
The second example, above, shows that semantic diffs or deltas could be used to efficiently update components' knowledge-graph representations, e.g., in the event that a component's property's value changed.
There is an interesting relationship between semantic diffs or deltas and SPARQL's DELETE/INSERT operation.
See, for example:
and:
Protocols
Semantic Web technologies could be utilized to define communication protocols, these including sets of message classes, where individual messages would be semantic graphs capable of being validated.
Webpages and AI assistants initiating interoperation could, then, negotiate between (versions of) communication protocols with which to recognize and validate messages. Approaches like these would enable the simultaneous availability of different (versions of) communication protocols between websites and AI assistants.
Example 4
Inspired by the Web Messaging API, perhaps communication channels could be opened between websites and (browser-integrated) artificial-intelligence assistants for specified protocols in a manner resembling:
Semantic protocol definitions could be used to constrain and secure communications. In addition to defining message classes with which to validate messages, protocol definitions could specify rules (including time-based), valid sequences of classes of messages, valid state transitions, and so forth.
In addition to both websites and artificial-intelligence assistants being capable of verifying messages and conformance with semantically-defined protocols, Web browsers, as a communication-mediating software, could be configured to verify their conformance with protocols as messages were exchanged.
Adapters
Interoperating artificial-intelligence systems needn't generate semantic-graph-based messages for websites directly. These systems might, instead, generate natural language, special strings, XML, JSON, or (Python) source code.
Software adapters would, as considered, accompany artificial-intelligence systems, mapping semantic messages and any captured multimedia for them to implementation-dependent prompt components and/or API calls while also recognizing, validating, and translating systems' implementation-dependent responses and actions intended for websites (e.g., navigations or invocations / tool uses) to semantic messages.
In this way, implementation-dependent APIs, which might version, could be abstracted over and websites would be able to interoperate with multiple, ideally all, artificial-intelligence assistants.
Development and Debugging
It could prove useful for Web developers to be able to obtain and explore components' semantic graphs when inspecting documents' elements via Web browsers' F12 developer tools.
More broadly, it could prove useful for developers to be able to log and/or to display on a timeline those semantic-graph-based messages exchanged between websites and interoperating artificial-intelligence assistants using F12 developer tools or IDEs.
Selections and Groups
It may be the case that selections and groups of multiple components should be capable of being formed and interacted with via natural-language user interfaces and that these selections and groups could also have semantic classes, natural-language descriptions, described data or file attachments, relationships to other things, readable/writeable properties, invokable functions or methods, and constraints.
Natural-language Search
In addition to navigating from components to interrelated components, e.g., to and through subcomponents, there are natural-language searches to consider. That is, artificial-intelligence assistants may be expected to be able to intelligently search for, retrieve, jump to, and select user-described contents in documents for subsequent Q&A, dialogue, or interaction.
See Also
Conclusion
What do you think about these uses of Semantic Web technologies for interoperability between websites and AI assistants?
Thank you for any comments on these ideas.
The text was updated successfully, but these errors were encountered: