Jun. 2, 2023
1 of 72

More Related Content

Similar to

Template PPT For Professional userTemplate PPT For Professional user
Template PPT For Professional userAdjiHidayatul2
Composing Business MessagesComposing Business Messages
Composing Business MessagesAsad Hameed
Matrix chartsMatrix charts
Matrix chartsMianlside
Chapter 4.pptxChapter 4.pptx
Chapter 4.pptxMohammedRasel9
Company Profile-creative.pptxCompany Profile-creative.pptx
Company Profile-creative.pptxMStaaruf

More from Elizabeth (Lizzie) Siegle

Intro to Text Classification with TensorFlowIntro to Text Classification with TensorFlow
Intro to Text Classification with TensorFlowElizabeth (Lizzie) Siegle
Pytexas: Build ChatGPT over SMS in PythonPytexas: Build ChatGPT over SMS in Python
Pytexas: Build ChatGPT over SMS in PythonElizabeth (Lizzie) Siegle
jsday 2023: Build ChatGPT over SMS in Italyjsday 2023: Build ChatGPT over SMS in Italy
jsday 2023: Build ChatGPT over SMS in ItalyElizabeth (Lizzie) Siegle
Generate Art with DALL·E 2 and Twilio MMS.pptxGenerate Art with DALL·E 2 and Twilio MMS.pptx
Generate Art with DALL·E 2 and Twilio MMS.pptxElizabeth (Lizzie) Siegle
AthenaHacks Keynote 2023AthenaHacks Keynote 2023
AthenaHacks Keynote 2023Elizabeth (Lizzie) Siegle
Build a Chatbot with TensorFlow.js and TwilioBuild a Chatbot with TensorFlow.js and Twilio
Build a Chatbot with TensorFlow.js and TwilioElizabeth (Lizzie) Siegle

More from Elizabeth (Lizzie) Siegle(20)

Recently uploaded

Mastering System Resiliency with AIOpsMastering System Resiliency with AIOps
Mastering System Resiliency with AIOpsPeterson Technology Partners
TaketoFujikawa_KES2023Matsushita Laboratory
inQuba Webinar Series 2023 - Sanlam Hyper Personalization v2.0 FINAL.pptxinQuba Webinar Series 2023 - Sanlam Hyper Personalization v2.0 FINAL.pptx
inQuba Webinar Series 2023 - Sanlam Hyper Personalization v2.0 FINAL.pptxLizaNolte
DWeb and Civil Society: An Introduction For MakersDWeb and Civil Society: An Introduction For Makers
DWeb and Civil Society: An Introduction For MakersTechSoup
Regulating Generative AI - LLMOps pipelines with TransparencyRegulating Generative AI - LLMOps pipelines with Transparency
Regulating Generative AI - LLMOps pipelines with TransparencyDebmalya Biswas
Fipto Seed Pitch DeckFipto Seed Pitch Deck
Fipto Seed Pitch Decksjcobrien

Recently uploaded(20)

