The sequence below follows the hilltribe departure, the version that puts the most distance between you and a bus seat. The ends of the trip flex; the middle does not.
Day 1: Bangkok
Flights can land at any hour. Everything except a welcome meeting with the group leader stays loose, and the evening belongs to Khao San Road, where the group goes out for a beer or a tea and, if you are willing, a deep-fried scorpion. No meals are included.
Day 2: Bangkok, Then the Train
A free day in the city. Wat Pho, the Grand Palace, the National Museum and Jim Thompson's House are the four stops that fit one day, and a riverboat through the klongs shows how the city lives along the water. The overnight train to Chiang Mai leaves that night.
Day 3: Chiang Mai
The first morning in the north is a street food crawl, and the warning is literal: arrive hungry, because the group eats more than three times. Free hours after that cover Doi Suthep, the Sankampang Hot Springs or a Thai boxing match.

Day 4: Into the Hills
An open pickup truck carries the group to Mae Malai, where there is time to buy food and snacks at the local market before the walking starts. The trek runs through forest and rough ground to Baan Mae Jok, a Karen village, where the night is spent in basic thatch bungalows. Villages this close together still keep separate languages, beliefs, dress and customs.
Day 5: Village to Village
Three and a half to four hours of walking brings the group to lunch, then about an hour more to Ban Pa Khao Lam. A stop at a Karen village shows how blankets and scarves are woven, and the Mae Tang River may offer a chance to fish with local tools or lash together a bamboo raft.
Day 6: Raft Out, Dinner In
The morning exit is by bamboo raft down the Mae Tang River, with a visit to a Lahu village near Ban Pong Ngan on the way. A van meets the group after lunch for the ride back to Chiang Mai, where dinner means khao soi and sai oua, and the night ends at the Anusarn Night Market.

Day 7: Chiang Mai, Then South
The last full day is unscheduled. Shopping in the market, a Thai massage, another bowl of khao soi and any temple you skipped will fill it. The overnight train back to Bangkok leaves in the evening.
Day 8: Bangkok
The train reaches Bangkok around 8 a.m., so book a flight out no earlier than 1 p.m. That window is the one hard limit on the whole route, and it is worth checking before you buy the ticket home.