10 November 2020

DadenU Day: NodeJS NLP and Grakn


Over the last few months we've been looking at alternative to Chatscript and Apache Jena for chatbot development. We really like the chatbot-knowledge graph architecture, but we've found Chatscript too idiosyncratic for our purposes,  and lacking any solid scripting/programming capability, and Jena a bit buggy and limited.

On the Chatbot front we've had a play with all the standard offerings, all Machine Learning (ML) based, including Dialogflow, Microsoft LUIS, RASA, IBM Watson etc. In most cases it wasn't the performance as such that we found wanting but rather the authoring. All of them seemed very fiddly, with no proper "authoring" support (just coding or tables), and in several cases the intent-pattern-action grouping that is the core of the ML part was split over multiple files so authoring was a real pain (with RASA some people were even writing their own Python pre-processors so they could work with a more logical layout that then spat out the RASA format).

For the knowledge graph Neo4j looked a very good solution, looks fantastic and lots of capability. It doesn't have a "pure" semantic triples model, but through the neosemantics plug in it would read out Turtle files and work more like a triples store. But we then ran into deployment issues, with the plug-in not available on the community edition, the server hosting need certificates for clients as well as server, and the hosted version being very expensive as you're billed all the time the server is up, not just when used. We might come back to it, but at this stage the challenges were too great.

So our front-runners have ended up as NodeJS for the NLP side of the bot, and Grakn for the knowledge graph/triplesbase, and DadenU gave me a day to play with them a bit more, and get them talking to each other!

NodeJS

NodeJS is the "server" form of Javascript. There's a lot to love about NodeJS - it's good old familiar Javascript and feels relatively lightweight - in the sense you're not weighed down with IDEs, modules for everything and lines of code that you just have to trust. There is though a very full module library if you want to use it, and its robust and eminently scalable.

For NLP there are libraries that include both takes on Machine Learning intent-action style chatbots and traditional part-of-speech NLP analysis. The nice thing is that you don't have to choose, you can use both!

For ML there is a wonderful library released into open-source by Axa (the insurance people) called simply nlp.js which takes a standard RASA/LUIS/Watson ML approach but everything is controlled by a simple single data object such as:

{
      "intent": "agent.age",
      "utterances": [
        "your age",
        "how old is your platform",
        "how old are you",
        "what's your age",
        "I'd like to know your age",
        "tell me your age"
      ],
      "answers": [
        "I'm very young",
        "I was created recently",
        "Age is just a number. You're only as old as you feel"
      ]
}

You can have as many as you want, spread these over multiple files, and having everything in one place makes things dead easy.

Then there's another library called Natural from NaturalNode which provides Parts-of Speech Tagging, stemming and other NLP functions. Adding this to the bot meant that I could:

  • Use Natural to identify discourse act types (eg W5H question etc)
  • Use Natural to extract nouns (which will be the knowledge graph entities)
  • Use Natural to do any stemming I need
  • Use Axa-NLP to identify intent (using "it" and a dummy word in place of the noun) and pass back the predicate or module needed to answer the question
  • Assess NLP confidence scores to decide whether to get the answer from the knowledge graph (if needed) or a fallback response.

Grakn

Grakn is a knowledge graph database which you can install locally or on the cloud. Most of it is open source, just the enterprise management system is paid for. There is a command line database server (core), and a graphical visualiser and authoring tool (Workbase). 

With Grakn you MUST set up your ontology first, which is good practice anyway. It is defined in GRAQL, a cross between Turtle and SPARQL, and which is very readable, eg:

person sub entity,
  plays employee,
  has name,
  has description,
  has first-name,
  has description,
  has last-name;

Data can then be imported from a similar file, or created programmatically (eg form a CSV) - and in fact the ontology can also be done programmatically.

$dc isa product,
    has description "Discourse is Daden's chatbot and conversational AI platform which uses a combination of machine-learning, semantic knowledge graphs, grammar and rules to deliver innovative conversational solutions.",
    has benefit "Discourse seperates out the tasks of language understanding from content management, so clients can focus on information management, not linguistics",
    has name "Discourse";

