Optimizing AI for immediate response in Smart CCTV
Schedule meetings magically with x.ai's AI assistant
1. x.ai a personal assistant
who schedules meetings for you
DATA ENGINEERING APRIL 2015 NEW YORK CITY VISIT X.AI TO JOIN THE WAITLIST
Optimizing data architecture design for
natural language processing
@alexpoon06
@xdotai
3. Pain Solution
Jane Alex Jane Amy@x.ai Alex
CC: Amy @ x.ai
“Amy, please set
something up for
John and I next
week.”
4. Product Characteristics
● Need quick response
● Supervised Learning requires large training data set
● # meetings scale linearly with # users
● 1 user meets with N people
● people share meeting places and company
5. Technical challenges
● Natural language understanding with extremely high
accuracy
● Natural conversation over email with people
● Complex data relationship
● Optimize for sparse data
● Speed of development and change
8. Picking a database
● Familiar technology
● Low initial maintenance
● Flexible schema
● Easy early scaling
● Reasonable production quality
9. Pros
● Schema-less
● Mongoose (Schema Control)
● Work out of the box
● Repliset scales reasonably well
● MMS provides good monitoring
Cons
● No joins
● Pain to do backup yourself
● DB level locking (Mongo v2.6)
● Cross datacenter is not great
● I don’t want to shard this
13. Assistant is a PERSON Assistant is an Attribute of
PERSON
Assistant is a PROFILE, a
separate and smaller entity
Modeling someone’s assistant
1st try 2nd try 3rd try
{
name : {.....},
nicknames : [String],
phones : [{Type: String}]
primaryEmail : String,
secondaryEmails :
[String],
title : String,
signatures: [String]
…...
}
{
name :
{
first : String,
last: String
},
primaryEmail : String
}
{
name : {.....},
nicknames : [String],
phones : [{Type: String}]
primaryEmail : String,
secondaryEmails :
[String],
title : String,
signatures: [String],
assistant :
{
name : {.....},
primaryEmail : String
}
…...
}
14. Dealing with schema changes
Issues
● Inconsistent character offsets
● Inconsistent time representation
● Improper sent date (yr 2026)
● Key info not saved
Fixes
● Recalculate character offsets
● Reconstruct time entities
● Recalculate timezone based on
context
● Filter out unsalvageable data