Welcome to our presentation on the GenAI – LLM Weather Agent.
The Sydney Water Team chose Manufacturing and Energy as the theme for our use case. Our use case was to develop a chatbot for field service workers as part of their pre-start activities to notify and alert them about extreme weather events around their work site. We utilized the DBRX LLM and embedding model along with the Vector Search Index approach to enrich the LLM with US weather policies and accuweather data for different postal codes. We have a curated collection of PDF files, essential for enriching the knowledge context of LLMs. These documents delve into critical worker safety guidelines during extreme weather conditions, compiled from the Occupational Safety and Health Administration. First, we ingest these files to Databricks volume to equip our models with invaluable insights of a safer working environment. This code automates the extraction of safety guidelines from PDFs. Utilizing Spark, it swiftly parses through directories, extracts information, splits the text in the PDFs into chunks using langchainlibraries and each chunk is saved under a unique id into a structured Delta table. Using the vector search UI in databricks, we created an endpoint to be used by the vector search index. Endpoints for vector search are necessary as they serve as the communication interface between clients and the search system, enabling query processing, scalability, security enforcement, and performance monitoring.
Using the UI in databricks, we created a vector search index table over the delta table that contained the chunks of the PDF documentation. A vector search index table typically contains vectors representing the features or embeddings of data points, along with metadata such as identifiers or labels. These vectors are organized and optimized for efficient similarity search operations, enabling retrieval of relevant data points based on similarity metrics.
Utilising the vector search index and the DBRX model from langchain_communitylibrary we created a retrieve function to be utilised in the chatbot. We used the gradiolibrary to host an app in a public url instance for interact with users. As you can see on the screen the user will type in their question regarding the safety guidelines and suitability for working on site at a specific location and date. The weather agent produces a response generated by the LLM. This response shows the safety guidelines for the weather conditions on the date and location entered by the user.
Built With
- amazon-web-services
- dbrx
- langchuan
- llm
Log in or sign up for Devpost to join the conversation.