# Building an LLM-Powered Slackbot

DevFeed: [Building an LLM-Powered Slackbot](<https://devfeed.tech/articles/building-an-llm-powered-slackbot-20124.md>)

Original publisher: [Read original article](<https://benchling.engineering/building-an-llm-powered-slackbot-557a6241e993?source=rss----3d4aa8fb07ea---4>)

Author: Christian Monaghan

Published: 2024-12-13T17:32:12Z

Content type: tutorial

Language: en

Sources: [Benchling](<https://devfeed.tech/sources/benchling.md>)

Topics: [Large Language Model](<https://devfeed.tech/topics/llm.md>), [Retrieval Augmented Generation (RAG)](<https://devfeed.tech/topics/retrieval-augmented-generation-rag.md>), [Slack](<https://devfeed.tech/topics/slack.md>), [Terraform](<https://devfeed.tech/topics/terraform.md>), [Amazon Bedrock](<https://devfeed.tech/topics/amazon-bedrock.md>), [cloud-infrastructure](<https://devfeed.tech/topics/cloud-infrastructure.md>), [Self-hosted](<https://devfeed.tech/topics/self-hosted.md>)

Tags: [amazon-bedrock](<https://devfeed.tech/tags/amazon-bedrock.md>), [building](<https://devfeed.tech/tags/building.md>), [infrastructure](<https://devfeed.tech/tags/infrastructure.md>), [knowledge-base](<https://devfeed.tech/tags/knowledge-base.md>), [large-language-models](<https://devfeed.tech/tags/large-language-models.md>), [llm](<https://devfeed.tech/tags/llm.md>), [rag](<https://devfeed.tech/tags/rag.md>), [retrieval-augmented-gen](<https://devfeed.tech/tags/retrieval-augmented-gen.md>), [self-hosted](<https://devfeed.tech/tags/self-hosted.md>), [slackbot](<https://devfeed.tech/tags/slackbot.md>), [terraform](<https://devfeed.tech/tags/terraform.md>)

## AI overview

Benchling describes building an internal Slackbot that uses Retrieval-Augmented Generation and Amazon Bedrock to help engineers find answers to Terraform Cloud questions from sources including Slack, Confluence, and the web.

## Source excerpt

Background At Benchling we run cloud infrastructure across several regions and environments. To coordinate and manage this complexity, our team operates a self-hosted implementation of Terraform Cloud, managing around 160,000 terraform resources across five data centers. About 50 engineers from across the engineering org release some form of infrastructure change within a given month -- some are infrastructure specialists, and others are application engineers who are completely new to Terraform Cloud. Understandably, we get a lot of questions about how to use Terraform Cloud or how to debug a specific issue, and that forum is usually in Slack. We have a glorious 20-page FAQ in Confluence that answers most questions, supplemented by numerous Slack threads documenting previous problems and their eventual solutions. So we have good documentation, but finding it is a pain. Who wants to read through a 20-page FAQ? Or go Slack spelunking to find that answer 40 messages deep into a thread? We set out to solve this problem by building a Slackbot that could dynamically answer any user question without doing any tedious searching. To accomplish this we implemented a Retrieval-Augmentated Generation (RAG) Large Language Model (LLM). Here's the story of how we did it and what we learned along the way. What we built We built an internal Slackbot that enables Benchling engineers to interact with a knowledge base to answer common Terraform Cloud questions. It also serves as a reference implementation for future LLM-powered tools at Benchling. It demonstrates how we can combine disparate information sources, both internal and public (web, Slack, Confluence), with the latest Large Language Models to expose this to the user through a familiar Slack interface. This pattern can be reused to develop Slack assistants for other specialized knowledge areas such as answering HR questions, surfacing past solutions to customer issues, or explaining software error codes. Here's what the interfa