Loading…
Glossary term
A program that holds conversations with people, today often powered by a language model.
A chatbot is a program that converses in text or voice. Older ones followed scripted rules. Today's are usually powered by large language models, which can handle open-ended conversation.
The system keeps a running history so each reply takes earlier turns into account.
A chat loop with memory
history = []
while True:
user = input("You: ")
history.append({"role": "user", "content": user})
reply = model(history)
history.append({"role": "assistant", "content": reply})
print("Bot:", reply)Chatbots are the best-known face of AI, used for customer support, tutoring and general assistance.