With the data entered you can then visualise it in Workbase and run queries, visualising the data or the ontology.


Interfacing NodeJS and Grakn

Luckily there is a nice simple interface for NodeJS to Grakn at https://dev.grakn.ai/docs/client-api/nodejs. This lets you make a GRAQL call to Grakn, retrieve a JSON structure with the result (often a graph fragment), and then use as required.

const GraknClient = require("grakn-client");

async function graql (keyspace, query) {
const client = new GraknClient("localhost:48555");
const session = await client.session(keyspace);
const readTransaction = await session.transaction().read();
  answerIterator = await readTransaction.query(query);
const response = await answerIterator.collect();
await readTransaction.close();
await session.close();
client.close();
return(response);
}

(Re)Building Abi

So I think I've got the makings of a very nice knowledge graph driven chatbot/conversational AI system, leveraging Machine Learning where it makes sense, but also having traditional linguistic NLP tools available when needed. The basic flow is an extension of that presented above:

  • Use Natural to identify discourse act types (eg W5H question etc)
  • Use Natural to extract nouns (which will be the knowledge graph entities, we can do our own toeknisation for compound nouns and proper names)
  • Use Natural to do any stemming I need
  • Use Axa-NLP to identify intent (using "it" and a dummy word in place of the noun) - typically the predicate needed of the noun/subject entity in order to answer the question, or a specialised module/function
  • Make the Graql call to Grakn for the object entity associated with the noun/subject and predicate
  • Give the answer back
Of course having a full programming language like NodeJS available means that we can make things a lot more complex than this.

As a test case of an end-to-end bot I'm now rebuilding Abi, our old website virtual assistant to see how it all fares, and it it looks good we'll plug this new code into out existing user-friendly back end, so that chatbot authors can focus on information and knowledge, and leave Discourse to look after the linguistics.










9 November 2020

A 3-Dimension UX Analysis of VR

 


Christian Schott and Stephen Marshall of the Victoria University of Wellington have quite a nice paper out in the Australasian Journal of Educational Technology, 2021, 37(1) and on open access at https://ajet.org.au/index.php/AJET/article/view/5166/1681.

Coming from an Experiential Education (EE) perspective they draw on a UX model by Hassenzahl and Tractinsky (2006) which consists "of three facets guided by a positive focus on creating outstanding emotional experiences, rather than on adopting a mostly instrumental, task-oriented view of interactive products, which is a core criticism of traditional HCI." 

  • "The first facet responds to this criticism of traditional HCI  and  is  termed  beyond  the  instrumental.  It  incorporates  aesthetics,  a  holistic  approach,  and  hedonic  qualities as features of the user experience. "
  • "The second facet builds on affective computing and extends emotion and affect to the user through positivity, subjectivity and the dynamic of antecedents and consequences. "
  • "The third facet is the experiential, which emphasises situatedness and temporality, and is characterised by user experiences that are complex, situated, dynamic, unique, and temporally-bounded".

The research used a VR experience of a Fijian island being developed to help better understand tourism economics on a Pacific Island, and the experimental subjects were Tourism Management students.

The UX evaluation identified 8 clusters of responses which map onto the three evaluation dimensions as shown above are were:

  • Sense of Place
  • Sensory Appeal
  • Natural Movement
  • Learning Enrichment
  • Comprehensive Vision
  • Hardware Concerns
  • Screen Resolution
  • Hyperreal Experience
  • Motion Sickness

Pity that Agency wasn't on there, and it would be interesting to see how a 2D/3D evaluation of the same experience would change the ratings and clusters give.

The authors conclude that "The evolution of VR technology is increasingly enabling high fidelity and motivating EE learning activities to be offered at a relatively low cost, particularly when the logistical, resourcing,  and  ethical  issues  of  alternative  approaches  are  considered. The nuanced  analysis  of  the  identified  positive  and  negative  themes,  through  the  lens  of  Hassenzahl  and  Tractinsky’s  (2006)  adapted  three  UX  facets,  has  provided  valuable  albeit  indicative  guidance  where  to  concentrate refinement efforts. However, it is also evident that a great deal of further research on the user experience  is  required  to  extend  our  understanding  of  full-immersion  VR  technology  as  an  important  opportunity for EE and higher education more broadly."

