
You probably don't need AI/ML. You can make do with well written SQL scripts - passenger
https://threadreaderapp.com/thread/987602838594445312.html
======
gnicholas
My startup was approached by a corporate VC that wanted to make a strategic
investment. Based on the attendee list from our meeting, which included very
high up folks from the company, I felt good going in. They expressed interest
in our technology that makes reading on screen easier [1], but they were
surprised to learn that we didn't use machine learning to accomplish this.

I indicated that it was actually quite effective without ML, and that it was
easier to explain to users this way. They kept prodding around on the ML
stuff, and how we might be able to use ML to accomplish roughly the same
thing.

A week later they said that they were no longer interested because, although
they liked what our tech was able to accomplish, it didn't fit with their
investment thesis — which was all about ML.

My wife asked me why I didn't just make some stuff up and say we could do v2
using ML. Perhaps she was right.

1:
[http://www.beelinereader.com/individual](http://www.beelinereader.com/individual)

update: in response to feedback below, I edited the link to point to a page
with relevant content instead of our generic landing page. Lesson learned!

~~~
xevb3k
Can someone explain the dynamic that’s going on here? I somehow can believe
that VCs are so stupid to be purely hype driven, so what is pushing them to
make this their investment focus?

Do they just jump on every bandwagon in the hope that one of them might pan
out?

~~~
joewee
VCs raise money the same way startups do, only with more regulation. For that
bucket of money they likely presented a thesis for how they would used to
invest in the ML/AI wave. Investors have rights if the money isn’t used they
way they were told it would be.

VCs raise money from fund managers (sovereign wealth funds for example) who
also present a thesis to their stakeholders for how the money will be managed.

Depends on the timing but I think VC focus on ML is a good indicator of where
smart money thinks the money is going to be made. But there are a lot of
people that catch a trend in the tail in, I don’t think we’ve gotten anywhere
close to that for ML investments.

~~~
gnicholas
You make a good point about a VC's responsibility to stick to the plan they
sold their LPs on. This could explain a lot of group-think and myopia in the
industry.

But in this particular case, it was a corporate VC, investing their own money.

~~~
y_molodtsov
That's even worse for you case, I suppose. In case of a usual VC funds it's
about the returns, but corporate VCs also look for some potential synergy.
They probably were looking for some ML startups that they could utilize later.

------
didibus
What the article describes is called an "expert system" and is what AI in the
enterprise used to look like.

Basically, you try to capture the instinct of a great salesmen by formalizing
it into computer logic.

Often that's done with rules like in the article.

It works good, but has its limits. The finer reasoning of human judgement are
often not expressable, people don't know why they made that decision. Making
it hard to capture. And human also have their limits. Too many variables, too
much noise, too much data and they won't make the best prediction/decision.

That's when ML shines. Instead of trying to encode an expert's intuition,
instead you let the machine develop its own intuition, itself becoming an
expert through training.

The downside is it now similarly becomes challenging to formalize the
machine's intuition. Why it made a given choice is no longer easily apparent.

I do think expert systems still have value. Especially when you lack the
dataset to train a machine expert.

~~~
sverhagen
Newbie question: would you not design ML systems to be able to explain
themselves? Alike: hey, query planner, what's your query plan?

~~~
halflings
There is something close to what you're describing:

1) You train a complex ML model (say, deep neural net) to get the job done,
solve your problem with high accuracy.

2) When you want to explain one of your model's results, you train a simpler
more explainable model (say, linear regression) in the neighborhood of that
point, such that it is _locally_ similar to the more complex model. The task
is too complex to be explained by a linear regression model over all possible
inputs, but it often is simple enough around a specific point.

~~~
dmichulke
E.g., lime:

[https://github.com/marcotcr/lime](https://github.com/marcotcr/lime)

------
zitterbewegung
Companies have a large problem of having their data tucked away or
inaccessible to the stakeholders. When people talk about AI / ML what they
actually need is their data cleaned to the point where they can communicate to
their stakeholders. Also, all of the companies who sell AI / ML as consultants
are really good already at cleaning data.

When companies actually hire data scientists what they typically do is clean
data for a few months to a year . Then they interpret the data by probably
being able to perform linear regression. At that point the data is in a state
where it can be easily understood by those stakeholders and then they have
created value. Whether or not the linear regression or whatever model has been
learned may mean something. But, at the end of the day you need to tell
stakeholders how they can create value and guess what SQL and Bash will do 90%
of the job.

~~~
nkozyra
100%. What this all boils down to in 2018 is data. Data acquisition, data
cleansing, data filing, etc. But what else is there, now? You're going to
create a new, novel ANN network? Cool, can't wait to peruse your paper. Maybe
someday it's considered groundbreaking. Right now it's not solving immediate
problems. Immediate problems were solved with 1970s ideas + 2018's
infrastructure.

~~~
leblancfg
A word against hasty generalisation - just because you don't interact with it
on a daily basis doesn't mean it isn't being worked on elsewhere.

There is an increasing number of ML-first companies out there. They are
solving problems like object detection, portfolio strategy optimization,
medical diagnosis, etc. Things that are 100% _not_ possible to do with just
SQL and Bash, and much less expensive than to have humans run those tasks. In
those fields, these companies will outperform their competition on average.

I think it's smart for investors to look for in knowledge and talent in the
companies they look into. If there's AI/ML talent in the team, their value for
acquisition (acqui-hire) is higher.

If you want to solve problems for your existing company, you certainly don't
need AI/ML. You can tackle many, many low-hanging fruits with just SQL and
Bash.

If you want to build the kind of company that will be around in 30 years, you
need to have an ML-first mindset, and you probably need to start now.

~~~
Mahn
Maybe we could all just agree that AI and ML have their use cases, but they
are not necesarily a good fit to any and all computing problems
indiscriminately?

------
jrq
I thoroughly enjoyed this post, so maybe I'm biased.

I think AI is extremely overhyped and under performant. In fact, I think a
major strength of AI is founded in the technical ignorance of certain project
managers or decision makers. The type of person who doesn't appreciate the
simplistic elegance of sql+bash/cron for simple tasks is the person who will
bite a pitch for AI customer retention strategy. Customers are people.
Business is people. You don't need a rack of gpus to understand why sending
someone an email who has a saved cart is a good idea. It's common sense. It
doesn't matter if we can force machines through trillions of operations to
vaguely capture a customer pattern of a guy at a console can write it by hand
in five minutes.

(not always, I know, I work in finance so a lot of my business IS machines and
not people, but you catch my drift)

I'm pro-AI research, and anti-AI hype train. They're computers. They're
objects. They're not us yet. Consider the magnitude of the AI research market,
which is tens of billions, and compare that to what they are actually capable
of doing relative to human performance.

/rant

Maybe HN skews my perception on what the public tech enthusiast's perception
on AI is...

~~~
kevin_nisbet
I agree completely, at one of my previous employers, the CEO of the company
sent out an email, with a list of links, and said everyone should learn AI/ML,
and it would be important for the future products. And he gave a number of
examples of potential features that AI could achieve.

When I looked at it, every feature shown, could be more reliably delivered and
have a better customer experience through deterministic behaviour.

So I agree, I think AI has made certain technologies way better, but I see it
as a tool, and like any tool, it sometimes applies to the situation and
sometimes doesn't.

------
donatj
I almost took a "big data" data scientist job about a year ago with a local
company.

After talking to a number of their engineers, it became quite clear to me that
instead of a data scientist, they just badly needed a DBA / someone with
ownership and a complete vision of the data structure.

They had no foreign keys, poorly 'designed' indexes, and tons of redundant
tables with no rhyme or reason to them.

They'd organically grown their database with hardly any review. They did not
have big data, they just had a big mess. And wanted someone else to clean it
up.

~~~
adaml_623
I'll bet they found they got 10 times more applicants for a data scientist
role as opposed to a dba/sql/data engineer.

~~~
vazamb
But what's to point? You will get a lot of applicants from non-cs backgrounds.
Not only will they be unprepared for the job but also most likely very unhappy
with their tasks.

~~~
gowld
The point is that you can get paid more by calling yourself a data scientist
than a DBA, at the moment.

------
halflings
This could've been a valid criticism of people that use ML where it's not
appropriate, but it ended up being a bit of an irrational rant, and a
dishonest one too:

> I mean, why send a letter with breast pumps to a man that just bought a pair
> of sneakers? It doesn't even make sense. Typical open rate for most
> marketing emails is anywhere between 7 - 10%. But when we do our work well,
> we saw close to 25 - 30%.

How do you know what items are compatible to each other? Why only recommend
sneakers to somebody with sneakers, instead of also recommending sport
clothing?

Oh, I guess you could build some type of topology of all your shopping items.
But what about recommending soccer balls to people that bought soccer shoes?
You could also add that to your database, but now you also need a heuristic to
score item similarity: `category_matches * 10 + subcategory_matches * 5 +
color_matches * 2 + ...`

This is the whole point of ML. People have been building rule-based systems
built on "domain expertise" for ages, only to find that they are limited and
cannot compete with simple algorithms fed with enough data.

~~~
reacharavindh
But, that might be in the realm of SQL too. Find out what items were
frequently bought with the item that this customer bought, and send them as
recommendations.. Rule-based does not always mean that a user is sitting down
writing that tennis balls and tennis shoes are related items. Don't you think?

~~~
ju-st
Such a simple system would recommend many items that are frequently bought by
_everyone_ (like bread, toilet paper, batteries). You would have to weight the
items in some fancy way to get useful recommendations... And I have just
described the introducing slides of a applied machine learning university
lecture.

~~~
ashelmire
This article and thread gives the impression that it’s dominated by people who
don’t even have a rudimentary understanding of ML. If they think SQL is a
replacement for ML, I’m really not sure what they’re doing in this field. ML
is for making sense of data in a large number of ways beyond “hey let’s query
a database for some trivial information”.

~~~
reacharavindh
True. I don't think the OP or I deny that. The premise is that some
practitioners use ML as an overkill for things that are simple enough to be
solved by SQL.

------
sixdimensional
Well, we are in the peak of a wave of hype about AI/ML, maybe even just past
that peak. Many fundamental technological advancements in the field of AI/ML
have sort of coalesced together at the current time to form a strong feature
set that can be more broadly applied by a wider audience, not just those
hardcore computer scientists who invented the technology.

I've been in the thick of this previously, facing a complex rules-based engine
that did most of its incredible feats in the fraud detection domain using a
number of really complicated SQL queries. At the same time, I've used the
results of such queries combined together with machine learning and predictive
analytics, giving you the best of both worlds. Both have strengths and
weaknesses.

These are tools in the toolbox, and I think the adage "try to use the best
tool for the job" still applies. Sometimes, you use the tool you have and you
know, and all the more power to you if you can get the job done using that
tool. If you are a master of that tool (i.e. SQL in this case), you can often
push its capabilities very, very far.

That said, I think the best thing to do right now is try to separate the
signal from the noise regarding AI/ML and find what really works and what does
not. Then find how these new tools can either complement or replace previous
approaches. I think they work together quite nicely - and we see that
sometimes, for example, with AI/ML tools integrated close to SQL engines.

AI/ML has a place, and so does SQL. I will say, though, that I for one don't
want to be caught on the side of the discussion where I don't learn enough
about what is possible with AI/ML, and then get left behind. I think many of
my colleagues and professionals in the field and here on YC feel similarly.

Actually, I think even non-technical people feel the same way - the fear of
being replaced by AI/ML is higher than ever.

So, keep applying SQL and get that low-hanging fruit. But make sure to learn
the new stuff too, and add it to your toolbox.

~~~
treydey
I disagree that this is the peak of AI/ML. Companies are desperately looking
for PhDs in AI that can fulfill their business needs. I think we're about to
see a lot more applications of AI/ML.

~~~
oblio
Companies are also looking for "blockchain developers to fulfill their
business needs" :)

------
smsm42
But if you say "I'm going to use a bunch of shell scripts to parse logs" you
are boring. If you say "I am going to use groundbreaking ML/AI technologies to
transform big data into customer retention solutions", you are a visionary.

~~~
brootstrap
providing insights to your log data faster then ever before with machine
learning big data

------
euske
The biggest threat of AI is not its ability of taking jobs or exterminating
mankind, but the amount of distraction it creates.

When politicians say they improved the economy like 30%, nobody buys into
that. It's an overly exaggerated misleading political talk. But when some tech
gurus talk about how AI improved their profit 30% or something, everyone seems
to hop on. It's an effective marketing, for sure, but this is a worrisome
trend. The root cause of this is I think the lack of proper understanding of
fundamentals (and intellectual sloppiness). AI will continue to plague us on
this front, and I'm still not sure if the net gain is going to beat all the
distractions it created.

------
cup-of-tea
Yeah but non technical people who don't know what they are doing but for some
reason have money to spend just _know_ they want you to use machine learning
for everything.

One time at work I wrote a simple web app with a search box (just doing an sql
query, nothing fancy). One of the "higher ups" was impressed and decided to
flex their knowledge, pointing to the search box saying "and this uses nlp".
It was a damn sql query on a full text field.

------
kthejoker2
As someone who sells both of these services, I can only add that it depends,
and if you have a good dataset, it's trivial to write either one.

But once you start having to account for noise or seasonality or
autoregression or dynamic weights or non linear kernel spaces, pure SQL really
starts to fall down on the job.

~~~
rokhayakebe
Curious.

OP gave a few examples for Ecommerce where SQL will do fine. Can you give a
few where ML will do something otherwise impossible or harder with SQL?

~~~
firasd
Product Recommendations. Trending Items (Top items being sold this week as
opposed to last week, while filtering out items that are generally popular.)
Much easier with Elasticsearch than SQL
[https://www.elastic.co/blog/significant-terms-
aggregation](https://www.elastic.co/blog/significant-terms-aggregation)

~~~
collyw
That's not really ML.

~~~
jon_richards
If I were ever to make ML bingo, "That's not really ML" would definitely be on
it.

~~~
collyw
I see, so just how everything became "big data" a few years ago, now
everything is ML.

"Managing big data with MySQL" \- the syllabus mentions nothing of clustering
or sharing. Ten years ago that was just "using a database". I am getting to
old for the faddish nature of this industry.

[https://www.coursera.org/learn/analytics-
mysql](https://www.coursera.org/learn/analytics-mysql)

------
maltalex
While I see the author’s point, I fail to understand what any if this has to
do with SQL. The problem ML solves isn’t querying databases, it’s making
decisions. If a human came up with the idea “let’s lookup people X and send
them email Y” and it works, great. But a human made that decision, and SQL is
just a tool for making it happen. If you want to take the human out of the
loop, SQL won’t save you.

~~~
r3bl
I don't think you understand author's point.

His point is highlighted in the first tweet, in which the author appears to be
specifically annoyed by the potential founders and investors that can't
understand that ML isn't a good solution for all of the problems.

He then goes on and gives an _example_ of such problem by explaining a
shopping cart that doesn't actually need ML, but just some old-fashioned SQL.
He doesn't claim that SQL is a solution to _all_ ML problems, just this one.

~~~
dotmanish
(I'm not the parent commenter who you replied to, but I think I understood
what his/her point was).

Taking the shopping cart example: " _In a former life, I used to write SQL to
extract customer of the week. Basically, select from orders table where basket
size is the biggest._ "

The author decided that 'customer of the week' will be selected by 'biggest
basket size'. Not by 'biggest $ amount spent', 'fastest time from add-to-cart
to checkout' (and numerous other attributes or combination of them). This
decision (the "best attribute") was taken by a human, leaving a field open
where a combination of attributes could've resulted in overall better
_business outcome_ (how much did 99% of these retained customers shop for, in
$ value over lifetime?, etc)

This is possibly what the parent commenter is hinting at - this human decision
leaves a lot of optimization scope, where ML _could_ have helped.

------
ianamartin
A huge part of the "data revolutions" that we've seen in the last few decades
really has nothing to do with data and everything to do with process.

Data Warehouses changed the way people and companies do data. They expose all
kinds of things that were never available before. It was magic!

No. It wasn't. Not that Data Warehouses are bad or ineffective. But it's a lot
like the problem you face when you observing something changes it. The work
you have to go through to build a real data warehouse is that you have to get
disparate parts of an organization to codify process. Data warehouses don't
model data. They model processes.

The mere fact of forcing the company to pin the process is often more
beneficial than the warehouse itself.

The same thing goes for ML and AI. The only way to extract features is for
them to actually exist. And that means the data needs to exist in a certain
form, and there's a human process that leads to that. Absent that, it's pretty
useless.

I cut my teeth on SQL, and it's a big part of my professional career. I think
it's great. It's one of my favorite languages, and it does a lot that maybe a
lot of people don't know about.

But this title and the content are really pretty garbage. Anyone who thinks
that good SQL can do what good AI/ML can do is really misunderstanding both.

------
cyberomin
Hi, I'm the guy that wrote the tweets. Let me know if you have any other
questions. I'm happy to answer any question.

------
elchief
eh. I built a lead gen system at a fortune 1000. The heuristic SQL version
brought in 10M a year. The random forest version brings in 100M a year. It saw
things we didn't

~~~
kgdinesh
can you elaborate?

~~~
elchief
Built a lead generation system. Looks at searches on our site and picks out
the best people for our sales team to call.

Set up a bunch of rules created by the sales team. Tweaked it over months.
Made money

Then used real sales data tied back to search history and built a machine
learning model. It found new patterns that the sales team hadn't thought of,
and performs much better

------
smcl
"Set this as a CRON that fires at 2AM everyday, period with less activity and
traffic. People wake up to emails reminding them about their abandoned carts"

Hah I wondered why I got so many notifications in the middle of the night. Now
I know that it's from people who think they're helping - not realising that it
actually sours my opinion on their company/product.

~~~
esrauch
What time would be better?

~~~
smcl
6am or later? Even if they played it safe with the usual business hours of 9-6
in the users locale (since companies generally know your location) it’d be
fine. I'd be relatively forgiving for a US company who doesn't really know
where I live sending me stuff at these times - they've no way to know what is
"sensible". However I was getting pestered by Vodafone in my country at 2am
nearly daily for a while

~~~
dzmien
This is why I set "do not disturb/alarms only" when I set my alarm before
going to bed.

------
epilogue
The writer seems to describe very basic data mining in some cases, which in
itself is a form of AI/ML, but then other examples have no relevance to
needing to use AI/ML at all.

If their data is already clean enough for SQL queries to work reliably and
they are familiar with the SQL syntax, why not look into things such as DMX in
MSSQL to make predictions on what these customers are likely to want to buy.
This solves the whole marketing breast pumps to a man who bought sneakers
scenario, while it also providing more personalized recommendations.

If your current technique is to send an email about sneakers to recent sneaker
purchasers, do you really thing they are in the market for another pair?

Sure, it might not make sense to implement a deep learning neural network just
to send something like a semi-personal marketing email but their are so many
varying levels of AI/ML that seem to get ignored in favor of the flavor of the
month Tensorflow/IBM Watson/Whatever else. Quite frankly, the whole thing just
comes across as a very closed minded rant from someone who isn't interested in
exploring what new technologies are capable of.

------
et2o
Good points but really a false dichotomy. The purpose of AI and machine
learning is to find patterns in data that aren't simple heuristics like this.

------
free652
The problem with SQL is that eventually you will end up with thousands of SQL
scripts. Have you ever tried to debug a 100k SQL? It’s a nightmare. Some of
the scripts used to be simple, but got too complicated due to new requirements
like this article doesn’t mention how he would deal with multiple time zones,
currencies, different type of customers, multiple promotions for repeat
customers and etc.

~~~
QuantumAphid
Are you suggesting that AI/ML makes those new requirements go away? Or that
managing those requirements becomes easier because AI/ML software figures it
out?

------
40four
I don't get this article at all. The author does not really back up their
argument with any examples of ML. What in the world does common marketing
practice & seemingly basic SQL queries have to do with AI/ML? What am I
missing here? To me, this just sounds like a "Get off my lawn" type of rant.
"Why do we need the newfangled AI when we still have good ole' SQL &
bash!(waving fist in the air)"

On the other hand comments are talking about hiring data scientists for months
if not a year or more (yikes!) To clean data & _wait for it_ ... perform
linear regression. To me this sounds like a great application of machine
learning. Couldn't someone train some models to clean the data, then do one of
the things ML does best, linear regression, in a fraction of the time the
human data scientists could do it in?

~~~
ashelmire
Data cleaning is reeeally messy. It requires a lot of training data to get a
system that does even a bad job of it automatically. So you still end up
needing a lot of clean data, and getting the system to that point probably
isn’t worth it if you’re not one of the biggest tech companies (you can spend
time creating a system to clean the data or just clean the data). But your
other points are spot on. This article is garbage.

~~~
40four
I see what you're saying about cleaning the data. This is something I'm very
unfamiliar with, so good to know!

Yeah I think the article is garbage too, makes me wonder why it gained so much
traction? The argument/ topic are not developed at all.

I guess the point they were going for is there are people who want to use ML
because it's 'trendy' or something, and simpler solutions would suffice. I
could see that being true, but this article is BAD. I hate seeing low quality
articles get rewarded.

------
threeseed
Who on earth are these people describing ?

I've never heard of anyone hiring expensive Data Scientists, spinning up
Spark/H2O clusters, building a data lake, doing a database offload to S3/HDFS
all for a "select from orders table where basket size is the biggest" query.

AI/ML doesn't even work like this. It's simply not designed for giving 100%
accurate answers to highly structured queries.

~~~
hahla
These people are describing 99% of the Fortune 500 companies who have no idea
what AI means other than hiring a team of data scientists that will hopefully
solve all of their problems in the name of technology.

~~~
threeseed
I've worked for half a dozen Fortune 500 sized companies within Data Science
teams.

Nobody, repeat nobody is spending tens of millions on Data Science programs
for answers to problems that a Data Analyst could already do.

If you know names please be specific but what you are saying is a bit
ridiculous.

------
sercant
Although the author has fair results with his given case, the author is
mistaken the use of AI/ML in such scenario. In the example, they make the
decision of "We should send emails to people who did 'case a'.". This is a
pure 'instinct' by the decision maker. But in AI/ML case, this would be learnt
from the feedback of the click rates etc. Naturally, decision maker becomes
the AI, which actually can find interesting scenarios and exploit these
behaviours to increase the desired outcomes.

------
kriro
The article doesn't convince me.

It can be summarized as "don't overengineer" but quite frankly these days
ML/DL is so easy to apply from a technical point of view (taking care of the
data or fully grasping the things you apply is another issue) that I don't see
why one wouldn't at least try to use it. I don't see why a ML-algorithm
couldn't grab the first name for example. I mean if your argument is "just use
SQL" my counterargument is "I agree but I can just try ML as SQL on steroids".
If you already have well curated data that you run the SQL on you might as
well play around with it in an ML setting. "Customer with largest basket"
might work fine but why not try to prod the data to check for other
interesting things. Same for the POD example. Why not at least try to see if a
combination of variables might yield more interesting results than the simple
stuff that might work. Occams razor should not cut out all curiosity :D

I like the overall idea of "try the simple stuff first" but quite frankly
these days you can run very good ML with pretty much all it takes to do SQL
queries (assuming you train your models on a separate machine).

~~~
soVeryTired
The right questions to ask are "what is the incremental benefit I can get from
ML over a simple rules-based system? How much does that added complexity
cost?".

Costs include technical debt, increased maintenance, general opacity, and the
risk that the complex model runs amok and does something stupid (which is more
common than you might think).

Sometimes those costs are justified, sometimes they aren't.

------
reilly3000
This is the opposite of AI use cases in marketing. You are declaring a
specific timeframe for your message delivery. That is not how a marketer
should deploy AI. I haven’t been in any pitch meetings since AI assclownery
took hold so I can’t comment on how the term is being abused. What I can say
is that a model that used AI would take every parameter it could about each
customer and determine the optimal time to sent an email to get a conversion.
The only inputs the marketer should provide is raw historical data with clear
parameters like order value, order items, estimated revenue, buyer
classification, a stream of subsequent etc and date, and the model should
solve for the correct timestamp to send the follow up message. I don’t think
the AI is writing the message yet, and I don’t think you need a neural net to
do a decent job at solving for the right datetime to send. I do think the
approach I described would get superior conversion rates than a rule, cost
more to make than that rule, and definitely demand a decently huge dataset to
add much value.

~~~
nostrademons
I think the main point of the article is that 99% of the value in that is in
a.) sending the follow-up email _at all_ (which just takes a cronjob) and b.)
identifying which _customers_ to send that follow-up e-mail to (which just
takes a SQL query). While it's probably nice to try and predict the ideal time
to send it, the gains you get from that are marginal compared to steps a & b,
which many companies aren't even doing today.

------
flyingcircus3
I like the notion that AI is impossible to wrangle into a neat box, because it
has always described the cutting edge of technology. Image manipulation, audio
synthesis, and other techniques we're once considered artificial intelligence.
But now that they are far better defined and understood, they essentially have
fallen out of the nebulous sphere of sci-fi tech.

------
master_yoda_1
In a layman term the difference between sql and ml is, ml predict things and
sql just tell you things.

Things has changed and ml now a days can do far better things. If the
competitor is using ml and making gain, then one should also catch up as soon
as possible.

SQL analytics was past, predictive analytics is the future. ML can do more
than predictive analytics for you :)

~~~
tejasmanohar

      SQL analytics was past, predictive analytics is the future
    

You're over-simplifying things. SQL is here to stay, regardless of how big ML,
which I'm very bullish on, becomes. Start with the simplest approach and try
alternatives when/if it doesn't work. Simply jumping to "predictive analytics"
is silly.

~~~
master_yoda_1
I agree sql is here to stay. For ml you need data and sql is best place to
store data. You can use various sql queries to get feature for ml system.

------
kexx
Most people forgets IT is the same as any other industry with marketing plots,
promotions pretending to be articles, etc. Before AI/ML and big data, we had
cloud (which is basically a server), web2.0 (it does not even make any kind of
sense technologically), ajax (how was that a new thing in any way?) or really
long time ago NETWORK COMPUTER (this one kinda hilarious, oracle tried to sell
dumb terminals as future -
[https://en.wikipedia.org/wiki/Network_Computer](https://en.wikipedia.org/wiki/Network_Computer),
and nowadays Google tried the same thing with chromebook). I feel it's the
same thing as in every 5 years, healthy food is different. Do you remember
those days when fat was deadly poison?

------
sbhn
You can even make do with plain old client side JavaScript object arrays.
After looking at your site, I can see your company has very good presentation
skills. It very effectively appears to sell a simple algorithm that nearly
anybody on earth with a little bit of experience, could do themselves. What
the investor wants, is can you sell AI/ML as successfully as some text
coloured blue, white and red. If this HN post is anything to go by, it
certainly generated a lot of interest and maybe I could hire your company to
polish my A href link algorithm with some AI/ML gloss

------
j45
People written SQL scripts that check for scenarios, and even potentially
action / repair them is a form of intelligence. It's not artificial, either.

Thinking back to successful ERP implementations, little was more useful during
go-live or an ongoing basis than a script that ran every hour/day/week/month
to look for a condition and report it.

In one case, over a 3 year period where the organization grew from 0 to 60
million per year, every data issue was logged as a ticket, investigated, where
needed, a Sql script written to monitor other occurrences, and ultimately, if
there was a need to action, it would be forwarded to the right destination
with a link to instructions on how to resolve or investigate if a decision
could not be programmatically made.

The power of this was users received direct and immediate feedback anytime
they wanted if their work was good and compliant with the system and process.

How did the list of scripts to build get made? Every time the system behaved
correctly or incorrectly, and needed attention, whether due to data being
incomplete, mis-entered, or correct and ready for the next step, the
technology was busy working for the users.

Scripts reduced concerns that issues were being missed. Once something had
happened and it was important enough, a custom insight could be built. It
helped build a data driven culture instead of hoping the computer picked the
right thing.

Sql scripts could one day feed into or fit with AI/ML. I don't see that day
here in the short term.

------
voltagex_
Are SQL skills disappearing from companies? Could this be a reason people are
reaching for more complicated solutions because they don't know what a good
SQL database can do?

~~~
collyw
I blame the NoSQl nonsense from a few years ago. "Relational databases don't
scale" apparently.

~~~
notyourday
[https://www.youtube.com/watch?v=b2F-DItXtZs](https://www.youtube.com/watch?v=b2F-DItXtZs)

~~~
collyw
I had conversations that went like that.

------
dizzystar
The best is when you ask someone why they want an AI/ML masterwork, they just
say it's the future and we don't want to be left behind.

It's interesting because this article shows the overlap of what a non-tech
thinks is AI and what is common fodder for any decent programmer. So many
things get lost in buzzword to English translation, it's easy to forget that
most people correlate the plastic box sitting in front of them with an
intelligent Magic 8 Ball.

------
martin-adams
Maybe I'm completely missing the point here, but I thought the use case for
AI/ML was to find the cause, not the effect. For example:

>> If a person tries to checkout with 3 different cards at the same time and
they all bounced, something funny is happening. Block their account temporary
for a while.

That assumes you know that 3 different cards were used and they bounced. Sure,
the SQL can answer the question, but you have to know the question first.

I'm happy to be corrected here.

------
johnlbevan2
Fully agreed that in simple use cases simple solutions make sense; I've been
arguing similarly for the NoSQL movement for years (i.e. NoSQL being great for
large scale systems; but for most companies day-to-day needs SQL wins out).

However, it would be good to have a bit more in the article to say what AI/ML*
is in this context, and a couple of scenarios where it beats SQL; i.e.
otherwise it just sounds like the rantings of an old man "in my day we only
had turnips; you needed a snack: turnip; you needed a pillow: turnip". By
showing a few good use cases allows you to better contrast the product / get
an understanding of where the boundaries are between the technologies.

*NB: When I first read this I assumed the author was talking about AIML (artificial intelligence markup language) rather than AI/ML (artificial intelligence / machine language)... as though the slash was included, there was no use of the full terms.

------
cirgue
ML is best suited for situations where there is no practical solution using
typical statistics techniques and where marginal improvements in accuracy lead
to significant boosts in revenue or some other useful metric. It turns out
there aren't that many of those problems unless you're operating on truly
enormous scales.

------
crabasa
Back in 1999 I worked at an early web consultancy that built apps for clients
on top of Oracle. We used their DB + a programming language called PL/SQL.

There was a feature of Oracle called SOUNDEX which was _magical_. Here's an
example from their docs page [1]:

    
    
        SELECT last_name, first_name
        FROM hr.employees
        WHERE SOUNDEX(last_name)= SOUNDEX('SMYTHE');
    

This query will return all people with a last name that sounds like 'Smythe',
including 'Smith' and 'Smithe'.

[1]
[https://docs.oracle.com/cd/B19306_01/server.102/b14200/funct...](https://docs.oracle.com/cd/B19306_01/server.102/b14200/functions148.htm)

~~~
msumpter
I've used similar phonetic algos in Excel to deduplicate CRM data during
corporate acquisitions, it always seemed like the source data was hopelessly
duplicated, but running a few of theses algos against the data, and then
providing the 'best guesses' to the sales team to then do the final massaging
of which accounts are truly duplicate or should be left alone.

Soundex is very simple but works well, calculating a strings Jaro–Winkler
distance also helped.

------
nicodds
I think the writer is overgeneralizing his particular use case. Surely, the
situation he represents doesn't need any AI/ML, but it is the result of a
simple use case, with little variables and with an easy workflow.

Does the same pattern apply also in more complex scenarios?

~~~
ben509
Yes and no. AI/ML is real stuff that can do useful things; I worked at a
government contracting firm and we made a lot of that stuff work. But as I
recall, before anything landed in AI algos, we'd always have pages and pages
of code handcrafted by SMEs to prep it. It's not hard to see that, for many
cases, all the prep work gets you pretty close to the answer without any
training.

I think the issue the article hints at is there are way too many contractors
willing to burn your cash on AI/ML.

Contracting has a serious principal agent problem; there was a discussion I
recall over how to implement a quick search feature in a system we maintained.
I floated the idea of sampling the data to get approximate results, but that
was instantly shot down in favor of buying a ton more hardware. There are
serious arguments against sampling, it's very tricky to get right, but if we
had been spending our own money I think it would have gotten a more careful
hearing.

------
notyourday
"Machine learning" is an excellent tool to separate extra money from
"customers". Founders are separating extra money from VCs. Engineers are
separating extra money from the founders. Just reading this thread keeps
illustrating this.

Want to get a job done? Use a tool that gets a job done. Want to talk about
getting a job done and be "listened" to - use ML to beat around the bush.

This is no different from all these companies talking about Big Data[tm] a few
years ago, hiding people to build large processing clusters when their entire
dataset would fit into memory of $700 server obtained from Ebay.

Neither it is different from companies mumbling about availability challenges
when the entire stack gets sub 100 hits per second.

------
mythrwy
For the examples mentioned in the article no, you don't need statistical
analysis but these are simple cases (which most cases are).

Late orders, biggest orders etc. etc. sure, those are all SQL queries.

However if you want to make statistical predictions or looks for the non
obvious, these simple types of queries aren't going to do it. So it's an
apples to oranges comparison.

There are a lot of cases where people don't know what they are after. And also
lots of cases were orgs don't have a grasp on the simple things, but somehow
think more complex things (especially buzzword things) are magically going to
solve a lack of organization and insight.

------
AngeloAnolin
AI, ML, Data Science, Algorithms - these are just the fancy buzzwords we have
tended to associate with how we analyze data. We have been doing a lot of
these stuff (especially if you are in the software engineering world for
business and consumer products).

Iterating to the author's given examples, we have probably been doing:

What would be the net effect in terms of sales and profit if we reduce our
price by 5 cents, but increased our sales 25x? Those are already models that
encompasses predictive modeling, where we provide inputs and determine from a
given set of output based on general assumptions backed by data.

------
AzzieElbab
You probably do not need SQL. You can make do with well written see awk
scripts

~~~
ben509
For parsing and prepping large amounts of data, awk is shockingly effective.
And after a while, you even get used to your eyes bleeding...

------
stackzero
Click bait of a title... I think the more important thing this article is
trying to say is: use a good heuristic to solve your problem, if it can't do
so then ML may be something to look into.

------
jmpeax
> select from orders table where basket size is the biggest. We will then
> email a nice thank you note to this customer and attach a small
> coupon/voucher.... ...Guess what? 99% of these people became repeat
> customers

Sounds like you definitely need some ML there, in the form of statistics. Was
there a difference in probability of repeat customers between sending and not
sending the voucher? Was there a difference between basket sizes and
probability of repeat customers? Is there an interaction between the two?

~~~
collyw
Why couldn't you do that in SQL, sounds simple enough to me?

------
pugworthy
Gee. Thanks for the porn in the "Recommended Threads" at the bottom of the
page :/

If your work scans your web browsing for certain words etc., don't click the
link.

------
erikb
Well yes, if you own your shop and are one of 1-10 people working in this
shop, then you don't need these high tech things.

They are of course for companies that make so much money that they can afford
to spend 6-digit pays for a Marketing Manager who doesn't know sh*t about his
job who in turn is spending millions on randomizing-diagram generators so it
seems like he is working hard.

------
blackrock
Am I misunderstanding something here?

Artificial Intelligence is about statistical analysis.

Such as: Is this picture of a man and his dog, actually a dog? Or is it a cat?
Or is it a 4 legged creature? Or is it a turtle?

The AI is supposed to identify that the animal in the picture, is a dog with a
99.8% probability. And since it exceeded the 98% threshold, then it becomes
accepted as a dog, until otherwise disproven.

Basically, it is a pattern matching mechanism, on a massive statistical scale.

And from this, then further actions can be taken.

Such as, the owner of the dog, can be mailed advertising and coupons that are
related to dogs.

And then, the AI can go even further. What specific kind of dog is it? Is it a
German Shepard? Is it a beagle? Is it a poodle?

The AI can determine the specific type of dog, and conclude that it is a
German Shepard with a 99.7% probability. This exceeds the threshold, so then
the computer system might mail out an advertising to the owner, about deals
related to a German Shepard.

For something like this, then this is where social media can really shine.
When you upload your pictures to Facebook, or Gmail, or Instagram, then
Facebook or Google, can use an AI to analyze your picture. As well as reading
your caption on it. And they can determine the context of your picture, such
as whether you have a dog in it. Are you holding the dog? Are you walking the
dog? Are you smiling in the picture? If the scenarios check out, then the AI
can select you as a candidate, and send advertisements related to your dog.

In fact, I think our brain operates the same way, by using statistical
analysis.

When we see a dog, in a picture or in real life, our brain is actually using a
statistical analysis to determine that it is a dog. Our brain follows a neural
network pathway to match that picture of a dog, to a similar variation of a
dog that we have in our memory. It is thus statistically true, until otherwise
disproven.

This of course, happens in the deep recesses of our brain, so it's currently
impossible to know what really is happening there, until we have a better
scientific understanding of how our neurons work in our brain.

On the flip side, SQL scripts has no mechanism to view the picture, to
determine if the animal in it, is a dog, or a cat, or even if it is a human.

------
i_feel_great
I find very handy the Postgres aggregate and stats functions:
[https://www.postgresql.org/docs/current/static/functions-
agg...](https://www.postgresql.org/docs/current/static/functions-
aggregate.html).

I have also used Sparklines in Python for quick and dirty trends

------
philipodonnell
I think SQL can also benefit from some of the progress around making things
that "feel like" ML easier. For instance, dplyr is a refreshing change to the
way you write operations that manipulate data in a table/column structure,
even though it uses mostly the same verbs and language constructs as SQL.

------
internetman55
Why not both?

[http://sqldatamine.blogspot.com/2013/07/single-multiple-
regr...](http://sqldatamine.blogspot.com/2013/07/single-multiple-regression-
in-sql.html?m=1)

------
qwerty456127
> we will send a nice "we miss you, come back and here's X Naira voucher"
> email. The conversation rate for this one was always greater than 50%.

Wow. I could never imagine so many people actually read marketing e-mails

------
debarshri
Isn't machine learning a concept, whereas sql or anything else is more about
how you implement. I have in past seen a well season sql developer
implementing collaborative filtering like algorithms.

------
walshemj
You can do some types of ML with SQL all the main sql databases are Turing
complete.

Not sure if its going to be efficient for clustering and entity extraction at
scale tho

------
RandyRanderson
ML is not going from 0 -> 25% it's going from 25% to 28%, say, and that 3%
being much more in profit than the cost of the ML work.

------
Gravityloss
I guess if you're investing for the long term, avoid anything with machine
learning, as it's overpriced...

------
viach
You don't need no AI/ML, no Blockchain, SQL works just fine... I see where is
it going today on HN...

------
exabrial
This is one of those HN threads where I'm going to sit back with a bag of
popcorn and hit refresh...

------
piyush_soni
Now write an SQL Query to find all photographs that have _me and my wife
sitting in a boat_ in them.

~~~
Piskvorrr
...minus the ones which are obviously a toaster, while the AI insists they're
you and your wife sitting in a boat ;) Now what?

~~~
piyush_soni
Well, yes, it's not perfect yet, but then I'm pretty sure SQL Queries won't
fare any better here ;). Google photos does quite a decent job for me in many
cases.

~~~
cpburns2009
Well, Google receives free Mechanical Turk style image identification through
their CAPTCHA (or whatever it's called nowadays).

~~~
piyush_soni
That's not the only source of their image identification, if you wanted to say
that.

------
newsum
so many haters on this comment thread.

Just read and stop hating. [https://www.thestreet.com/investing/nasdaq-all-in-
on-blockch...](https://www.thestreet.com/investing/nasdaq-all-in-on-
blockchain-technology-14551134)

------
justonepost
Doesn’t scale.

------
partycoder
Write me a SQL query that labels images, produces a transcript from sounds,
recognizes handwritten text, does facial recognition or recommends items.

See the point? Welcome to 2018.

~~~
Piskvorrr
Except wan you gat whoa ird trance scriptions, people tagged as gorillas and
recommendations "I see you bought $that, do you also want to buy $that?"
There's No Silver Bullet, welcome to $any_year.

~~~
cup-of-tea
What language is this?

~~~
Piskvorrr
It's English...run through a transcription. ("Except when you get weird
transcriptions")

