What is an Slack node?

Node in Stack AI

Slack is a messaging platform for teams to collaborate. Users can communicate with each other via channels, which can be organized by project, topic, team, or whatever else is relevant to the organization. Slack also allows for private conversations between two or more users, as well as the sharing of files and documents.

The Slack node allows you to connect with your Slack account and retrieve data from specific channels, so you can feed an AI assistant with that data.

How to use it?

Connections to an Slack node

You will need to link the node with an account. You will need to add your Slack Bot Token and the Channel ID of the channel you want to connect to.

Slack node settings

By clicking on settings, you will be able to change different parameters:

  • Chunking algorithm: by default, the system uses naive algorithm, although you have the option to select sentence.
  • Chunk overlap: by default, the system uses 500. You can also choose as many as you want by clicking the number and editing it.
  • Chunk length: by default, the system uses 1500. You can also choose as many as you want by clicking the number and editing it.
  • Unstructured.io: by default, this option is deselected. Enable it to extract unstructured data from documents.
  • Text in images (OCR): by default, this option is deselected. Enable it if you want to extract text from images that are present in your documents.

Example of usage

A practical application of Slack involves integrating it with an AI assistant designed to answer user queries based on context data from a Slack channel.

Answering questions from users using a Slack channel data

To construct this workflow, employ an LLM to address the users’ inquiries. Incorporate an Input node to funnel the users’ submissions.

Now, build the knowledge base by adding a Slack node and a vector store, to perform the embeddings of the data and store them. The input should query the vector database to only retrieve the bits of information in the channel related to the question (so you don’t spend tokens sending useless information to the LLM).

System prompt (LLM 0)

You are a helpful AI assistant that answers questions on a knowledge base from Slack.

1. Be concise.
2. Be careful with your statements.
3. Try to surprise the user with useful facts.

Prompt (LLM 0)

Context from Slack channel with all the support data:
---
{vec-0}
---

Answer the following question: {in-0}