From the course: Python for AI Projects: From Data Exploration to Impact

AI use cases

- [Instructor] Throughout this course, we'll be using our Explore California case study to ground our explorations into the world of AI and machine learning. Explore California is an e-commerce business that provides detailed information on many tourist attractions throughout California, and also has a series of tour products that can be purchased directly on the website. Our first business use case is to utilize natural language processing to help users on the website to explore tourist attractions and tour products more naturally, whether they're looking for best beaches for families or hidden hiking trails near Yosemite. As we familiarize ourselves with the Explore California data sets, we'll begin to compare different approaches to our search problem. We'll start with traditional keyword-based search where results depend purely on exact word matches. Then we move to TF-IDF, a classic NLP method that scores how important a word is within a document relative to the whole dataset. From there, we take a leap into semantic search using BERT-based sentence transformers. These NLP models embed entire sentences into a vector space, letting us compare the meaning of our text data, not just the words within them. This enables much smarter, more flexible search where kid-friendly hikes and family nature walks can surface similar meaningful results. Finally, we compare all of these to LLM-powered responses using models like GPT, Gemini, or Claude, which is now considered the foundations of AI. We'll investigate deeply into these LLM-powered responses where an advanced model reads through the full document and generates a natural language summary or answer. This will be like our Explore California visitor chatting with a local guide who has all the insider knowledge behind the scenes. This progression gives you both the theoretical grounding and practical skills to build and evaluate modern AI search systems and decide which approach is best for your project. Next, we'll look into our second use case, product recommendations using supervised machine learning. Imagine you're on the Explore California website and the system suggests the perfect tour package for you based on your interests and past browsing behavior. Behind the scenes, this is a multi-class classification problem, a classic example of traditional supervised machine learning. While today's conversation around AI is often dominated by large language models, AI is not just about LLMs. In fact, many of the most valuable and scalable AI systems in production today are powered by supervised or semi-supervised machine learning models on structured data. In this project, we'll use historical sales data and user attributes such as demographics, past visits, and travel preferences to train a machine learning model that predicts which product a user is most likely to purchase from a set of options. Our focus is not just about running a model. We'll explore the entire machine learning pipeline, from feature engineering to transform raw data into meaningful input variables, to model training and tuning, which includes hyper-parameter optimization. We'll also look into performance evaluation using metrics that go beyond just accuracy. And finally, we'll cover model explainability with tools like SHAP and LIME so we can understand why the model is making specific predictions. Once we've built and tested the model, we'll go one step further. We'll learn how to integrate this model as a tool in an AI workflow where it can be called as part of a structured pipeline or even dynamically by an AI agent as part of a larger, more complicated autonomous flow. This shows how traditional machine learning and modern AI systems can work together to build powerful intelligent applications. For our final use case, we'll bring everything together to build a smart AI chat interface. We'll build a context-aware AI travel agent for our Explore California case study, one that can answer customer questions, summarize product descriptions, and even explain the difference between two similar tours. Think of it as a virtual travel expert, available 24/7, but instead of relying on hard-coded responses, it's powered by large language models and enhanced with Explore California company data, including attraction information, tour product metadata, and personalized recommendations. This is where the earlier lessons in NLP and supervised machine learning come full circle. We'll use the tools and techniques we've already built from semantic search and classification models to prompt engineering and integrate them into various AI workflows using Python. You'll learn how to use retrieval to inject relevant information into the AI agent's context. We'll also register custom tools like our recommendation model, text summarizes, and product explainers. We'll enable multi-step reasoning so our AI agent can plan, call tools and generate intelligent responses. And finally, we'll build it using a framework called LangChain, so it's modular, reusable, and easy to extend. To create a real tangible product that incorporates all of our work, we'll wrap everything together into a polished Streamlit app. This gives you a clean, interactive frontend that showcases your entire AI system from data processing to live agent responses all in one place. Not only will this be fully functional, but it's also a perfect launch pad for your own AI applications and an excellent addition to your Python portfolio. It's a shareable, deployable example that demonstrates real-world AI skills, and this shows employers or collaborators what you're capable of building end to end. So whether you're here to sharpen your Python skills, explore the latest in AI, or just build something genuinely cool, you're in the right place. We'll cover a lot of ground, but you'll come away with practical tools, working code, and the confidence to build AI systems that actually do something useful. Let's get started. We've got a lot of work ahead of us.

Contents