Free module
Building a chatbot
Learn building a chatbot hands on: keep a conversation, trim it, write a system prompt, stream answers into a web page and cite sources.
The lessons
Each lesson is free to read in full. Create a free account to run its commands in a live lab and to sit its quizzes and tasks.
1 · Container lab
How a chatbot remembers a conversation
I can keep a conversation between requests.
Read the lesson2 · Container lab
How to trim a chat history to fit
I can keep a conversation inside the model's limit.
Read the lesson3 · Container lab
How to write a system prompt that holds
I can write a system prompt and test whether it holds.
Read the lesson4 · Container lab
Streaming a chatbot answer into a web page
I can show a streamed answer in a web page as it arrives.
Read the lesson5 · Container lab
How to make a chatbot cite its sources
I can show which source an answer used.
Read the lesson6 · Container lab
How to build a working chatbot
I can put state, trimming, a prompt, streaming and sources into one chatbot.
Read the lesson
Worked in a real lab
Every lesson of this module is worked in a lab started for you alone. The labs it uses:
Teaching a class? Set this module for your students with a teacher guide, marked assignments and a lab for every student.