I’ve been fascinated by chatbots ever since the AIM chatbot “Smarter Child” hit the internet back in the technological stone age. Since then, I’ve thought a lot about the types of chatbots that I would like to create in the future, and I’ve also done my fair share of “personal research” using the bots available on the iPhone App store, like Replika (which is pretty impressive, but I’ll save that for another post).
During my extremely-novice Python days, I tried making a simple chatbot the ancient way by using a vast amount of “if / then” statements to navigate the conversation by trying to predict every possible input value by the user. I quickly learned after reading Hello World by Hannah Fry that the method I was using was completely archaic, and now, technology has improved beyond that method. Today, we can actually train a program to learn a task, and in this case, it would be to train the chatbot to learn how to speak.
Introduction to Deep Learning, Natural Language Processing (NLP) and TensorFlow
If you’ve read my old posts (thank you!!) you may have noticed that I’ve referenced these topics before as areas of interests. Imagine meeting your favorite celebrity–the excitement and shock! Well, that’s me with learning these topics. They are the Star to my Struck.
There’s a 12-hour, 95-lecture course on Udemy that I’ve been taken, called: “Deep Learning and NLP A-Z: How to create a ChatBot.” I spent this past weekend getting through around 9 hours of the course. I personally loved learning and taking this course on Udemy.
Course Overview
- Deep NLP Intuition lecture (concepts)
- Data Pre-Processing
- Building the SEQ2SEQ Model
- Training the SEQ2SEQ Model
- Testing the SEQ2SEQ Model
I also learned about / used:
- Anaconda and Spyder
- TensorFlow
- Creating a virtual environment with Anaconda to utilize TensorFlow inside of the environment
Although the course was 12 hours long, it does not take just twelve hours to truly learn all of the material covered. I will be doing a lot of additional reading, re-watching, and re-absorbing of all of the information that was introduced. Not only was this my first introduction to the above topics, but it was actually my first introduction to seeing a real, complex program be built, from beginning to end, narrated by an experienced developer. I learned so much despite having questions, and I’m excited to go back and have those questions answered.
Anaconda and Spyder
I had heard of Anaconda from other videos and research, but this was the first time I had actually used the Anaconda and Spyder IDE. I’m extremely happy to have used it because I very much enjoyed the layout, seen below.
What’s going on there? Well, you write your code on the left, you see your variables on the upper right, and then you have your console to run and test on the bottom right.
As a visual learner, it was extremely elucidating to see the “variable explorer,” where you can click into each variable, such as lists and dictionaries, and see the functions work in real-time. Moreover, this layout and course really helped me to better-understand the concepts of dimensionality and matrices within programming.

Data Science & Analysis, I’ve got my eye on you!
The instructor on Udemy for this course (mister Kirill Eremenko, who did an awesome job at teaching!) was making some jokes about getting through the “Data Preprocessing” part because it’s not exactly the most fun. But, for a former data-entry manager like myself, I had a wonderful time with data preprocessing part!
I was so amazed to watch the data preprocessing steps clean up our data and variables. Using the layout in this way really helped me understand more the dimensionality of programming. Moreover, this was a really good visual which helped me further-understand how and why Python is an object-oriented program.
One unexpected take-away from this course was the idea to gear some future learning towards the requirements of a data analyst and data scientist. Of course, Python developing is the ultimate overarching goal, but with my experience and personality-type, I think I may have a good fit for Data Analysis.
Deep NLP with SEQ2SEQ model in TensorFlow
As a creative writer, it was amazing to learn how to turn words and sentences into vectors and integers. We had to add tokens, make inverse dictionaries, cross-reference lists and dictionaries (and even make dictionaries inside of lists!), and more. More experienced coders may be laughing at my paraphrasing of all of this, and I’m sure future-me will laugh as well.
Finally, after all of the data preprocessing, we were able to build our SEQ2SEQ model which utilizes deep learning and recurrent neural networks (RNN). We used LSTM, which develops the context of words and sentences by using an encoder and a decoder. Probability is used during the training of the SEQ2SEQ model, which is how deep learning is utilized to teach the program how to understand and respond to inputted language.
Training the SEQ2SEQ Model
The “brain” of our chatbot was created (how exciting!) and it began its training last night on my laptop. For experienced programmers, you may have read that and had a moment of “what?” when you read laptop. Yeah, I learned that the hard way. After hours of watching the training go through each batch, I realized that my laptop was moving very slowly for this task. In the Udemy course, it was recommended to have the SEQ2SEQ model training done on a more powerful computer.
Finally, this morning I re-did all of the beginning steps, like installing Anaconda on my desktop and creating the virtual environment. Then, I re-preprocessed my data (somuchfun), began a new SEQ2SEQ training and voila, here we are!

As I was writing this blog post and keeping an eye on the training going on in my console, I saw the familiar print statement appear on the screen that validates that this chatbot is, indeed, LEARNING!

Now, we have full evidence that the chatbot is properly utilizing and learning through this RNN because we have…weights!! Those files up top with “weights” are not files I have created, but files that the program, our chatbot, has created through learning over the past few hours. Once the training is complete and we reach batch 4120 (currently on 2500), I will then resume the last and final part of the Udemy course to fully complete this chatbot.
In that last part, we will utilize the deep learning that the program has accomplished and finally interact with our chatbot!
Final Reflections on Part 1
This project has opened my eyes to the true complexities and capabilities of Python and computer programming in general. Although I chose a very difficult project / chatbot to start off with, I’m happy to have done so because it was also the most efficient way to create a chatbot.
I rather learn the most efficient version over easier versions, because it is the most efficient options that are used in real-world applications.
From this course and project, I’ve learned that going forward, my next points of study will include:
- Data Science and Data Analysis with Python
- Math for computer programming and Python
- Jupyter Notebook
- Web Scraping
- Machine Learning, Deep Learning, and NLP
- R (programming language)
Overall, this was an amazingly beneficial project to delve into! Definitely a pivotal moment in my learning journey because I now have a better mental reference for the future. I’ll be back later for Part 2 for the exciting completion of this project, where we get to finally speak to our bot!
Update – 48hrs Into Training
While watching the program learn, I realized some errors I made above when referencing the amount of time remaining.
I was referring to the batches as an indicator, but that wasn’t accurate. I’ve realized that what matters is the Epoch count, and we are only up to Epoch 5/100. One run-through of all 4,000+ baches equals 1 Epoch. My computer is going through around roughly 3-4 Epochs per day, which should hopefully increase in speed as the learning improves… (I think).
I’m going to let this run until tomorrow to see how far we get, test it out, then let it continue to learn and test it out again afterwards.
I gotta day, feeling like a scientist feels really fun. It’s been really cool to keep an eye on this and observe!



