Building a Chatbot for the Deans’ Office

Summer vacation is a time that growth-oriented educators use for reflection, rejuvenation, and professional development. As a new dad with a baby at home, this wasn’t an ideal summer for me to travel to conferences or take courses; instead, I focused on growing my tech skills. The end result is a cool product that I built to satisfy my curiosity in artificial intelligence: a chatbot.

If you aren’t familiar with the concept of a chatbot yet, you soon will be, as they are on the brink of becoming ubiquitous. In brief, a chatbot is a bit of code that masquerades as an interlocutor inside a messaging app, such as Facebook Messenger, or WhatsApp, or iOS’s native text-messaging app. You typically use these messaging apps to talk to people you know, but more and more you are going to find yourself talking to businesses though this medium. Or rather, you will be talking to bots that are programmed to do a limited number of tasks while interacting with you in what seems like natural language.

Why is this process going to happen? Because that’s where the eyeballs are. I remember seeing a Wired Magazine article in 2010 declaring the death of the Web, and thinking to myself, “That’s ridiculous; the Web is still young, and I love the Web. Why would I ever stop using the Web?” But the authors (Chris Anderson and Michael Wolff) were prescient. I avoid using a web browser as much as possible these days and interact with the internet through apps instead. I don’t open Firefox and navigate to google.com; instead I tap the Google app on my iPad. But now, not even six years later, the techno futurists are assuring us that we are on the brink of the next era. In this new phase of the internet, we will interact with all of our favorite sites and services without ever leaving our texting app. How do they know this? Well, it’s already happening in Asia. (WeChat and Line are two of the messaging apps that are on the cutting edge of this change.)

As recently as this past May, it would never have occurred to me to build a chatbot. But about a year ago, I heard about a much-ballyhooed a.i. digital scheduling assistant named Amy, produced by a company called x.ai. I signed up for a beta account, and then waited, and waited, and waited. Then suddenly in May I came off the wait list and started testing out Amy. Amy isn’t a chatbot, but she is an a.i. bot that works through your email and calendar. While complex and powerful a.i. personas such as Siri get most of the attention, the new wave of useful bots are built to do very specific tasks, but do them with excellent results. Amy only does one thing: If you have agreed to set up a meeting with someone, she takes care of the irritating emails back-and-forth as you and the other party(s) try to find the right time and place. She does this amazingly well, and uses such convincing natural language that you would believe that she is a real person.

I got to use Amy for about a week to impress a couple of colleagues at work, but then summer vacation began, and I was left wondering what other bots are out there that I should know about. I began reading every article on the topic that I could get my hands on, and I discovered a young but rapidly expanding world of chatbots. For the last month I’ve been using a chatbot that helps you save money, called Digit. It isn’t exactly a bank account, but it’s very close, and you can see that very soon we will all be interacting with our banks via bots like this. Unlike quite a few bots that I’ve tried out this summer, Digit really works. It isn’t buggy and it does what it says it’s going to do; namely, it sweeps tiny amounts of cash out of your checking account when you aren’t looking, and then holds them in a (rather lame, non-interest-paying) savings account. Digit sends you upbeat text messages to update you on your savings, and you can text message it back to ask it how much money is in your account, or to ask it to transfer cash back to your real bank account

The success of Amy and Digit got me thinking about my job in the Deans’ Office at George School. We are a high-traffic corner of the school’s administration, and we are frequently bogged down in onerous data-collection tasks. What if we had a chatbot that worked on a platform that the students use often, such as Facebook Messenger? Would this more frictionless medium make it easier for us to collect information that we need, such as vacation travel plans? And would we be able to reduce the number of phone calls that we receive asking for information that is available on the school’s web site if people could just ask a bot that lives in their phone? Too bad, I thought, I’ll never get to find out, since I don’t have the coding skills to build a chatbot, and this cutting edge tech must be far beyond my abilities, right?

As a flag-waving member of the Connected Educator community, I do a lot of my professional development through Twitter. And good old Twitter brought me the solution in the form of a tweet from a company called Flowxo. They claim that you can use their platform to build a chatbot without having to write any code. And so my three-week adventure in building a chatbot for our Deans’ Office began in earnest.

After signing up on Flowxo’s website and poking around a little, I tried brainstorming a list of all of the things with which a chatbot might be able to help the Deans’ Office. Examples include:

  • Collecting vacation travel information
  • Providing information on upcoming assembly times/subjects
  • Providing information about sports contests times/locations
  • Answering questions about school rules
  • Answering questions about sign-out procedures
  • Communicating about minor discipline
  • Submitting reports about missing belongings
  • Providing updates about inclement weather delays/closings
  • Allowing students to pull up individualized schedule information

