Conversational AI uses language interaction to make communication easier or automate tasks. An HR help bot can answer recurring questions, while a coding copilot can turn plain-English objectives into code, help recall syntax, write tests, or support learning a language. section 4.5 section 1.1
Some assistants handle specific tasks, such as asking about a gift recipient’s interests and budget before suggesting presents. Other chatbots mainly offer conversation or entertainment. section 1.1
Practical patterns include:
- An FAQ chatbot trained using prepared company Slack data. section 4.5
- A coding copilot integrated into VS Code and focused on Python. section 10.0
Listing 4.12 Example of pulling Slack data
import slack_sdk
import pandas
token_slack = "Your Token Here"
client = slack_sdk.WebClient(token=token_slack)
auth = client.auth_test()
self_user = auth["user_id"]
dm_channels_response = client.conversations_list(types="im")
all_messages = {}
for channel in dm_channels_response["channels"]:
history_response = client.conversations_history(channel=channel["id"])
all_messages[channel["id"]] = history_response["messages"]
txts = []
for channel_id, messages in all_messages.items():
for message in messages:
try:
text = message["text"]
user = message["user"]
timestamp = message["ts"]
txts.append([timestamp, user, text])
except Exception:
pass
slack_dataset = pandas.DataFrame(txts)
slack_dataset.columns = ["timestamp", "user", "text"]
df = slack_dataset[slack_dataset.user == self_user]
df[["text"]].to_parquet("slack_dataset.gzip", compression="gzip")
The example extracts Slack messages, organizes them into a dataset, and filters for the user’s messages as preparation for chatbot training. section 4.5
A Python coding copilot
Build the extension around an already-trained open-source coding model. Use retrieval-augmented generation (RAG), rather than fine-tuning, to make the system easier to update. section 10.0



















