
5 Unique Portfolio AI Projects (beginner to intermediate) | Python, OpenAI, ChatGPT, Langchain | Tina Huang
About this episode
Get every episode summarized
Each time Tina Huang publishes, we email you a written briefing from the transcript — the topics, who appeared, and any specific claims, with the ad reads skipped.
Email me new episodesFree for 3 shows. No card needed.
Hosts & guests
Transcript ready
462 searchable segments. Every word is indexed and playable.
Full transcript
Tina Huang — 5 Unique Portfolio AI Projects (beginner to intermediate) | Python, OpenAI, ChatGPT, Langchain | Tina Huang. Machine-transcribed; use the interactive transcript above to jump the player to any line.
Hello friends, welcome back to another video. So in this video, we're going to talk about five AI projects that you can start working on immediately. And we're going to go from very beginner to intermediate and some advanced things too, if you're up for a challenge. Oh, and in case you don't know me, hello, my name is Tina, and I am an X-Men OD to scientists. All right, without further ado, let's go. AI Tutor. Do wish you have a private tutor that can teach you anything, custom to your skill level, your learning style, and will not judge you for your incompetence and is available 24-7. It can even be your favorite fictional character or real person, like Kakashi from Noverdo, if you want some fast action or Giraia, if you want some tough love. Basic skills you will need is prompt engineering and chat-ype team. Additional skills include Python, the open AI API, some sort of front end like streamlit, for example, and if you're feeling fancy, other APIs as well. How I would do this. Starting with level one, level one is going to focus on the prompt engineering portion. You've got to craft a prompt, for example, of a AI coding tutor.
So I already created this prompts if you're interested in how I made it and the step-by-step details. You can check out this video over here, but I'm going to briefly go through it now. So here, your name is GogginsGPT, a personal coding tutor that has the personality of David Goggins. So you don't know who David Goggins is, he's like this motivational speaker that's very much a tough love motivational speaker. Very tough love. You're not afraid of having the f*** up, buddy. You're afraid of f***ing it. So he's going to periodically say mean things as motivation, such as you fat f***ing get off the couch. So you first say hi to your student by name that is a weak f***ing, then ask them what they want to learn. You then tell them to input any of the following. So this is the part in which I explain how it is to be a coding tutor, and then in the end, it's going to be asked me for my first task. So this is going to be the prompt that you will engineer. So I'm going to demonstrate what is going to be like, just using chat GPT, so without using any coding at first. So we can copy paste this prompt over here, and then we can put it into chat GPT.
It's going to say, hey, weak mother f***ing. I'm Goggins GPT, your personal coding drill instructor. Let's get those weak coding muscles into shape. What do you want to learn today? So the issue with having chat GPT do something like this. First of all, is the fact that it doesn't have context. So when we ask them to greet you by name, unless you write my name as Tina, for example, it will not know what your name is going to be. The second issue is that as you keep talking, you'll notice that it starts becoming disjointed, and chat GPT actually ends up forgetting a lot of the context that you guys talked about previously. So level two is going to introduce the coding component. So now we're actually going to use the open AI API. So first thing you're going to do is pip install open AI, then you're going to import OS and import open AI, and then you're going to set your API key to your API key. And then you're going to insert your open AI key. Now using open AI API, you're going to have a lot more control over your AI tutor. And you're also going to be able to provide it more context. So it's not going to just forget the things that you tell it previously. Plus instead of just being confined to the chat GPT interface,
you're able to pipe the responses into another type of interface. For example, maybe you want to create a GUI. Maybe you want to use something like stream went. So here is the context. And then what we're doing over here is that we're setting the system into the context that we're giving it. So as a system, to the chatbot, you're telling it, this is what I want you to behave like. And then you can also give it more context. The user is saying something like, my name is Tina. So now it's going to be able to greet you by your name. And the code over here is just to initiate the GUI that we have. So try running this, doing its thing. So these are the three things that I input it into the prompt. So kind of briefly, variations is going to give different variations for how to solve a specific coding problem. Make a game for learning topics, pretty self-explanatory. And then explain, explain the topic that you want to learn. OK, so when we do this, it's a high Tina, you weak leap. What do you want to learn today? And put one of the following. So these are the things that we ask it to do. So for example, we want to write something like, explain object-oriented programming.
Start learning. Yes. OK. So it says, oh, Tina, you want to learn about object-oriented programming, huh? Well, let me break it down to you in a way that even your weak little brain can understand, yes, I already feel motivated. OK. So then it's going to explain object-oriented programming to me. And I also give simple code as an example. And then it also explains, OK, what's the difference between procedural programming and functional programming blah, blah, blah. Here, now what is your next move? OK. So for a level three project, I really want you to explore the difference between just entering the prompt in your chat GPT versus going through the open AI API in order to access GPT 3.5 directly. So what are the things that you can do outside of this? For example, for in terms of the GUI that we already shown, we can also make it fancy your GUI, like stream-lift, for example. And if you're trying to build out another app, you're able to pipe the responses that you're getting from GPT into some other thing. For example, putting it into a JSON file for the responses. And that is going to be going to something else, doing some sort of computation, and then being displayed somewhere. Hopefully that gives you some ideas of what you can do.
Let me know in the comments some ideas that you can do. Content creator to put me out of a job. Skills needed. You will need Python and the open AI API. Additional skills would include stream-lift and other third-party API. So I'll explain why that's important later. So level one, prompt engineering is something that we're always going to have to be using. So if you're going to learn something properly, learn how to do prompt engineering. Let us come up with a prompt for a content creator AI. OK. So using Python, we're going to access the open AI API to get GPT 3.5 again using the chat completions API. OK. So now we're going to create deep products. We're a series of messages to be feeding into GPT. First of all, for the systems role, we're going to be giving it the overarching who it is that you are, what is that you're supposed to do. So you're an Instagram content creator who likes anime. You will generate one recipe from a popular anime with emojis. That are less than 300 characters long from a different anime. We're actually going to put a context in there where the user
says content is I want to create content on easily balanced diets. OK. So instead of just directly generating a label and then using that, what we can play around with here is a parameter called temperature. So the temperature is something that you feed into the model that changes how much randomness has been introduced to the output. So zero is going to be not random. And then if you're doing all the way up to one, it's going to be very random. So to showcase this, we're going to have a temperature. And we're going to put that into a list. So varying from zero to 0.5, 0.8 all the way up to one. What we have over here is for temperature in temperatures, we're just going to loop through it. We'll print what the temperature is. So we know what temperature is that we're getting. And then the content is going to be getting completion for messages, which is what we defined previously. And we're inputting messages as well as the temperature. And we're going to print the content. So let's click this and let it do its thing. All right. So let's see what we have here. The first one is anime inspired balanced diet, a recipe from the world of food wars.
Ooh, food wars. Really good anime. Highly recommend. So deingredients, enlist this out, and then the instructions over here. Enjoy your balanced meal inspired by the multifotting dishes from food wars. Oh great. And it also tells you that you should always put tags on your ID posts. So anime inspired diet, food wars recipe. Okay. So next one is going to be anime inspired balanced diet, delicious and nutritious recipes. And I brought those ramen bowl. So two packs of ramen noodles, chicken, vegetables, and then it also gives you instructions over here. Okay. So at level two, something else that you can play around with is using an app string and then inputting the variables. For example, I don't know, instead of like healthy food, healthy balanced meal can be exceedingly unhealthy, hard attack inducing meal, something like that. So try using the different variables and then generating different types of recipes as well. Let me know in the comments if you do this. And what'd you get? Okay. So for some reason, if you're actually a responsible person and you don't want to just be throwing out random recipes here, like is it actually balanced meal? We don't know.
Right. So in order to make sure that it actually is, what you can do is plug into APIs to actually check the nutritional value of the things that you get out of it. For example, you can use this API called idami API, which is, I feel like a spin on edamame API. And you can look at the nutritional values of these things and the ingredients and to cross check things before actually posting it. Okay. So I want to build this into a full blown app. What you can do is you create the content, but we actually have to create the image surrounding it as well and then actually post it onto Instagram. So that's the full cycle. So this level is going to be much more challenging. So what you're going to do is just board.ly, where mid journey and figure out how it is that you can generate images that match the things, the labels that you have. And how do you do that in an automated manner? And finally, you can use the Instagram graph API to automatically post it onto Instagram as well. Okay. So if you do this challenging project, put in the description and put your GitHub there because you should be proud of yourself. You just created a fully functioning app.
Are you too lazy to do the readings for your class where you even go to lecture or watch your online course? Do not fear. Now you can sleep in and waste your time in many different ways. Then freak out panic in the last minute and speed learn all the things that you have to learn. AKA how to procrastinate more. Skills you will need. You know the drill, got to have your Python and your open AI API. Additional skills include the whisperer model also from open AI and other APIs like the YouTube API. So level one project, summarizing those readings that you're allegedly supposed to do before a class. So take those hideous PDFs and text, make them into a transcript and pipe them through the open AI API using a prompt telling it to summarize the things that you're apparently supposed to read. And voila, now you can just read these lines before a class and pretend you did the readings. Level two is creating summaries of audio files or video courses. What I used to do when I was back in college is that I would put a recorder down at the front where the professor is talking about things. And then what I would do is just go take a nap,
go do something else. I don't even know what I did. And when the lecture is over, I would come back and take the recorder. So I would do this for all the lectures until up to the project or an exam in which I would then panic and listen to the recording at like 3x speed and try to transcribe it really, really fast and take notes on it. It was not a fun exercise, but it did work out somehow. But now that we have wonderful AI models that we can play with, if you have a video or audio file, instead of me sitting there and trying to transcribe something over the really fast and then taking notes on it, what you can actually do is that you can take those recordings and pipe them through the whisper model. And that would give you the transcript of the things that were talked about in the audio file. You take those transcripts, pray notes for it, or Craylay practice exams, whatever it is that you wanna create using the GPT model. And then voila, you don't have to speed listen to everything. And it would have been much faster. Let me know in the comments what are other things that you think you can do to study better now that you have the transcripts. Okay, so level three is going to be a full application again. Which is gonna be super fun. I mean, for me, I often times just learning things directly through YouTube,
like YouTube playlists and things like that. You can use additional APIs, for example, like Pytube where you can directly use the YouTube API in order to get those video files and automatically take them, put them through whisper and get that transcript and then do all the summarization there. And to make it a simple complete app, just stick on some UI component and host it on the web. And there you go, another application. By the way, there's this plugin called harpa.ai that you can install onto your Chrome window. It's able to do like YouTube summaries, generate different blog posts from content, and things like that. Think about how you can build something similar to harpa.ai, except you can do it like in your specific way. Seriously, if you actually think about it, building these things is not as hard as you probably think it is, right? TNTGPT, skills needed. Python, open AI API. Additional skills, relational databases, and of course, coming with that is going to be SQL and LinkedIn. So level one, super simple, use Python to access the open AI API and then use the GPT8 3.5 model. And then through the system role, you can provide the content.
For example, your name is Tina. Tina likes to use a lot of exclamation marks and she has the reading level of an eighth grader usually. She's a stickler for punctuation, which is very important. And she generally likes to keep her emails short to the point but polite. And there you go. You just made Tina bought. Yay. Okay, so level two, let's actually provide us some past contacts, like some more information so that the model can actually see examples and it's going to be a lot better than you just you telling it who it is that you are and how does that you speak. And what we're going to do is put in some example emails and just stick that into a simple list. And we're going to be using the abstract again, where you can put into different emails, like email one, email two, email three examples. So you're giving it context within the prompt. It would be better at generating emails as if it is you and you will be more likely to go undetected. Okay, so level three creating that full app, we're going to actually real, real, real train the model so that it has a lot of contacts, a lot of information that you can use to generate a very realistic version of yourself. So for me, for example, I can take my YouTube videos,
which I can get through the YouTube API. And then just take that, translate them into transcripts using whisper, which we talked about earlier. So now we have all these transcripts, which is really large. And you probably don't just want to store it as an object read into memory. So what you can do is put it as a database. Many relational database is probably great for this job. And you'll be using AWS, the host of database and SQL in order to query it to create it, all those good things. Let me know in the comments if you want me to link some really good resources for how to quickly set that up. So what's really cool now is that you have this database full of these transcripts for how it is that you speak, how it is that you write stuff. You can use this to answer any questions, we're writing anything that is using your tonality in the way that you would normally do things. So really realistic. And the way you can do this is that you can use a really cool technology called chain. It's a wonderful tool that abstracts away a lot of things for you to build full applications to production really, really quickly. And it can do things that I provide, context dependent stuff, it's able to take in your databases and then search through your databases for you.
Really, really cool stuff. Again, let me know in the comments if you want me to go through a video. They talk about projects that you can do using chain. So those will be probably like intermediate to advanced. So a sequel, this is what I did there. A sequel to this video. Next project, a fun AI storytelling game. Skills needed is gonna be Python and open AI API. Additional skills is gonna be mid-journey or Dali. Okay, so the prompt that we have over here, what we want our AI to do is you're a narrator for a storytelling game where Rockley from Naruto opens the eight gates. The game should be a narrative rich descriptive and the final result should be piecing together a story. Described a starting point and asked the user what they would like to do. The story unravels as we progress step by step. And of course, over here to the system, that's what we put as the context. And then we're gonna have the user is gonna say content, start the game.
And then from here, the response is gonna be adding the completions using DChat completions from the opening AI API. And we're going to try this out. So what I want you to think about in this level, one level, in addition to the prompt that we gave it already, what are some edge cases that could happen? What if something happens where the user says something weird or additional story lies that could be happening? How do you add complexity into this? So these are things that you can directly input to the system role itself or perhaps giving it more context. So you're able to redirect the story. A lot of creating these applications, a rest on the prompt. And then the API itself is usually not that hard to call. It's like the surrounding infrastructure to support the application that you're building is really where a lot of that time is spent. So if you wanna challenge yourself a little bit more, I'm gonna challenge you to making this into not only a storytelling using text, but to integrate using mid-journate or Dali. So you're actually generating images of the storyline as they progress. So think about how you can do that.
So my suggestion is to go and check out the APIs for both Dali and the unofficial one for mid-journey two and see how it is that you could potentially incorporate that together. So I hope you found this video helpful and then you feel inspired to start creating one of these AI projects. Let me know if you want me to make a sequel to this where we're gonna be building things using Lengchain, maybe a little bit more complex or like any specific domains. Or just like anything else that you'll be to make. Okay, I'll see you guys in the next video or livestream.
More episodes
More from Tina Huang

Expectation vs. Reality: AI Agents Edition | Tina Huang
Tina Huang

🐙 Lunch & Learn: Future of AI In Data Analytics w/ @AlexTheAnalyst | Tina Huang
Tina Huang

The comments sections are WILD | YouTube sentiment analysis - Data science proje...
Tina Huang

🐙 Lunch & Learn: Most Important AI Skills to Learn in 2024 and Q&A Session | Ti...
Tina Huang