Editor's Notes

  1. developer who is on marketing, I make demos that use Twilio's communication APIs and work on docs and sample code
  2. What is Wordle, how do you Wordle, where to play Wordle/how to play, how to Solve Wordle,
  3. Who here has played Wordle? Who here still plays Wordle? Wordle is a daily word puzzle game created by a Brooklyn-based software engineer Josh Wardle for his partner who loves word games. It took off on social media early this year (Mashable called it "Your first online obsession of 2022") for a few reasons. Every day, the people of the internet are greeted with a fresh word puzzle that can only be solved — or not! — using a series of process-of-elimination clues. It's uniting how everyone gets the same word to guess. Each day, people work towards the answer individually but also collectively in a way like the NYT crossword puzzle: upon solving the daily puzzle, you can share a copy-and-pasteable graphic showing your guesses. The hidden word changes daily but, — so it's an experience every player shares, even if they take different routes to finding the same answer. And the puzzle itself is limited to just one, five-letter word, which makes it more like Wheel's mainstream "anyone can do this" appeal.
  4. Here is how you Wordle, here's how it works: When you visit the Wordle website, you're greeted by 5-wide by 6-long grid of empty, white boxes. Each box can hold one letter, and so you guess at the answer by typing in a five-letter word and pressing 'Enter'. There aren't any clues up front, so any five-letter word will do as an initial guess. That's where the game of Wordle really starts. When you send a guess along, the color of each letter's box changes. If it turns green, that letter is in the daily word and you've placed it in the right spot. If it turns yellow, the letter is in the word but you have it in the wrong position. If the box turns grey, it means the letter isn't in the word at all. When you think about the conditionals, you can picture engineering/developing it!
  5. Acquired by the New York Times–good on Josh Wardle! texting a 5-letter word or "?" to +12155156567, or here on WhatsApp.
  6. How do you solve Wordle, you ask? Well, there are different opinions. (click) Lots of them! (click) Some say that for your first guess, you should start your process with a vowel-heavy word like ADIEU or QUERY. The NYT's excellent WordleBot tool has its own list of the best Wordle start words — and it should know, given it's made by the people who now run Wordle. The math behind it is based on how many of Wordle's 2,309 solutions are left, on average, after you play it, plus the average number of steps needed to solve it and a couple of other metrics. And by that measure, some say the best Wordle start word is apparently CRANE.
  7. Overall, WordleBot awards CRANE a score of 99/100 and STARE only 97, and presumably it's better at math than I am, it being a computer and all that.
  8. Acquired by the New York Times–good on Josh Wardle! texting a 5-letter word or "?" to +12155156567, or here on WhatsApp.
  9. How will we build our Wordle solver? We will use the Datamuse API, which provides a word-finding query engine for developers. You can use it in your apps to find words that match a given set of constraints and that are likely in a given context. You can specify a wide variety of constraints on meaning, spelling, sound, and vocabulary in your queries, in any combination. Some use cases include performing autocomplete on text input fields, search relevancy ranking, assistive writing apps, word games, and more. The following examples illustrate the kinds of queries you can make:
  10. You can access most of the features of the Datamuse API using the URL, like by hitting the URL with a HTTP request! You would customize it by adding different query parameters.
  11. ml = Means "like constraint": this requires that the results have a meaning related to this string value, which can be any word or sequence of words. sl = means "Sounds like" constraint: require that the results are pronounced similarly to this string of characters. (If the string of characters doesn't have a known pronunciation, the system will make its best guess using a text-to-phonemes algorithm.) sp = "Spelled like" constraint: require that the results are spelled similarly to this string of characters, or that they match this wildcard pattern. A pattern can include any combination of alphanumeric characters and the symbols described on that page. The most commonly used symbols are * (a placeholder for any number of characters) and ? (a placeholder for exactly one character). Please be sure that your parameters are properly URL encoded when you form your request. rel_[code] = Related word constraints: require that the results, when paired with the word in this parameter, are similar to that word. So say you have the noun "beach", you could get an adjective that would be used to describe it like "sandy", or you could get a synonym for "ocean" like "sea", among other things.
  12. So! The Datamuse API is very cool. You can build a lot with it. How will we use it to build a Wordle solver? Say we know that we're trying to guess a word in Wordle that starts with s and ends with k with 3 letters in-between. To retrieve words that start with s, end in k, and have 3 letters in-between, you would hit and see: Nice! We see how we can use this is applicable to our Wordle solver problem.
  13. I'm a big fan of the Twilio Serverless Toolkit, a serverless environment for hosting web apps. Why would you want to host your own server when someone else can do it for you? These commands install the Twilio CLI through which you use the Twilio Serverless Toolkit.
  14. This imports the superagent module that helps us make HTTP requests in Node.js and includes a helper function that, when given a letter and a word, returns indices found to later calculate black letters from the yellow squares and guesses input. This code uses map and filter which are all array methods in JavaScript.
  15. This is an aside: this is unnecessary, but fun, for this session: it's an emoji/visual way to learn map and reduce The map() method is used for creating a new array from an existing one, applying a function to each one of the elements of the first array. The filter() method takes each element in an array and it applies a conditional statement against it. If this conditional returns true, the element gets pushed to the output array. If the condition returns false, the element does not get pushed to the output array.
  16. The meat of the code is in the Function handler method: we calculate which locations the letters (in our given guesses that were given yellow squares) could be.
  17. We get our black squares which are letters that were guessed, but not included in the Wordle word. The filter method is perfect here because we filter for letters that are not included in the yellow squares or green squares arrays
  18. We also craft our message pattern which is our search query to pass to the Datamuse API. We craft the Datamuse API query string and check for a few different cases: there are no returned words from Datamuse so it's an empty array. This probably means that the input was incorrect or messed up Else, we want to get all the words that do not include black letters (possible words that could be the answer because they contain
  19. deploy app/Twilio Function: gives you a public-facing URL. We can configure a Twilio phone number (like the Wordle solver +18063046212) with it so that when someone texts that number, Twilio makes an HTTP request to your application (in this case, the Twilio Function) so that code runs. We need to be sure that we pass the correct parameters to the URL. We can see what that would look like in the browser:
  20. In the browser, we can see the URL we hit: we can see the query string. We pass it a string to green containing letters and question marks (this might look similar to queries we passed to the Datamuse API: this green string represents a 5-letter word that begins with "G", yellow includes a string containing "o" (or it could be other letters, and an array of guesses (representing words that were guessed in Wordle). When we hit that URL with that query string, we get an array of words that match that fit those parameters. How can we create app logic to pass on those parameters so we don't need to type them into the web browser?
  21. Studio is Twilio's drag-and-drop visual builder, a no-code to low-code platform for building applications: you can use Studio in lieu of code. We're going to trigger this Studio app with an incoming text message and then we will ask "what 5-letter words did you guess? Separate multiple words with commas" using a "Send and Wait for Reply widget dragged and dropped onto the board. Upon reply, we will then drag and drop a "split based on" widget that lets us run a conditional. You can think of this as an "if" statement
  22. Normalized data is critically important. Every engineer has encountered those scenarios where the content of a field in system A doesn’t match exactly with the same field in system B… “USA vs US vs United States”... using Segment you get the ability to funnel all those into a standard value that all your systems share. Segment has an identify() call also means that your events are directly associated with a user entity who performed them. This makes it invaluable for UX research, for planning customer interactions, and of course for marketing and sales teams. Segment’s more advanced features give you the ability to start acting on the data right away. Using Personas you can start to create cohorts of your customer base that meet certain criteria, and feed them into specific destinations for marketing campaigns. If you have some more complex logic that needs to be executed first, you can use Segment Journeys to decide the proper course of action and build customized delightful experiences. And… with protocols, you can control which destinations get which data. So your compliance folks will be happy because you can keep PII out of the tools that aren’t approved to have it while passing that same data to the ones that are approved.
  23. trigger a tweet with the API! Make a HTTP request to tweet after a page visit! Light up an IoT device like a raspberry pi, make a car move depending on button clicked shopping app and someone clicks a product then adds it to their cart but doesn't purchase it. Have a text sent to them later to remind them they never bought it track time spent on page, mouse movement: what gets your users/site visitors excited or engaged? In short, data might surprise you. You never know what might be of interest to you, or what might come in handy. The sky is the limit!