sudo systemctl start redis # start redis
ollama run tinyllama # install model
# then...
templ generate # if you've made any modifications to .templ files
go run main.go
Project Overview
This website is meant to serve as a simple framework for challenging students to manipulate large language models into doing what they want.
Administrators can provide prompts with CTF flags and challenge students to get the flags from the model. See ./example-prompts.json for example prompts. The URL determines prompt selection with /chat/{promptName}.
[!NOTE]
Usage of ./ai-hacking-lab:
-address string
the address to host the server on (default ":3000")
-maxTokens int
the maximum number of tokens in a response. (default 100)
-modelName string
the name of the LLM in the Ollama library (default "tinyllama")
-modelTemperature float
the 'temperature' of the LLM (default 0.1)
-redisAddress string
the address to connect to redis on; must not include protocol (default "localhost:6379")
-ollamaAddress string
the address to connect to ollama on; must include protocol (default "http://localhost:11434")
-promptPath string
the filepath to load prompts from (default "./example-prompts.json")