I spent a couple of weeks tinkering during spare moments when my son was asleep. (Time: a rare commodity when you have an eight-month old.) Through a lot of trial and error and ignorant bumbling, I came to the conclusion that Flowxo’s “application” template would help me design successful functionality for collecting vacation travel information and allowing students to submit reports of missing belongings. My attempts to use RSS feeds from the school’s website to move information in the other direction (from the school to the end user, as opposed to from the end user to the school) were unsuccessful. After my chatbot is unveiled, it’s possible that members of the school’s IT team will be able to quickly help me to figure out the things that I couldn’t do on my own. I wanted to stubbornly work on this project by myself, so I didn’t ask anyone for help. (Although my wife, mother-in-law, and an advisee helped me test the bot once I activated it.)

The two “flows” that the chatbot now performs are simple, but they work beautifully. Both gather information from users through relatively elegant natural language, then they fire off automated emails with the data collected. The vacation travel information flow isn’t nearly as detailed as the online form we have on our web-based parent portal, but we struggle to get anything close to 100% of parents to submit the information using that form. If students or parents will adopt the chatbot and enter the information that way, it will be a big win as far as I’m concerned.  Over time, I may be able to improve upon the flow to get it closer to the full online form, but in the meantime, it collects the basic facts that my office needs.

Chatbot

Dean Eric’s Chatbot in action

In case you are I thinking about making a chatbot for your school, I should warn you that there are a lot of hurdles on which one can trip. Flowxo has a great site and provides a wonderful service, but it took a long time for me to understand their system. (You need to hit the “refresh” button on your browser after everything you do, and it took me days to figure that out.) The Flowxo directions also make it sound pretty easy to submit your bot to Facebook so that they’ll let it run in Messenger, but that step nearly tripped me up completely. You need to submit a privacy document full of legal language, plus a screencast of your chatbot in action. I didn’t know how to do either of those things. Some rapid googling helped me get those tasks done, and ultimately Facebook approved my app within a day. After that, I still found that the bot wasn’t operating correctly, and I nearly destroyed all of my work in a panic as I tried to fix it.

The chatbot is now running on the Facebook Messenger app if you want to check it out, but it is useless if you aren’t a George School student or parent. There’s nothing to be ashamed of there. Just as Amy from x.ai does one thing and does it very well, my bot does two things, and does them (fairly) well. It’s the right tool for the specific task; nothing more. I’d like to expand the chatbot to other messaging apps other than FB Messenger, but Flowxo doesn’t yet offer those integrations. (It works with Slack, which is awesome, but we don’t use Slack at GS.) If I could run the bot on the native iOS and Android messaging apps, that would cover something close to 100% of our student body.

As I wrap up this post, there are still a couple of weeks until the start of school. I don’t know if the chatbot will be adopted with love or mocked and misused for the amusement of teenagers. However, I feel satisfied that I tried something I didn’t think I could pull off, and it is now up and running. I’m not aware of any other secondary schools that have a chatbot yet, so for once I’m truly out there on the cutting edge. It may never happen again. (There are an awful lot of schools out there, so I’m guessing some other enterprising faculty members have got some bots online.)

Final note: In the chatbot community, people care about the distinction between bots that are truly a.i. and those that are not. Dean Eric’s Chatbot is not a.i.; it is basically a glorified voicemail automated phone tree type of setup, albeit operating via a much hipper medium. While I was working on building the bot using Flowxo, I saw a tweet from IBM saying that you could build a bot in ten minutes using Watson and Bluemix. For one glorious day, I abandoned Flowxo and worked on a truly a.i. bot on IBM’s platform, but I found their interface to be buggy, and I had to give up. So my chatbot isn’t powered by IBM’s amazing Watson technology, and I’m at peace with that.

Advertisements

The one thing I can do

I’m sure you don’t need me to point this out, but we’re having a tragically terrible summer. More innocent black Americans have been killed by the police, the police in turn have been targeted and murdered, the Leave camp won the Brexit referendum, a terrorist murdered 84 people in Nice, France, the Rio Olympics are likely to be a zika-virus/Russian-doping/inept-government disaster, and there was just a failed coup attempt in Turkey. The upcoming election in the US is a source of dreadful angst. The stock market is at an all-time high, but with bond yields at record lows, this is not a source of comfort or optimism. Essentially, all the news is bad news, and it’s hard not to take it to heart.