Nice paper, well worth a read, and the UX model and dimensions could be a useful one to bear in mind when looking at evaluating other 3D/VR experiences.

Hassenzahl, M., & Tractinsky, N. (2006). User experience - a research agenda. Behaviour & Information Technology, 25(2), 91-97. https://doi.org/10.1080/01449290500330331


2 November 2020

Time to Revisit 2D/3D?

The COVID epidemic is bringing a whole host of challenges to tutors and trainers in trying to deliver engaging teaching to students and staff – and in particular learning experiences which give the student a sense of context, place and shared experience. 

With on-site and classroom learning facing the greatest problems, many are naturally turning to remote teaching by Zoom (and similar), eLearning systems, or video. The diagram below briefly highlights key challenges with each of these - and we'll dive into more detail next week.



Whilst the uptake of headset-based virtual reality (HMD-VR) for both entertainment and training/education has been increasing in the last year or so (and Oculus sold out of the Quest headset early in the pandemic, and its new Quest2 had 5 times the pre-orders of the Quest1), the HMD-VR approach has its own challenges during COVID:

• Sharing headsets within a central location needs rigorous cleaning between use

• Posting/couriering headsets around remote students is costly and risky

• The cost of equipping every student with their own VR HMD is too expensive for most organisations/institutions.

And this is quiet apart from the challenges of the space to use them (although we’ve found the garden is good – at least in summer!) and the discomfort that some users feel.

So given the current situation shouldn't tutors and trainers be re-considering the 2D/3D approach to immersive learning – the Sims/Computer Game style where you operate in a 3D environment but the experience is delivered on an ordinary 2D screen – be that on a PC/Mac, tablet or even smartphone.

 


Such systems have the advantages that:

  • Compared to Zoom you place students in the environment and they can learn when they want and a their own pace.
  • Compared to eLearning they have more agency, being able to tackle tasks in a variety of orders and ways, and can even undertake collaborative activities.
  • Compared to video the students again have more agency, more ability to explore the environment, and content can be changed on a regular basis for minimal or no cost.
  • Compared to HMD-VR there are no headsets to buy, clean or distribute, and students can potentially use their own smartphones or tablets alongside their own laptops



Such 2D/3D approaches appear to have been forgotten and brushed aside in the race to the latest "shiny" VR experiences, despite the fact that whilst there is a lot of evidence comparing traditional eLearning to VR there is little that shows significant benefits from VR as against 2D/3D - and even some which shows a negative "benefit"!

So isn't it time to re-assess the 2D/3D approach (and perhaps find a better name for it!)?

And of course with Trainingscapes you can generate content for 2D/3D and VR at the same time, so if the situation changes and VR becomes more do'able (for some students, some of the time) then you'll be ready.


26 October 2020

Live - Virtual - Constructive - Autonomous? - A Framework for Training Approaches

In military and defence training circles there is a very commonly used acronym called "LVC". It stands for Live, Virtual , Constructive:

  • Live training: Real soldiers exercising against real soldiers on a training ground (and more broadly real soldiers practicing with real kit anywhere physical)
  • Virtual training: Real soldiers exercising against real soldiers in a simulation, probably (but not necessarily) digital (and again more broadly real soldiers practicing with virtual kit anywhere non-physical, would also cover Fortnite!)
  • Constructive training: Real soldiers exercising against so-called "computer generated forces" (CGF) with a simulator (think almost any traditional first person shooter)
When I first came across the model I struggled to remember what was what as so tried to put it into some sort of 2x2 matrix. The dimensions I eventually decided were:
  • Whether the training environment was the real physical world, or a digital (or other) simulation of it, and
  • Whether the opposition was being controlled by a human or a computer
One of the reasons I struggled was that nobody ever talked about the 4th space on the matrix - where you train in a physical environment but the opposition is computer controlled - which I've labelled Autonomous - hence LVCA. This is odd since this mode is not as far fetched as it sounds, fighter pilots have been practicing against UAVs for a while (although they may be remote-controller not autonomous), and there is some emerging work on mobile semi-autonomous robot targets (see https://www.youtube.com/watch?v=tlqMlPQpeAo)

