Building an LLM-Powered Slackbot
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.
Related posts
- Building Data-Aware AI Applications with Heroku AI and LlamaIndex
Heroku Engineering mediumAdeptA 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. The walkthrough provisions the add-ons via the Heroku CLI. It then shows Python code that points LlamaIndex's OpenAILikeEmbedding at Heroku's embedding endpoint, stores 1024-dimension vectors in PGVectorStore, and queries documents through a query engine. Example use cases include financial report analysis, insurance claim agents and support chatbots.
- Empowering Engineers with AI
Slack Engineering easyNoviceSlack built a set of internal generative-AI developer tools that it estimates will save 10,000+ engineering hours this year. The centrepiece is an escalation-channel bot that classifies posts into six categories using few-shot prompts, then answers from docs, channel history and canvases indexed in Amazon Bedrock Knowledge Bases, with per-channel prompts and similarity thresholds to curb hallucinations. Alongside it run an in-Slack assistant, a web app, CLI tools and a unified LLM platform with a common input/output schema plus Evaluate and Compare playgrounds. Reported results are 30% five-star bot ratings and 70%+ positive chat satisfaction, while hallucinations (~30% of interactions), weak multi-step reasoning and the tuning needed to integrate knowledge sources remain the main limits.
- Hugging Face x LangChain : A new partner package
Hugging Face mediumAdeptlangchain-huggingface is a new Python partner package jointly maintained by Hugging Face and LangChain, replacing community-written integrations that had drifted out of date. It provides HuggingFacePipeline for running transformers models locally, HuggingFaceEndpoint for the serverless Inference API or deployed TGI endpoints via InferenceClient, and ChatHuggingFace, which turns message lists into model-specific prompts with tokenizer.apply_chat_template. For embeddings it offers HuggingFaceEmbeddings (local sentence-transformers) and HuggingFaceEndpointEmbeddings (Hub or TEI instances), each shown with short code examples.
- Slack AI: The Path to Multi-Cloud
Slack Engineering mediumAdeptSlack 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. Each move addressed a concrete pain point: GPU scarcity and scaling latency, model availability lag, idle capacity from workday traffic peaks, multi-month commitment lock-in, and single-provider concentration risk. The Bedrock migration had zero customer-facing incidents, achieved through load tests to size Model Units, shadow requests, A/B quality checks and feature-flag rollouts. Per-feature model fallback hierarchies and telemetry-based cross-provider routing then delivered about 10% quality gains on reasoning tasks and about 67% lower latency on low-token workloads.
- Deploy Mistral Large to Azure and create a conversation with Python and LangChain
Neon mediumAdept
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. The deployment yields an inference endpoint and API key that plug directly into LangChain's ChatMistralAI class. A short Python example builds a conversational LLMChain with a system prompt, ConversationBufferMemory and a chat-history placeholder, and shows the expected output.