Sure, the summer months are always filled with unrest, and since I’m on vacation and have more time to pay attention to the news, world events weigh more heavily on me. Normally the Olympics would be a delightful diversion since the Columbia fencing team always sends some great representatives to the games (this year there is the amazing Nzingha Prescod to cheer on), but I can’t help feeling like the games in Rio may be the economic and human-rights disaster that finally seals the coffin for the whole modern Olympic movement.

When things get this bad, I ask myself, “What should I be doing to help heal the world?” Should I be marching in protests? (Yes, I’ve got the time.) Volunteering at a shelter or soup kitchen? (Yes, although the logistics are tough with an infant in the family.) Running for political office? (I have little faith that I could make a difference in our current system.) But then I remember: I’m already doing the one, best thing I can to help make a better future. I work at a school.

The world of the present is seemingly unredeemable, or, if it can be fixed, it will take powers well beyond my small influence. But the world of the future is very much in my hands (and yours!), and working as a teacher is the strongest commitment I can make to construct a less discordant tomorrow. It’s times like these that I take pride and feel relief that I work at an institution devoted to the Quaker ideals of peace and equality. The world needs a lot more of both, and education is how we will get there.

Although I’m about to retreat to a cabin in the woods in Vermont for the next month, I’ll still be managing George School’s rising sophomores’ summer reading and blogging project. Some prescient colleagues selected The Other Wes Moore as the required text for the rising sophs, plus our school is doing a community-wide “one book” reading of Ta-Nehisi Coates’ Between the World and Me. Thus, even though I and our students are on vacation, we are still at work pollinating our minds with narratives that broaden our understanding of injustice and discrimination in the US. After a year off from the classroom, I’ll be teaching one section of sophomore English next year (AP Language and Composition), so I need to reflect and plan carefully how I can address these two powerful books in the opening week of the school year.

Merlyn’s speech about the power of learning as the best cure for boredom (and all the other ills of the world) from The Once and Future King has been over-popularized lately, but I feel a special closeness to it since I taught the book for seven years. Also, I read Helen Macdonald’s H is for Hawk this year, and T.H. White looms in the background throughout the book. Every time we return to a work of art, or a text, we bring a slightly different set of life experiences and find ourselves noticing nuances that escaped us on previous viewings. The piece of Merlyn’s speech that jumps out at me today is, “you may see the world about you devastated by evil lunatics,” which always struck me as too strongly worded in the past. The world I grew up in, despite the Cold War that was going on, seemed lacking in evil lunatics. The world of 2016 seems to have an overabundance of them. Time to take Merlyn’s advice and focus on learning (and, in my case, teaching). Luckily, it’s the one thing I can do.

Father’s Day Number One

I enjoyed my first Father’s Day as a dad today. My son is only seven months old, but somehow he managed to buy me a card and a framed photo collage! Maybe he has found a paid, freelance night job writing copy for online advertisers. Kids these days; they grow up fast.

My father hosted the family at his house. I got to see my sister, who was in from the west coast, and my in-laws. It’s a joy being the sandwich generation; I am both a dad and I have a dad at the same time. Father’s Day makes us stop and think about the debts we owe our fathers, but at the same time reflect on the kind of father we wish to be.

Fatherhood has already changed me in ways that are predictable. I can’t dedicate as many hours to work as I used to. I can’t indulge my every whim the way I used to. As Aziz Ansari put it in that episode of Master of None, if I want to go out for pasta in the evening, I might not be able to. (Although my son is getting better at behaving in restaurants, his 6:30pm bedtime is a bit of a challenge.) Still, I knew what I was getting into before we decided to have our first child, and I had been looking forward to those trade-offs for more than a decade.

The unpredictable part of becoming a parent, for me anyway, has been the way in which it makes me reevaluate time. How old will I be when my son is 18? When he’s 30? When he’s 45? How many years do I have to save for his college tuition? How  many more years do I have to work, and how old will he be if I retire early? Or late? How old will he be when the mortgage is paid off? (Because I’m a 42-year-old new dad, the answers to some of those questions aren’t pretty.)

That stuff is all a cliche, however. I also have to wonder: How many years until climate change makes the planet uninhabitable? Will I teach my son to drive, or will driverless cars be the norm before he turns 16? Will the professions that my generation aspired to even exist when he is done with college? Will Congress ever pass sensible gun control legislation?

