Boston
New York
Charlotte
Washington, D.C.
Nicaragua
704-918-1799 | www.quoininc.com
209 Delburg Street, Suite 207Davidson, North Carolina 28036
Botsforfunandprofit
Introduction: my history with bots
Whatisa’bot’?
A botisanapplicationthatperformsanautomatedtask,suchassettinganalarm,tellingyoutheweatherorsearchingonline.
Myhistorywritingbots:
• HighSchool:“Aimbots”,anapplicationthatperformsanautomatedtask:aimingatpeoplesheadsinshootergames.https://www.youtube.com/watch?v=V7JLvtKYPQg
• ChatbotsforDiscord(https://github.com/chalda/DiscordBot) andHipchat
• Shoppingbots:refreshapageuntilthesalestartstheninstantlyaddtocartandcheckout.
• Andnow…ThumbtackBot!
12/13/16 2015QuoinInc. 2
(Chat) Bots in Pop Culture
• Chatbotsoftenmakenewsiftheycanbeatthe“TuringTest”,mostrecentlylastyearabotbeattheTuringtestbypretendingtobea13yearoldboyfromUkraine.
• Recentadvancesinneuralnetworksanddeeplearninghaveenabledcreationofverysophisticatedchatbotsthatcancomprehendspeechandgeneratesensibleresponses!
• HavegonemainstreamwithvirtualassistantssuchSiri,CortanaandthenewGoogleAI.
• Similarreadingcomprehensioninfacebook chat:suggesttoorderanuber ifyoutypeuber inchat.
• Alsoleadstothis:http://brunomars.us/rumor-come-bruno-mars-gay/
12/13/16 2015QuoinInc. 3
WhatisThumbtack?• Awebsiteforscoringfreelancegigs(mostlyaimedatCreativefields)• Freelancersbidongigs(costsmoneytothefreelancer)• Only5bidsPERgig• Bestgigs(time/pay)get5bidsveryfast(within15minutes)• Crappygigsdon’tgetbidonveryquickly…butyouprobablydontwantiteither.
• Canbepostedanytime.Usuallyearlyinthemorning8-9am.• Newgigscomeinformofemail.
Howtoscoregigs?• Mostofthetime,yourpricedeterminesifyougetthegig• Mostgigsareverysimilar(corporaterecruiting/overview,wedding,eventetc),Thumbtackallowsyoutosavepre-canedresponsetemplates.
Thumbtack overview
12/13/16 2015QuoinInc. 4
• Mostofthetime,yourpricedeterminesifyougetthegig• Mostgigsareverysimilar(corporaterecruiting/overview,wedding,eventetc),Thumbtackallowsyoutosavepre-canedresponsetemplates.
• Itoftendoesn’tmatterwhatyouwriteasyourfirstresponsewiththequote.Youcanmakethisverygeneric“heyinterestedinthisproject,pleaseletmeknowwhatyourvisionforthefinalproductwouldbe.”
• Themostimportantpartistogetyourfootinthedoorandbeoneofthe5quotessubmitted.
How to score a gig
12/13/16 2015QuoinInc. 5
• Submittingquotescostsmoney,needtodetermineifagigisworthdoing:• Formulaforprice:
X=numberofhoursofeventR=desiredhourlyRate(X+5*X)*R=DesiredCompensation(DC)
• IfDCisgreaterthenbudget=Reject• IfDCislessthenbudget->Quote75%ofBudgetorDCwhicheverisgreater.
• Rejectifgigisnextday• Rejectiffurtherthensomenumbermilesfromhome• Rejectifgigisverynon-specific.Therearesome“free-form”descriptionfields.Sometimespeopledon’thaveaclearvisionintheirmindandusewordslike“Letsmeettodiscusstheplan”or”lookingforsuggestions”• IthoughtotacklethisbyrunningthefreeforminputthroughaNeuralNetwork
ThumbtackBot: the problem
12/13/16 2015QuoinInc. 6
• Applylabeltothumbtackemailsingmail.• CreateanImap connectiontogmail.• OnnewemailrunitthroughBeautifulSoup,parseouttherighttextfields:• Numericfieldsareeasytodealwith:eventhours,budget• Somefieldsaremorepredictablethenothers:Locationisatown/statestring“Malden,MA”
• Timeusuallyahumanreadabletime/date.(Althoughsometimesitsmorefreeformsuchas“asap”)
• Descriptionfieldsaremostlyfreeform:• Runthroughpre-trainedneuralnetwork.Getayes/noresponse.
• Onlyneedtorespondtoquotesbetweenmidnight- 10am,otherwisesaveinadatabasefortraining.
• Parseoutsubmitlink,use“reverse”webscraping (asdemonstratedbyBen)toopenitandsubmitaresponse
High level pseudo code
12/13/16 2015QuoinInc. 7
• Textanalysisisn’tasimpleproblem.• NeuralNetworksgenerallyrequirealotoftrainingdata.• Freeformfieldsinthumbtackareusuallyshort:1sentenceperfield.Only2-3sentencesperjob-posting
• Dataisnotnormalized!Sometimesthedatewillbeadate,othertimesitwillbeasentence“assoonaspossible”“wheneveravailable”
ThumbtackBot: lots of problems
12/13/16 2015QuoinInc. 8
• Differenttypesofgigshavedifferentformatsandfields!
• Turnedoutabit(oralot?)morecomplicatedthenoriginallythought• Mostlyanexcusetouseawordprocessingneuralnetwork• Alsoanexcusetopracticeabitofpython(imaplib,mongodb,BeautifulSoup,tensorflow)
• DoesthiscountasaChristmaspresent?
Outcome
12/13/16 2015QuoinInc. 9