Improve AI Quick Start
This guide covers setting up the Improve AI Tracker/Trainer and SDKs to track item interactions and rewards, and train updated models.
For professional integration services, please contact Konrad Wiecko.
Deploy the Tracker/Trainer
The Improve AI Tracker/Trainer is a scalable stack of serverless components that runs on AWS under your full control.
The Tracker/Trainer provides three primary functions:
- An HTTPS endpoint for tracking item interactions and rewards from client SDKs.
- A store of logged item interactions and rewards on AWS S3.
- Scheduling and configuration for one or more trainers to train updated models.
Fork the Repository
The Improve AI Tracker repo is here.
Install the Serverless Framework
$ npm install -g serverless
Install NPM Dependencies
$ npm install
Configure Tracker and Model Training
$ nano config/config.yml
Edit the organization and project name. AWS resource names depend on these values and must be globally unique.
organization: acme
project: demo
Configure the models to train
models:
offers:
config:
feed:
search-rerank:
Deploy the Tracker/Trainer
Deploy the tracker/trainer stack to a new dev stage in us-east-1
$ serverless deploy --stage dev
Deploying improveai-acme-demo to stage dev (us-east-1)
✔ Service deployed to stack improveai-acme-demo-dev (111s)
endpoint: https://xxxx.lambda-url.us-east-1.on.aws/
The output of the deployment will list the track endpoint URL like https://xxxx.lambda-url.us-east-1.on.aws. The track endpoint URL may be used directly by the client SDKs to track decisions and rewards. Alternately, a CDN or proxy may be configured in front of the track endpoint URL for greater administrative control.
Model Training
The deployment will create a models S3 bucket in the form of improveai-{organization}-{project}-{stage}-models. After each round of training, updated models are automatically uploaded to the models bucket.
The models bucket is private by default. Make the /models/latest/ directory public to serve models directly from S3. Alternatively, a CDN may be configured in front of the models S3 bucket.
Model URLs follow the template of https://{modelsBucket}.s3.amazonaws.com/models/latest/{modelName}.{mlmodel|xgb}.gz. The Android and Python SDKs use .xgb.gz models and the iOS SDK uses .mlmodel.gz models.
Note: Until some decisions have been tracked, model training will fail. This is expected behavior.
Integrate a Client Library
Integrate a client library to make decisions and assign rewards.
See their individual documentation to get started:
Recent Posts
Improve AI 8.0 - Contextual Multi-Armed Bandit Platform for Scoring, Ranking & Decisions
We’re thrilled to introduce Improve AI 8.0, a modern, free, production-ready contextual multi-armed bandit platform that quickly scores and ranks items using...
Simple Re-Ranking of SQL Queries with Machine Learning
In this tutorial, we will demonstrate how to use the Scorer and RewardTracker classes to update a ‘score’ column for a number of products in a ‘products’ tab...
Making Decisions with Ranker
In this tutorial, we’ll walk through how to use the Ranker class to make decisions, specifically choosing a discount to offer from a list of discounts. We’ll...
Optimize Any Python, Swift, or Java Object with Reinforcement Learning
Improve AI is a machine learning platform for making apps self-improving, meaning they optimize their own data structures and variables to improve revenue an...
Self Improving Apps: The Origin of a Radical Idea
I’ve been working on Improve AI for many years, but by 2017 the idea had begun to gel enough that I was ready to talk about it.
Improve AI - Easily Optimize Your App with Reinforcement Learning
Optimize and personalize your apps with fast AI decisions that get smarter over time. Decisions are made immediately, on-device, with no network latency. Th...
The NEW 20 lines of code that will beat A/B testing every time
In 2012, Steve Hanov wrote the popular and controversial blog post “20 lines of code that will beat A/B testing every time” that brought the previously acade...