A small sample application showing the capabilities of LLMs for application security.
We go from prompts to agents to show how agents can investigate code and find vulnerabilities.
Create a .env file with the following variables:
OPENAI_API_KEY=<your openai api key>Run the following command to start the application:
bundle install
bundle exec ruby main.rb-
src/contains the code for the application --src/prompts.rbcontains the prompts for the LLMs --src/tools.rbcontains the tools for the LLMs --src/openai.rbcontains the OpenAI API client -
example/contains the example code for the application --example/few_shot/contains the example code for the few shot prompt --example/zero_shot/contains the example code for the zero shot prompt -
example/agent/contains the example code for the agent
Copy the code from agent.txt into the main.rb file