These questions about the future of technology, the nation, and the globe explain why so many parents of young kids seem to be politically active, and sometimes radically so. Look out Washington; I’m coming to a march near you soon! The idea that I might spend my final years in an environmentally degraded ecosystem is troubling, but the idea that my grandkids might grow up in such a world are unconscionable. Time to get to work on the problem(s).

Some book recommendations for the rising sophomores

Members of our Class of ’19 (rising sophomores) have a summer reading assignment for English to read The Other Wes Moore and write five blog posts about it. Additionally, they must read one other book of their choice from a list of authors/works compiled by the department. The list can be found here. Since the list is long and a little chaotic, I thought I’d give some recommendations.

Each year over Winter Break, I like to read books from the NYTimes “10 Best Books” list. Two books from The 10 Best Books of 2015 that I read over break made it onto the summer reading list: Lucia Berlin’s A Manual for Cleaning Women: Selected Stories and Helen Macdonald’s H Is for Hawk. I loved both books, but it is the Berlin collection that has really stayed with me. It is long, and since she returns to the same themes often, some of the stories feel repetitive. However, the investment in time is well worth the effort, and any young writer interested in writing short stories in an autobiographical mode should consider picking up that collection. You’ll notice that Ta-Nehisi Coates’ Between the World and Me is also on the NYTimes Best of 2015 list. I haven’t gotten around to reading it yet, but the entire faculty is reading it this summer, so stay tuned.

There are a lot of other authors on the list for the rising sophomores that my English department colleagues recommended, and whom I adore and enthusiastically endorse. We put Evelyn Waugh on there. My two favorite books by Waugh are Scoop and A Handful of Dust. Scoop is a satire about the media and journalism, and it is as funny and fresh today as it was when it was written (1938). I taught it one summer about seventeen years ago when I was teaching summer school at Hun, and I’ve often thought about teaching it again. The Modern Library Association put three novels by Waugh on their 100 Best Novels list, the two I mentioned plus the over-hyped Brideshead Revisited. Back at the turn of the millenium, I made a project of trying to read all 100 novels on their (just-published) list, but I only made it through about 80 of them before I gave up. Go ahead, call me a quitter!

A few books that we recommended last summer and the summer before (when the blogging assignment was different and students only had five books to choose from) have reappeared on this year’s list. I strongly recommend Chad Harbach’s The Art of Fielding and Hilary Mantel’s Wolf Hall. They are two of the best novels written in the last decade, and rising sophomore bloggers who have written about them over the last few summers have enjoyed them immensely. The Art of Fielding is great if you happen to be a baseball fan, but it is funny and brilliant and can be enjoyed by anyone. Wolf Hall is perfect for readers who enjoy historical fiction. It is set in the England of Henry VIII, and it has spun off an entire industry of TV shows, stage adaptations, etc. Read it! (And then read the sequel, Bringing Up the Bodies, and get ready for the final book of the trilogy, which is coming soon.)

I was a fantasy and sci-fi fanboy in my younger years, and we put some great options on the list. I’m not particularly a fan of Robert Jordan’s Wheel of Time series, but it’s there if you want to go in that direction. (I read the first six books in the series, or something like that, in high school and college, and I admit that peoples’ tastes change over time. I find his work too derivative now.) I’d rather see you get to know the work of Terry Pratchett, who died in 2015, and who is one of the funniest fantasy writers of all time. (The Discworld series is the obvious starting point.) We also put Philip K. Dick on the list, and his writing is so influential, eerie, and intelligent that I would encourage everyone to read him. I guess I would recommend Do Androids Dream of Electric Sheep? as a starting point, but I like VALIS, too.

Finally, you’ll see that Raymond Chandler is on the list, and you pretty much have to read Chandler if you want to call yourself a well-read citizen of the planet. Start with The Big Sleep, and then read The Long Goodbye. His detective stories don’t ever quite make sense, but the pleasure is in Chandler’s style, and the atmosphere, and the wonderful narrative voice of his protagonist, Philip Marlowe. High school students often try to write in this genre, so it is a good idea to feed yourself the roots of great detective fiction.

Disagree with my recommendations? Have some recommendations of your own? Leave a comment!

 

Summer Blogging Assignment, Year 3

