This repository has been archived on 2025-04-28. You can view files and clone it, but cannot push or open issues or pull requests.
gensec-westgate-djw2/hw1
2024-04-25 13:55:29 -07:00
..
__init__.py add support for ksp rag from hw1 2024-04-25 13:55:29 -07:00
.env.example add env example 2024-04-19 00:02:36 -07:00
app.py add support for ksp rag from hw1 2024-04-25 13:55:29 -07:00
loader.py update app.py, requirnments.txt and readme; features and cleanup 2024-04-18 23:52:54 -07:00
README.md add env example 2024-04-19 00:02:36 -07:00
requirements.txt update app.py, requirnments.txt and readme; features and cleanup 2024-04-18 23:52:54 -07:00
screencast_url.txt update screencast url 2024-04-19 00:59:06 -07:00
search.py update app.py, requirnments.txt and readme; features and cleanup 2024-04-18 23:52:54 -07:00

HW1 for gensec

This is a RAG LLM application for asking questions about Kerbal Space Program (KSP). KSP and KSP 2 are very technical games relying on orbital physics and players often want to quickly learn more about celestial body characteristics, common orbital manuevers, delta-v requirnments, and so-on. The player maintined wiki contains almost all of this information, so my application uses this as a primary source

Enviornment

Install python3, then run the following:

pip install -r requirements.txt
cp .env.example .env

After, populate .env with your OPENAI_API_KEY and FIREWALL_API_KEY

Loading

This will take some time (2 minutes for ~75), so be patient. Firewall does have support to query for the status of a long running API call, so I will add status feedback later

python3 loader.py

Testing

The loaded documents can be tested at this point with the search script

python3 search.py

Running

python3 app.py

Example Questions

llm>> How much delta-V is required to exit Kerbin?
llm>> How many moons does Jool have?
llm>> How large is Gilly's sphere of influence?
llm>> Describe Eve's physical characteristics
llm>> Does the game support multiplayer?
llm>> Which engines are good for deep space travel?

Enjoy!