This repository was created to make the world of Generative AI accessible, simple, and hands-on.
Our mission:
- π Empower learners to experiment with LLMs and RAG pipelines.
- π§ Provide clear, beginner-friendly tutorials.
- π Foster creativity and exploration with GenAI tools.
Feel free to fork, adapt, and expand these examples! π―
Download the Student Quick Start Guide (PDF)
The Quick Start Guide walks you through everything with screenshots β how to get the code, which setup path to choose, and what you should see when it's working. Download this before doing anything else.
Follow this sequence for the best experience:
β Tokens & Embeddings β β‘ Semantic Similarity β β’ Search with Embeddings β β£ Model Tradeoffs
β β€ Simple Chatbot β β₯ Temperature & Tokens β β¦ Prompt Engineering β β§ Few-Shot / Zero-Shot
β β¨ Simple RAG β β© LangChain Basics β βͺ What is an Agent?
β π Interactive Demos (Streamlit) β π AgenticAI Foundry
π‘ Notebooks marked β No API Key run entirely in Google Colab for free. Notebooks marked π API Key require an OpenAI key.
Welcome to the GenAI Foundry learning series! All notebooks can be opened directly in Google Colab β no local setup required.
| # | π Notebook | π Description | π API Key | β±οΈ Time | π Colab |
|---|---|---|---|---|---|
| 12 | What is an Agent? | From chatbots to agents β the ObserveβThinkβAct loop explained | β Free | ~20 min |
These demos let you see the concepts from the notebooks in action β no coding required. They are a multi-page Streamlit application running in a single Docker container.
π Notebooks β Demos connection: The RAG Visual Explorer (below) visualises exactly what happens in notebooks 3 and 9. The RAG Chat demo is the production version of what you build in notebook 9.
Connects to: Notebooks 1, 2, 3, 9
See how Retrieval-Augmented Generation works under the hood:
- Chunking β Watch documents split into searchable pieces
- Embeddings β See text transform into numerical vectors
- Vector Space β Visualise how similar content clusters together
- Semantic Search β Compare keyword vs. meaning-based search
Connects to: Notebooks 7, 8 (prompt engineering concepts)
Explore structured knowledge and "what if" analysis:
- Ontology Explorer β Interactive knowledge graph of cybersecurity risks
- Counterfactual Analysis β Test what happens when controls fail
- LLM Validation β Verify AI outputs against ground truth
Connects to: Notebooks 9, 10 (RAG + LangChain)
A complete document-grounded chat assistant powered by RAG:
- Upload β Load your own PDF or TXT documents
- Index β Documents are chunked, embedded, and stored in a FAISS vector database
- Chat β Ask questions and get answers grounded in your uploaded content
- Learn β See RAG in action as a complete end-to-end pipeline
π How RAG Chat Works β Deep Dive Guide
π Detailed Docker Guide for Beginners
| Step | Command |
|---|---|
| 1. Clone this repo | git clone https://github.com/dlwhyte/GenAI_foundry.git |
| 2. Navigate to repo | cd GenAI_foundry |
| 3. Build container | docker build -t genai-foundry . |
| 4. Run demos | docker run -p 8501:8501 genai-foundry |
| 5. Open browser | http://localhost:8501 |
With an OpenAI API key (required for Ontology demo + RAG Chat):
docker run -p 8501:8501 -e OPENAI_API_KEY=sk-your-key-here genai-foundry
π‘ Without the -e flag, you can still enter your API key in the sidebar on any page that requires it.
π How to Get an OpenAI API Key
π‘ Don't have Docker? Download it from docker.com/products/docker-desktop
New to all of this? Follow these 3 steps:
- Start with a free notebook β Click any Colab badge in the Part 1 table above. No account or setup needed.
- Get an API key when ready β Create an OpenAI key to unlock the Part 2 notebooks. Costs pennies per session.
- Run the interactive demos β Install Docker Desktop, then follow the 5-step table above.
| Action | Description |
|---|---|
| π₯ New here? | Download the Student Quick Start Guide (PDF) |
| β New to GitHub? | Start here |
| β Docker setup | Learn how to install and use Docker for running demos |
| β Open notebooks | Open and run the notebooks directly in Google Colab β click any badge above |
| β Get an API key | Create your OpenAI API key to enable model access |
This project is licensed under the MIT License β free to use, modify, and share! See the LICENSE file for more details.
This repo covers the foundations of Generative AI β how LLMs work, how to prompt them, and how to build RAG pipelines.
When you're ready to build AI systems that take action in the world, continue to the companion course:
π AgenticAI Foundry β Multi-agent systems, tool use, MCP, and agent security
| GenAI Foundry covers... | AgenticAI Foundry covers... |
|---|---|
| Tokens, embeddings, and how LLMs work | How agents observe, think, and act |
| Prompt engineering and few-shot learning | Multi-agent orchestration with CrewAI |
| RAG pipelines and vector search | Connecting agents to real tools via MCP |
| LangChain basics | Agent security and prompt injection defense |
| Recommended first β | Take after GenAI Foundry β‘οΈ |
