How Setronica Created an AI Slack Bot, Part 1: From Idea to Blueprint

How Setronica Created an AI Slack Bot, Part 1: From Idea to Blueprint

Welcome to the first part of our three-part series, where we’ll take you behind the scenes of creating our AI Slack bot at Setronica. We’re here to give you a detailed look at how we turned a simple idea into a fully functional bot.

 

We built this AI bot to help with our internal needs, making our work lives easier and more efficient. Writing this series also helps us stay focused on the project and reminds us not to throw in the towel.

In this first part, we’ll cover the early stages of our project:

  • What got us excited about making this bot in the first place
  • Key features we wanted to include
  • Tech stack we picked to bring this bot to life

Brainstorming

First, we’ve talked to almost every department – Marketing, HR, Developers, and Support – and guess what? They already use AI technologies for text editing or syntax checking – a massive time-saver. These AI tools help them whip up draft ideas, rough drafts, or quick reference answers, kind of like a supercharged dictionary or Google. But, of course, everyone tweaks the AI-generated results to fit their style and needs.

Now, imagine integrating AI bots right into Slack. It could be a game-changer! We could add more capabilities and features as we go, cutting down on costs for maintaining multiple accounts. Plus, everyone in the company would get easy access to simple query generation. Even better, we wouldn’t be tied down to one language model. We could mix and match different AIs to handle all kinds of questions and tasks.

The idea for our AI Slack bot came from a simple need: make team communication smoother and automate those pesky repetitive tasks. The MVP we envisioned would fit right into Slack and offer a bunch of handy features for all the teams.

Next up, we thought about connecting these bots to specific channels, acting as assistants tailored for each department’s unique needs. Imagine bots that could handle routine tasks, summarize meeting notes, run analyses, generate reports from channel records, and so much more. The possibilities were endless based on how we expanded their applications.

And most importantly, all of these functions are not accessible through GPT-4.

So, let’s see how it all came together.

Planning and Design

First, we zeroed in on some core functionalities that could really make a difference, like automating routine queries, summarizing important info, and offering personalized assistance to different teams.

By tapping into flexible language models and syncing up with Slack’s existing features, we aimed to create a bot that’s not just smart but also versatile and intuitive. The goal was for it to learn and get better over time, making our workflows more efficient and our workdays a whole lot easier.

Market Research

Sure, off-the-shelf bots like DailyBot, Botsonic, and the Language Translation Bot have some cool features, but they tend to be a bit limited and might not cover everything we need across our different departments and projects. But after digging into all the Slack bot options out there, it became pretty clear that a custom solution was the way to go for our specific needs.

AI bots market research

Going custom lets us build exactly what we need, without any compromises.

Feature Breakdown

At first, we mapped out all the formats and how the bot should respond, including the technical details. But after a review, we decided to keep things flexible, making the request formats universal so we can easily integrate with any AI in the future. So here’s the basic algorithm the bot follows:

Slack bot algorithm
  • Forwarding messages: Slack Bot forwards user messages to the LLM API.
  • Processing and response: LLM processes messages and returns responses via Slack Bot.
  • Conversation context: Slack Bot preserves the context of conversations for consistent replies.
  • Error processing: Notifying users about errors when the LLM API is unavailable.

Interaction Considerations

We knew we had to nail how users would interact with the bot. Our goal was to create a super smooth and intuitive user experience, making sure the bot’s responses were spot-on, relevant, and easy to grasp.

We focused on:

  • Designing clear command structures
  • Implementing natural language processing capabilities
  • Creating user-friendly interfaces

We also made accessibility and inclusivity a top priority, ensuring the bot could serve a diverse group of users with different levels of tech know-how. By tackling these interaction aspects head-on, we aimed to turn the bot into an essential part of our daily workflows.

interaction algorithm with bot

We also needed to customize the domain scope context for a multi-user account, meaning every user can tweak their view and interactions to match their specific needs. This personalization is session-specific, so the conversation context only sticks around for the current session – that’s a limitation in GPT-4.

Plus, all the data handled during these sessions is transferred and stored following our company’s strict security policy, ensuring we stay compliant and keep data protected.

Setting Up the Development Environment

Here’s a detailed look at the steps we took to streamline our setup and pave the way for a successful development journey.

Tools and Technologies

Programming Languages:

We went with Java as our main programming language because it’s right up our alley. Our team has a lot of experience in Java, so we know how to make the most of its robustness and extensive ecosystem. Plus, we’ve got a bunch of Java experts on hand to jump in and help out whenever needed.

Frameworks:

For the framework, Spring Boot was an obvious choice. Its simplicity and ease of use allowed us to quickly get our application up and running, while its powerful features provided the flexibility we needed.

Tools:

  • IDE: We opted for IntelliJ IDEA for its powerful features and usability, though some team members preferred Eclipse. Both IDEs are excellent for writing and managing Java code, and they integrate seamlessly with our other tools.
  • Build Tool: Maven was our go-to for managing project builds. Its dependency management and build automation capabilities are unparalleled.
  • Version Control: We used Bitbucket for source code management. Bitbucket’s integration with Jira and other Atlassian tools made it a perfect fit for our team’s workflow.
  • Communication: Slack was our hub for team communication. Beyond just messaging, we integrated Slack with our application for real-time updates, alerts, and collaboration.

APIs:

  • API GEMINI: For data processing and integration, API GEMINI was indispensable. Its capabilities allowed us to handle complex data workflows effortlessly.
API Gemini code 1
API Gemini code 2
  • API ChatGPT: To incorporate AI-based features, we turned to API ChatGPT. Its advanced natural language processing features added a smart, conversational layer to our application.
ChatGPT code 1
ChatGPT code 2

Environment Setup

Build and Deployment using Bitbucket Pipeline:

We utilized Bitbucket Pipeline for our build and deployment processes. Our server at Hetzner played a dual role as both a worker node and a host, running Docker containers with the built application. This setup ensured a robust and scalable deployment environment.

Repository Creation:

Creating repositories was straightforward. Developers could either request repository creation or do it themselves, making the process flexible and efficient.

DNS Management:

All DNS records were managed on our AWS account. Setting up a new record for this application was a breeze, ensuring our deployment was accessible and well-integrated into our existing infrastructure.

What’s next?

So, we’ve got all lined up for the development. We’ve given you the lowdown on the concept, the cool features we want, and the tech stack we’re rolling with – especially our love for Java, where we really know our stuff.

 

But don’t go anywhere just yet. In the next part, we’re getting into the fun stuff: the development process. We’ll share the coding challenges, the breakthrough moments, and all the behind-the-scenes magic that made our bot come to life.

 

Stay tuned!

Related posts

  • All Posts
  • Artificial intelligence

Let’s start building something great together!

Contact us today to discuss your project and see how we can help bring your vision to life. To learn about our team and expertise, visit our ‘About Us‘ webpage.




    This site is protected by reCAPTCHA and the Google
    Privacy Policy and Terms of Service apply.

    SETRONICA


    Setronica is a software engineering company that provides a wide range of services, from software products to core business applications. We offer consulting, development, testing, infrastructure support, and cloud management services to enterprises. We apply the knowledge, skills, and Agile methodology of project management to integrate software development and business objectives effectively and efficiently.