« The National Information Exchange Model | Main | Keeping Hip to New Tunes »

Using State Machines and Semantic Technology to Build Decision Assistants

I've often heard about decision assistants and form generation being an area where Semantic Technology can be used to implement a more effective solution. I often struggled to really understand why. Is the implementation faster? Is more functionality possible? Is it more easily maintainable? To answer these questions I decided to map out a design approach that uses a semantic technology and then see how it stacks up with the traditional approach. For the purposes of this example I'll choose a first aid response decision assistant.

So what does my first aid decision assistant need to do? Well in a nutshell it needs to help the user make a decision. The system will ask the user some questions about the incident and based on those answers the system will give a response or ask for additional information and so on and so on. Lets choose to model the system as a state machine with each node representing a point in the decision making process (For example, testing vitals). The arcs of the model represent what conditions or responses move the user to a different state (For example, irregular heart beat).

Let’s assume that we have accomplished the daunting task of creating an Ontology that maps out all of the states a first aid responder could be in for a given situation. A portion of which for treating a burn victim could look like:

example first aid ontology

The next step would be to apply attributes to each of the nodes detailing what information needs to be provided to the users at each state. For the top node you would need to tell the users how to determine what degree of burn it is. You would also need to define what information you need to collect from the user, in this case the degree of burn. You would need to tie the input of this information to an arc on the graph. If this Ontology were in a triple store (semantic database) you could query it to determine what state should you go to if you are currently in state X (node) and event Y occurred (arc). The triple store would return the next state along with the information that should be presented to the user and information that needs to be collected.

How does this compare to a traditional design? One way of doing a traditional design would be to create a bunch of web pages with information and forms that direct the user to the next appropriate page. This solution would definitely be faster. The functionality in this simple example would be the same. The only disadvantage of this approach comes in when you walk about maintenance and that would be minimal. Down the road if I wanted to add a new state or change the state change conditions I would have to add a new web page and alter the content in one or many pages, especially in a larger model. The chance of missing the adjustment of a link or event would be high possibly causing quality issues. In this simple example the traditional approach seems to be the better design.

This example highlights the reasons why Semantic Technology provides little convincing arguments for adoption in an isolated project. But what if I’m running a website like WebMD and have a boat load of information about the medical field. Let’s say I already had a repository of lessons learned and had structured those using semantic standards. One of the fields in the model tied lessons to a step in a process related to first aid. With very little work I could add to my query for a given state, a check for relevant lessons learned.

Now let’s imagine that “treat for shock” was a common step in numerous first aid procedures with common things that must be told to and collected from the user but with different next steps. In Semantic Modeling all you would have to do is create a “shock treatment” parent class with one set of information on how to treat for shock followed by making a “hypothermia shock treatment” and “broken bone shock treatment” subclasses with different next steps that can occur. Now if I have a lesson learned tied to treatment for shock then it can be inferred that it ties to subclasses as well while only having to maintain one actual link.

To accomplish this with a traditional approach there would be a large amount of linkages and repeat data I would have to worry about entering. When making changes there could potentially be tons of data I would have to change in many pages. Not so simple anymore.

So with this broader vision in mind we can again compare to a traditional solution. The semantic approach would likely be faster because information would not have to be duplicated for similar areas and links between relevant information would not have to always be explicitly stated. The traditional approach might be able to have all the same functionality a semantic solution would provide but as the complexity of the system grows it would take exponentially more time to implement imposing a resource availability limit to functionality. Maintenance might have only been a little better with a semantic tech approach in the small example before, but it leaves the traditional approach in the dust for complex systems.

The benefits of a semantic approach increase as system complexity and available information increases. Keep this in mind when you consider whether or not semantic technology if right for you.

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)