For the third summer in row, George School’s rising sophomore class will be blogging about their summer reading assignment for their English classes. The assignment has evolved over time, and this year we are keeping it simple by just doing one “track.” In the past two years, we’ve allowed students to blog synchronously or asynchronously, but the synchronous track never quite lived up to its potential, so everyone is free to post whenever they want this summer. (Students need to have five posts up by Labor Day, which gives a lot of rope to procrastinators, but I have always wanted to protect students who go away to camp for eight weeks and try to stay away from technological distractions.)

Since I was completely out of the classroom this past year, I actually expected the assignment to die, and I’m hugely grateful to my colleagues for keeping it alive. I’ll be teaching one section of sophomore English next year, so I’m back in the saddle as a co-manager for the project. My colleagues decided that every student would read one book in common, plus they would have a choice of a second book. With the AP Language and Composition curriculum orienting us towards non-fiction, the grade-wide text that was chosen is The Other Wes Moore: One Name, Two Fates. I had read the NYTimes review back when the book was published, and it intrigued me and I wanted to read it, but I never got around to it. So I’m just finishing the book now (having started a month ago; I’m a new dad — give me a break!), and it was clearly an inspired choice. The entire GS community is also reading Ta-Nehisi Coates’ Between the World and Me this summer, and the two books have a lot in common. We will have some powerful discussions come September!

While the texts are important, the tech is, too. I pitched the department on this summer blogging assignment two years ago because I wanted to help the school move forward in its use of academic technology, and I learned from my #edtechchat and #engchat PLNs that English teachers everywhere were asking their students to blog. I piloted a modest blogging initiative in my own classes, but I realized that we needed to do more school-wide. The beauty of this assignment is that every sophomore begins his or her year with an academic blog that they have made for this purpose, but it can be quickly repurposed by any teacher who wants their students to do some reflective journaling, or post a portfolio online, etc. Now that we are going into Year 3, every student at GS in 10th, 11th, or 12th grade will have an academic blog that any teacher can adopt for assignments in their class. (Okay, new 11th graders won’t, but that is a small population.) We give the 9th graders a year to learn our school’s values and build community offline before asking them to intentionally build community online, and hopefully that leads to respectful digital citizenship.

In past years I’ve used my blog to post links to some great writing by our rising sophomores done specifically for this assignment. Check back in the coming days and weeks!

The Homework Gap

You’ve probably already read “Bridging the Digital Divide That Leaves Schoolchildren Behind” in the Technology section of yesterday’s NYTimes. How then do we process Anya Kamenetz’s piece for npr.org published today, “Study in Your PJs? What a High School ‘Work From Home’ Day Looks Like.” While the Times piece (written by Celia Kang) focuses on the homework challenges faced by the 40% of students in the McAllen, TX area who live in homes that can’t afford internet access, Kamenetz’s piece talks about a public school in northern NJ (Park Ridge) that had a voluntary distance learning day in which all of students were encouraged to stay at home. According to the principal of the NJ school quoted in Kamenetz’s piece, “99 percent” of the students in that district have high-speed internet at home. Park Ridge was experimenting with a distance learning day mostly to be innovative, with some lip-service paid to college readiness and future bad-weather situations. Meanwhile in McAllen and across the country, low-income students are lucky if they live in a district that is experimenting with wifi-hotspot-enabled school buses. Otherwise, they have to sit in fast food restaurants for hours using free internet. Burger King: the ideal setting to work on your research paper about Macbeth. Compare and contrast: fast food restaurants and the blasted heath.

At the boarding school where I work, we have had tough discussions about how late at night we allow our boarders to access our (strong, omnipresent) wifi network. We care about equal opportunities to access the web for our boarders and our day students. The conversation can tie you in knots since it requires you to make generalizations about what the parents of day students allow their children to do, or what the parents of our boarders would like us to do in their stead, but we are talking about a situation in which everyone has access to the web nearly all of the time. And even when we turn off the wifi (very, very late at night), many students just stay on their devices using their own data plans.

The Times piece discusses the Lifeline program that (controversially) spends $2 billion in tax dollars to subsidize broadband for low-income households. Hopefully the FCC will re-up this program next month, but much more attention is needed to the so-called homework gap. Students at my school complain (a little melodramatically at times) that they really can’t do any homework any more without access to the web, and in truth, that’s where they look up their assignments and access relevant coursework. Lifeline is a start, but we also need much more funding at the local level for public libraries, which for many school children are the go-to setting for after school internet study time. Wouldn’t we much rather see our kids working in a library than a fast food restaurant or a school bus? How does one even do homework for hours on a school bus, especially after dark and in cold weather? This issue is beginning to sound like it is one part educational access crisis, one part public health crisis.