Inspiration
Running a small business is hard. There are 33.2M small business owners and 50% with a physical location and OSHA (Occupational Safety and Health Administration) compliance is required for all businesses to keep employees safe. The problem is that small business owners, especially first-time or new owners, don’t know what they don’t know and reading hundreds of pages of OSHA regulations and guidelines is a waste of time. This tool is meant to help make their jobs easier and OSHA compliance as simple as a conversation.
How we built it
We used LangChain for a relevant subset of the law, the OpenAI GPT-4 API, and a shared Google Colab notebook to collaboratively develop the scripts and backend. We also used GPT-4 heavily to assist with evaluating and trying out various front-end options. For the front end we used streamlit and explored a wide variety of tools.
Challenges we ran into
- OSHA regulation is very long so we cut the scope and size of corpus to show the proof of concept in our demo
- No one on the team has a front end background so there was a lot of education with GPT-4 to understand tooling and ramp up quickly
- One teammate is a new father and schedule didn’t work for the second day of the hackathon
Accomplishments that we're proud of
- It’s possible to build a legal tool in 24 hours
- Langchain and data ingestion could be done relatively quickly to allow for playing of prompt engineering
- Engineering can learn frontend relatively quickly with the help of Chat-GPT and GPT-4
What we learned
- It’s best to do an inventory of teammate skills and schedules to make sure we are fully covered on the project’s needs
- It’s helpful to setup project hygeine ahead of time. Everyone has access to tooling (e.g., Github, CoLab) so everyone can contribute
- It’s possible with Langchain to now cite sources of where the AI got their information!
- Legal regulation is a tough corpus to work with and requires further massaging and chunking to get it in the right state for ingestion
What's next for OSH-AI
We have submitted the entire project to Github under open source license. We hope this serves as a resource for other who can learn from and even use our approach for their own projects and explorations.
Built With
- colab
- fastapi
- gpt-4
- langchain
- the-openai-gpt-4-api

Log in or sign up for Devpost to join the conversation.