generative-ai

Tutorials on generative AI with Python, from prompting LLMs to building your own AI-powered apps.

GenAI: Building AI Agents with LangGraph, CrewAI, and Beyond

A chatbot answers one question and stops. Python AI agents keep going: they read a goal, pick a tool, run it, check the result, and repeat until the job is done. That loop, driven by an LLM (Large Language Model), is the entire idea. This post builds it bare in plain code, then shows the same loop inside LangGraph, CrewAI, and the OpenAI and Claude SDKs. You already met the first piece of this in the LLM API and function ... Read More

NLP: Text Classification with HuggingFace Transformers

A real text classifier in under 50 lines of code is a realistic goal with the Python HuggingFace stack. The Transformers library is the go-to toolkit for modern Natural Language Processing (NLP), and this post uses it end to end: you load a pre-trained model, turn text into tokens, fine-tune on your own labeled data, and run a working sentiment analysis pipeline. “The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge.” Daniel J. Boorstin Last ... Read More

GenAI: Introduction to Large Language Models

A few years ago, the idea that large language models could write a passable email felt like science fiction. Today they write production code, reason through tricky math, and hold conversations that fool experienced engineers. The strangest part: nobody programmed those abilities in. They appeared once models crossed a size threshold, and this guide maps how that happened and what it means for your projects. You already understand Transformers and attention, plus BERT vs GPT, from the earlier lessons. Now ... Read More