So a complete matrix might look like this:


Now whilst emerging from the military and defence world it does seem to me that this LVCA gives  useful model for thinking about skills and process type training within the civilian world. Of course we need to think about "non-player characters" (actors? - who may represent clients, patients, customers or colleagues) instead of the "opposition", but I think the model holds up pretty well:

  • Live training: Students learning with real people/kit – e.g. role-play, practical hands-on
  • Virtual training: Students learning with real people via a simulator (e.g. Trainingscapes) (or maybe Zoom) (virtual role-play)
  • Constructive training: Students learning by interacting with computer controlled NPCs in a simulation
  • Autonomous training: Students learning by interacting with computer controlled physical entities (e.g. hi-spec mannequins)

As ever the key is that these approaches aren't competing, it's about finding the right blend of each given the subject, students, situation and budget in order to deliver the best possible training - and to help provide follow-up to keep that training fresh.

Hopefully this LVCA matrix will give you some fresh insights into the training you are trying to deliver, and perhaps open up some new ideas as to how it could be delivered for the benefit of your organisation and, of course, your students.







23 October 2020

Daden Newsletter - October 2020

 


In this latest issue of the Daden Newsletter we cover:

  • COVID19 and 3D Immersive Learning (still!) -  With COVID19 showing no signs of abating delivering corporate training and academic syllabuses out into 2021 remains challenging to say the least. Where do "traditional" approaches such as Zoom, eLearning and video fall short, what issues does a VR route face, and how can 2D/3D immersive learning improve the mix?
  • WebXR - With Facebook introducing stricter account and content controls on Oculus headsets WebXR offers a way to deliver VR content to VR headsets without needing to download anything. The same approach can also deliver 2D/3D content to an ordinary web browser. A promising way forward?
  • Plus snippets of other things we've been up to in the last 6 months - like starting work on a virtual hospital ward and experimenting with VR in the garden!

Download your PDF copy of the newsletter here.

We hope you enjoy the newsletter, and do get in touch if you would like to discuss any of the topics raised in the newsletter, or our products and services, in more detail!


19 October 2020

XR 2x2 Segmentation

(click image for better resolution)

Trying to unpick all the different emerging systems in the "extended reality" space such as Augmented Reality (AR), Mixed Reality (MR), Virtual Reality (VR) and then the "traditional" approaches such as 3D video games and virtual worlds can be a challenge, and we keep trying to find new ways to understand and communicate it.

In the graphic above we've tried to show the difference between the systems in terms of the access device and what they are trying to do to reality.

In one dimension we have whether the system is trying to completely replace what the user is seeing/experience - they only see the digital world, or whether it is augmenting it - adding new content into what the user otherwise sees as the physical world.

In the other dimension we have whether the system is accessed through a flat screen or a headset. The flat screen might be an ordinary PC screen, or a tablet or smartphone, whilst the headset might be a VR one or an MR one. A key point is that for the AR/MR solutions the access devices has some way of also showing the physical world which is being manipulated - via the phone camera for AR, or a transparent visor for MR.

These two dimensions then give us our four main use cases:

  • AR - which is overlaying reality but viewed through a (conventional) flat screen
  • MR - which is overlaying reality but viewed through a headset (visor)
  • 2D/3D systems like Second Life/computer games - which is completely replacing reality and viewed through a flat 2D screen
  • HMD VR - which is completely replacing reality and viewed through a headset (screen)
A key point is that the dimensions are about how we access and what we are trying to achieve. They are not about the software technology being used to generate the environments, or how its branded!

Let us know if you've any comments on this segmentation, and/or if you find it of use.




 


16 October 2020

Video: David's talk on Virtual Personas at AI Tech North

David's talk at AI Tech North on "Enriching Virtual Humans through the Semantic Web and Knowledge Graphs" is now available on video:



It's a 20min watch, and followed by another interesting session on analysis of language in social media use.