cyber-security-resources/ai_research/labs/gorilla.md
2023-09-05 21:06:54 -04:00

3.4 KiB

Using Gorilla CLI

To complete this lab you only need a Linux computer with Python. For your convenience, you can use the terminal window in the following interactive lab: https://learning.oreilly.com/scenarios/ethical-hacking-active/9780137835720X003/

TIP: There are several Cybersecurity-related interactive labs that are free with your O'Reilly subscription at: https://hackingscenarios.com

What is Gorilla?

The University of California Berkeley in collaboration with Microsoft have unveiled "Gorilla", a sophisticated model founded on the LLaMA model, reputed to surpass GPT-4 in generating API calls proficiently. A notable characteristic of Gorilla is its cohesive function with a document retriever, facilitating it to adapt smoothly to alterations in documents throughout the testing phase. This flexibility is vital, particularly when navigating the fluctuating nature of API documentation and versions. Moreover, Gorilla has the capability to significantly mitigate the hallucination issues, which is a common obstacle faced when utilizing Large Language Models (LLMs) directly.

They also created "APIBench", a comprehensive dataset that includes APIs from notable platforms such as HuggingFace, TorchHub, and TensorHub. The operational efficacy of Gorilla highlights the enormous potential harbored by this kind of LLMs and their applications. This amalgamation not only assures finer tool precision but also the capacity to stay abreast with the continuously updating documentation. Those keen on delving deeper into Gorilla can find the models and corresponding code at: https://github.com/ShishirPatil/gorilla. More details and the research paper are available at: https://gorilla.cs.berkeley.edu/

Using Gorilla CLI

I have a few examples of using Gorilla for Cybersecurity in this article. However, let's go over a few examples:

  • Step 1: You have access to labs and playgrounds in O'Reilly. Navigate to the following lab and maximize the terminal window: https://learning.oreilly.com/scenarios/ethical-hacking-active/9780137835720X003/

  • Step 2: Install gorilla-cli using the command pip3 install gorilla-cli image

  • Step 3: Start interacting with it. The following is an example of a prompt to learn how can you see your IP address in Linux: image

It will always give you different options to select from. After selecting the most appropriate option, the command is executed: image

  • Step 4: This is another example: image image

  • Step 5: How about Python? image

Keep playing with it... The amazing part about Gorilla is the extensive APIs it supports.