Giter Club home page Giter Club logo

ux-ai's Introduction

UX-AI

Enabling websites to evaluate and enhance user experience with Artificial Intelligence

View this README in webpage form with a Demo

Table of Contents

Introduction

UX-AI provides the ability to strengthen user experience by intelligently inferring user behavior status given demonstrated page interactions. In realtime, the AI agent periodically classifies such behavior statuses as either distracted, engaged, idle, or rushed.

Our goal is for sites to leverage this valuable information to improve user experience during the browsing session.

For instance, once detecting that a user is rushed, a component containing contact information can be discretely presented before the user navigates away. See more use cases and examples here.

Most of the time, user behavior is classified as engaged, suggesting that the user is following along with the page as intended.

Don't worry, UX-AI does not save any observations of user behavior. No user-related data collected by UX-AI ever leaves the browser. Upon refresh or page close, all respective data UX-AI disappears.

Demo

View a live demo here.

Installation

First, make sure to link TensorFlow.js, the ML framework on top of which UX-AI's models are built.

<head>
    ...
    <script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs/dist/tf.min.js"></script>
</head>

Download UX-AI with npm

npm install ux-ai

or link the package with a <script> tag

<head>
    ...
    <script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs/dist/tf.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/ux-ai@latest/UXAI.js"></script>
</head>

Getting Started

If using a UI framework with Node.js, don't forget to import the package. This is not necessary if the package is imported via <script> tag.

// top of file
import UXAI from "ux-ai"

Instantiate a UXAI object, passing in an object of options.

const uxai = new UXAI({
    inferenceInterval: 10000, // ms between predictions, must be between 3000 and 10000.
    inferenceCallback: history => {}, // history is array of behavior status Strings
})

Note that behavior status classifications are more stable with a greater inferenceInterval.

Examples and Applications

Sign Out the user when idle for 5 inference cycles:

if (history.slice(history.length - 5).every((status) => status === "idle")) {
    signOutCurrentUser();
}

Trigger an auto-save before the distracted user forgets:

if (history[history.length - 1] === "distracted") {
    saveDocument();
}

Gauge session page interest after 10 inference cycles have passed:

if (history.length >= 10) {
    const interest = history.filter(status => status === "engaged").length / history.length;
    console.log(`Interested ${Math.round(interest * 100)}% of the time`);
}

Of course, these are just a few simple examples. Feel free to take UX-AI in whatever direction you choose, staying well within ethical boundaries.

Future Improvements

Observation and intelligent prediction/classification methods are always under further development, though often occurring outside this repository. UX-AI will automatically use the most recently published ML model, as it is loaded over the cloud.

License and Attribution

This project is released under the Apache 2.0 License. In your own derivations, significant changes should be stated and attributions should be maintained in the NOTICE file.

ux-ai's People

Contributors

blakesanie avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.