Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

912 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Screenshot 2025-07-26 at 12 04 07 AM

link to PyPi link to PyPi

Overview

Welcome to the XLab AI Security Guide. You can view the contents of the course at https://xlabaisecurity.com/

This course covers a wide variety of topics in AI Security. For each topic we cover, there is a webpage describing the concept (example here). For most topic pages, the website will link to a series of coding excercises for hands-on experience with the concepts we describe. You will have the option to run the code you write either locally or in the cloud with Google Colab.

This project is still in development. For now, most of the content in the adversarial basis section has been completed. We are currently developing the LLM jailbreaking sections and hope to be done in the next few weeks.

If you want to get started using our guide, below are some useful links:

  1. The welcome page: This explains what we mean by "AI security" and why we think this area of work is important.
  2. Prerequisites: Before diving into the content of the course, make sure you read this page so you are aware of what we assume you know.
  3. Installation: If you are not planning on running your code in Google Colab, you will have to install a few packages. This page provides instructions for how to install these packages, including xlab-security which we developed internally.

Development Details

In this monorepo, we include our Python package, the website, and the code for every pre-trained model we developed for this course. Note that all models are hosted on our Hugging Face rather than our GitHub.

Python Package

This repository contains the code for xlab-security, a Python package that we have developed for this course. Students use this package to import useful utility functions and run tests for the coding excercises they complete.

The link to the production version of the Python package can be found here. To install the production version of the package, you can run:

pip install xlab-security

Once you have installed the package, you can import it within your Python file or Jupyter notebook by writing:

import xlab

For the web app

To run the app locally run:

cd ai-security-course
npm run dev

To build the app run:

rm -rf .next
npm run export

This will generate an out directory which can be placed on a web server.

About

An online AI security course created by UChicago's XLab

Resources

Stars

38 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages