Home Artificial Intelligence 2023 SF MLOps Community Hackathon: Constructing a Tech Q&A Slack Bot with OpenAI API

2023 SF MLOps Community Hackathon: Constructing a Tech Q&A Slack Bot with OpenAI API

0
2023 SF MLOps Community Hackathon: Constructing a Tech Q&A Slack Bot with OpenAI API

The was built using Go to record any latest incoming MLOps Community Slack messages into an area Redis database using the publish/subscribe design pattern. We also built a which retrieved latest stored Slack from the Redis pub/sub database, after which used OpenAI’s embeddings, computed and stored for the historical MLOps Slack data on a Redis Vector Database, to look for related Slack messages. The highest n most relevant historical Slack data were then summarized into an using OpenAI’s chatCompletion service, including some prompt engineering to prioritize historical Slack questions over any summarized text and to supply some rough guidance on the format. To further cleanse the info to provide essentially the most relevant technical Q&A answers, we limited the dataset to only include MLOps Community Slack channels that seemed to be focused on technical discussions and support. The message was then passed to the Redis pub/sub database, triggering the Go Slack Observer module to publish the reply as a latest thread on our Slack channel hackathon UI.

For added visual interest, we also created an as a separate Svelte/JS web application built using to visualise the OpenAI embeddings of the MLOPs Slack data to indicate the clusters of related Slack messages found inside the Community. UMAP or (Uniform Manifold Approximation and Projection) is a preferred dimensionality reduction technique, which assumes the unique dataset lies on a smooth Riemann Manifold with a positive-definite tangent at every point that could be represented as a fuzzy topological structure. The UMAP algorithm computes embeddings for the info based on a projection of the info to a lower-dimensional representation with the closest equivalent fuzzy topological structure.

We were capable of get our first end-to-end test working by 3pm:

After some refinement of the ultimate format of the Q&A Slackbot we had our first working demo. A typical Q&A session with a sound technical query would seem like this:

A typical Q&A session response with a non-question would receive this error response:

If no prior related questions had been asked on the MLOps Community slack channels, this is able to be a typical response acknowledging that fact and providing helpful related information via GPT4.

Based on these results, our team won the 2023 MLOps Community Hackathon!

Proud members of Team Jumping Frogs and Bouncing Turtles.

Overall, this hackathon improved my understanding of easy methods to use the OpenAI API in Python for making a text-based search engine in addition to exposed me to a possible approach for fine-tuning the OpenAI base LLM with latest data and precise prompt instructions. Through the use of OpenAI’s embeddings/weights of input data in accordance with the nodes within the GPT4 Large Language Model, one can compute a similarity between any two messages and supply a rating of past data most much like an input query. Essentially the most similar past data can then be processed further to generate the form of response that’s required for a specific design problem. For more learning on OpenAI’s API, take a look at their examples, github repo, API documentation, or an in-person or virtual class.

LEAVE A REPLY

Please enter your comment!
Please enter your name here