---
title: "Building an LLM-Powered Slackbot"
description: "Benchling built an internal Slackbot that answers Terraform Cloud questions using a RAG pipeline on Amazon Bedrock knowledge bases, with OpenSearch Serverless as the vector store, Titan Text Embeddings v2 for embedding and Claude 3.5 Sonnet v2 for generation."
url: "https://swe.quest/articles/building-an-llm-powered-slackbot-8b70f8b894688144"
canonical: "https://benchling.engineering/building-an-llm-powered-slackbot-557a6241e993"
source: "Benchling Engineering"
published: "2024-12-13"
difficulty: "medium"
kind: "Case study"
reading_minutes: 10
tags: ["rag","llms","cloud","infrastructure-as-code","developer-productivity"]
---

# Building an LLM-Powered Slackbot

A post on [Benchling Engineering](https://swe.quest/sources/benchling.md), published 2024-12-13, 10 min read, Case study. Original: [https://benchling.engineering/building-an-llm-powered-slackbot-557a6241e993](https://benchling.engineering/building-an-llm-powered-slackbot-557a6241e993)

## Summary

Benchling built an internal Slackbot that answers Terraform Cloud questions using a RAG pipeline on Amazon Bedrock knowledge bases, with OpenSearch Serverless as the vector store, Titan Text Embeddings v2 for embedding and Claude 3.5 Sonnet v2 for generation. A Slack app calls API Gateway, which invokes a stateless Python Lambda. Data sources are a Confluence FAQ exported to PDF, selected HashiCorp docs and hand-copied Slack threads. The key lesson concerned chunking. Bedrock's default 300-token chunks cut multi-step answers in half, and hierarchical chunking with a 1500-token parent size, matched to the longest FAQ answer, worked best. The post includes Terraform for the API Gateway, Lambda and IAM, and lists limitations such as no image support and no Terraform provider support for Bedrock knowledge bases.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [RAG & retrieval](https://swe.quest/tags/rag.md) (AI & ML)
- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)
- [Cloud platforms](https://swe.quest/tags/cloud.md) (Infrastructure)
- [Infrastructure as code](https://swe.quest/tags/infrastructure-as-code.md) (Infrastructure)
- [Developer productivity](https://swe.quest/tags/developer-productivity.md) (Engineering practices)

## Prerequisites

- AWS Lambda and API Gateway ([easy posts on Cloud platforms](https://swe.quest/tags/cloud.md?difficulty=easy))
- Terraform basics ([easy posts on Infrastructure as code](https://swe.quest/tags/infrastructure-as-code.md?difficulty=easy))
- RAG concepts ([easy posts on RAG & retrieval](https://swe.quest/tags/rag.md?difficulty=easy))

## Keywords

Amazon Bedrock, Terraform Cloud, OpenSearch Serverless, Claude 3.5 Sonnet, Amazon Titan Text Embeddings, Slack, AWS Lambda

## Related posts

- [Building Data-Aware AI Applications with Heroku AI and LlamaIndex](https://swe.quest/articles/building-data-aware-ai-applications-with-heroku-ai-and-llamaindex-8f85403b0aabecc2.md): Heroku Engineering · 2025-08-19 · Medium · 4 min read · RAG & retrieval, Vector search, PostgreSQL, Python, LLMs
  A RAG stack on Heroku pairs LlamaIndex for ingestion, indexing and retrieval with Heroku Managed Inference (Claude 4 Sonnet via an OpenAI-compatible API), Cohere Embed Multilingual for embeddings, and Heroku Postgres with pgvector as the vector store.
- [Empowering Engineers with AI](https://swe.quest/articles/empowering-engineers-with-ai-c490ba73d4a1f2fc.md): Slack Engineering · 2024-11-08 · Easy · 7 min read · AI for coding, RAG & retrieval, LLMs, Developer productivity, ML platforms
  Slack built a set of internal generative-AI developer tools that it estimates will save 10,000+ engineering hours this year.
- [Hugging Face x LangChain : A new partner package](https://swe.quest/articles/hugging-face-x-langchain-a-new-partner-package-4a05b92542fbd2d8.md): Hugging Face · 2024-05-14 · Medium · 4 min read · LLMs, Python, Inference & serving, RAG & retrieval
  langchain-huggingface is a new Python partner package jointly maintained by Hugging Face and LangChain, replacing community-written integrations that had drifted out of date.
- [Slack AI: The Path to Multi-Cloud](https://swe.quest/articles/slack-ai-the-path-to-multi-cloud-ce2850c85b697c97.md): Slack Engineering · 2026-05-28 · Medium · 14 min read · Inference & serving, Cloud platforms, Resilience, LLMs, Capacity planning
  Slack AI's LLM serving evolved over three years through four phases: self-managed AWS SageMaker endpoints in an escrow VPC, Amazon Bedrock Provisioned Throughput, a hybrid of Provisioned Throughput and On-Demand with spillover routing, and finally a multi-cloud setup adding GCP Vertex AI.
- [Deploy Mistral Large to Azure and create a conversation with Python and LangChain](https://swe.quest/articles/deploy-mistral-large-to-azure-and-create-a-conversation-with-python-and-9f252b9b3fd4d808.md): Neon · 2024-02-27 · Medium · 4 min read · LLMs, Python, Cloud platforms
  Mistral Large, Mistral AI's flagship model with a 32k-token context window and leading MBPP and GSM8K scores, can be deployed through Azure AI Studio as a Pay-As-You-Go project in the France Central region.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
