Hacker News new | comments | show | ask | jobs | submit login
Bottery – A conversational agent prototyping platform (github.com)
336 points by manojlds on Oct 31, 2017 | hide | past | web | favorite | 73 comments



Last year, we had built almost the same thing. It's Open Source but unfortunately, haven't added any documentation (will do when I get time) - https://github.com/yak-ai/wild-yak

Lessons learnt:

- Works much better than AI driven bots at the moment

- Don't pretend to do intelligent things. Be just a dumb textbot.

- Force people into selecting options as much as you can

- When accepting data as text, give an example of what they should type

- Fancy Cards and Carousels are crappy UX. Stick to text.

- Super powerful when exposed to semi-technical users. Basically CLI for non-computer folks.

- An effective UI pattern for desktop usecases is to have a messenger pane on the left (or right), and a larger details window next to it. eg: You could say- tickets to Tokyo, and the right pane would display a bunch of options.


Totally agree about the value of user interaction with pure text.

We are too obsessed about UI widgets, but forgot one thing: the screen space is just 2D, you cannot put too many things in the 2D space, so we introduce levels, but lower-level interactions are often neglected by users, a dilemma.

But with dialog-style UI, we introduce the extra dimension of time. When we distribute user interactions on the time dimension, sometimes limited screen space is no longer a problem.


I don’t agree with your comment about “sticking to text”. Visual components make sense for form filling type transactions, presenting image/text combos like articles, and guiding the user through explicit follow up actions.


The first link is showing 404.


Remove the (oddly added) trailing


Is it just me or did whatever text you added at the end of this cause the "reply" link to become italicized?


Not just you. in the right edge case, open italicization at the end of a comment can cause that in at least some browsers. (I found this a few months back and told the mods, and if I remember right it didn't happen in their browser so there was some confusion at first)


Fixed. Thanks.


Creating the rules for it reminds me a little bit of writing a text adventure game from days gone by:

    ...
    name: {
      onEnter: "'What do you want to name your kitten?'",
      exits: "'*' ->respond_to_name name=INPUT",
    },
    respond_to_name: {
      onEnterSay: "The kitten purrs happily, I guess it likes the name #/name#!",
    },
    ...
The readme for it is nice and detailed which I always appreciate and it's turned me onto http://tracery.io/, which I'd not heard of but looks like a lot of fun ("A super-simple tool and language to generate text").


> Creating the rules for it reminds me a little bit of writing a text adventure game from days gone by

Interactive fiction has long been the playground for conversation UIs since its inception (Zork's development is even directly entwined in the early history of MIT's AI lab). It's also a useful thing to ask someone starting a bot project: what was the last IF game you played? Have you written one?

There's a lot of advances in conversational UI in the IF space that are worth exploring when writing bots, too. It's definitely worth spending some time exploring recent and modern IF games for ideas. I recommend Emily Short's blog [1] for a lot of discussions and examinations of especially conversational UI in IF over the last few decades (that's one of Emily's particular passions).

[1] https://emshort.blog/


I have been building/running a pretty successful chatbot for a large corporate for over a year now. We use Inkles Ink to script the conversation flows and maintain state. Works very very well. https://github.com/inkle/ink


Hey - @joethephish here from inkle! Really cool to to hear that you're using ink for that :) Would love to know more detail about where this is being used if you're able to share!


Hiya. So the Chatbot is Oscar, Air New Zealand's chat bot. Here is a recent press release about him: https://www.airnewzealand.co.nz/press-release-2017-air-nz-ch...


Hi! Thanks for creating Ink it has been awesome for us. Let me talk to the bossman to see what I can share :)


Inkle/Ink looks awesome and a lot of fun - thanks for sharing that! Mutters looks like a really cool use of the tech btw.


Thanks!


Neat, so I just read through ink and its tutorial.

Can you briefly describe the kinds of things you use it for in a large corporation? Thanks!


Sure.. it is used to manage all the conversational flows and state for a chatbot. We use it for both branching conversations flows and goal based flows. Ink is simple enough that our content writers can work directly with it and we get clean separation of content and code.

The bot itself is pretty interesting. It has 350+ conversation flows, largely dealing with customer service for a business with fairly complicated products and business rules.

The bot is plumbed into 7 odd channels and has to deal with channel specific answers (eg if you are in the mobile app or the self-service portal then the answer on how to do something is different from how to do it if you are on the website's home page).

Additionally it has to handle regional specific answers, so the bots answers are country specific as well.

And it deals with logged in and not logged in states too :)

This all makes for an interesting content management problem (40k words) that our use of Ink readily solves.

Currently bot has 68% conversation success rate. E.g. 68% of the time he is able to resolve the customers issue which we think is pretty good considering the wide domain we are dealing with and the very strange edge cases the industry we are in has.


Ok cool, that maps to what I briefly read about ink much better. I had in mind some kind of 'devops chatbot'.

68% conversion rate is pretty impressive, nicely done! And thanks for the description, it's quite fascinating.


Thanks. The really fascinating thing is have a direct "stream of conscience" from our customers. With a 1000+ conversation a day you really get to see the problems they are having with our products, processes, UX etc As well as their responses to things in the news etc. Our product teams love it.


That's a lot of conversations! Have you considered using some machine learning techniques?


We use ML for Intent matching and NER and Ink to control the conversation state and flow. The core of this has been open sourced so you can see how we will the two together in practice here https://github.com/rabidgremlin/Mutters


Well, the README directly mentions Twine, which is an interactive fiction authoring system. Although I believe it is further to the “branching story” end of the spectrum than things like Inform and TADS.


I'm starting to introduce someone to programming and am putting together a MUD-style game in Typescript for them to hack on. I kind of wish that instead of magic strings in JSON this was a JS object where the values could be functions. Introducing more than one syntax for variables, etc., could be confusing at the beginning.


It would have been nice to see an update to Tracery. It's been over two years since Tracery was updated and it's still not available as a CommonJS module: https://github.com/galaxykate/tracery

It looks like Bottery is using a custom Tracery build which has no documentation: https://github.com/galaxykate/tracery-sugar

The reason I bring this up is because we've had multiple developers ask us to integrate Tracery into another popular open-source project and we couldn't really do it without making a new heavy fork of the project.


FWIW, I've used https://www.npmjs.com/package/tracery-grammar before. It's maintained by the creator of Cheap Bots Done Quick, which the creator of Tracery pretty explicitly endorses (she calls CBDQ out as an inspiration for Bottery)


Thanks. We tested with that fork as well. It's based off the old version of Tracery and also has no unit tests.

If use-case was for building an application or bot, I'd probably not worry as much. We were considering vendoring tracery into open-source project for improving a core API method for composing data.

If anyone is interested in helping here is the issue: https://github.com/Marak/faker.js/issues/495


From a practical perspective this looks eerily similar to the 'dump code to an FTP site' approach to open source.


For a hackathon a couple of years back, we wrote a module for Hubot for Slack integration that was conversational. It was absolutely incredible how difficult it was to get Hubot to have a simple scripted conversation and remember any context about how much of the conversation had already taken place (I think because it's supposed to be context-free?)

We wound up using Hubot-Brain (Redis brain) as a place to build and store the context of the conversations that were taking place. Each time you entered a statement that triggered a new conversational context, Hubot would record the context that you triggered with a tag for your name.

The goal was actually to have a robot that you could use to help people form teams at Hackathons. The event I was at was at an unfamiliar college, where I worked with some people I hadn't met before, who didn't share any languages experience in common with each other or myself.

The organizers created a Slack for the event organizing but nobody really used it, and we thought, wouldn't it be cool if everyone who was in the same position as we were could have somehow formed teams in an organized way, without having to go through the awkward experience of having to walk up to people, find out what you have in common, ... and then saying goodbye and walking away if it turns out that you don't have enough in common to reasonably be able to start working together?

We did wind up making Hubot conversational[1], but I wish we had known before we started that there were absolutely zero extant "conversation-style" plugins for Hubot and we were going to have to build that completely from scratch. Would have been great if we had something like this to start with (we might have been able to finish in 24 hours!)

[1]: https://github.com/kingdonb/hubot-malta/


I've been looking at building on top of Ink (by my friends at Inkle) for this kind of thing, but it's good to see other solutions to this problem.

https://github.com/inkle/ink


I have been doing this with a large chatbot (350+ conversation topics,40k words of regionalized content) and it works fantastically well. Core of bot brain is open source https://github.com/rabidgremlin/Mutters


This is a clear example of why “AI” is so overhyped at the moment. Watson, api.ai, etc all use such super basic state machines and transitions that are as far away from “AI” as possible. There’s nothing natural about this conversation, and there’s certainly no understanding or learning happening. It makes me mad that bots are a hot topic given there’s nothing new or revolutionary happening to enable them.


Well, I think this is simply a matter of how you see AI. The colloquial understanding of AI is something that is able to generally "think" like a human. To them, and perhaps to you too, the goal of AI is to emulate a human.

I think to most AI researchers, AI is seen more as a way to "emulate" intelligence to solve problems - usually problems formulated as "generally" as possible. To the AI researcher, if an incredibly complex modeling approach to a problem performs just as well as a very general one, one model is not strictly better than the other (actually, the more general one is almost always is considered to be), even if one may "theoretically" model how the human mind processes the problem more accurately. Likewise, a bot capable of answering general "getter" questions such as "What is the weather?" may not have a sexy or complicated implementation, and yet could be considered good AI for its problem domain, and may in fact be much more useful than a more sohpisticated bot.

There's actually a lot of work being done on chat bots, and I think perhaps you are limiting your understanding of what is being done to tutorials or toy-projects.


This is extremely similar to BotSON (https://hubtype.github.io/botSON), but it looks a bit more complex (disclaimer: I'm one of the authors of BotSON). I encourage you to try it and reach me out with comments at eric at hubtype dot com. I'd love to hear some feedback from the HN community =)


They got the name of a framework I'm building :/ https://github.com/rougeth/bottery


Except it's the other way around. Their repo is 6 months older than yours.


But it was published after mine.


Try not to be discouraged. I wouldn't worry too much about it.

You should be okay keeping the Bottery name. I don't see this project as something Google will be supporting in the long or mid-term.


Thanks for your comment :)


Has anyone built a bot for forums? I would LOVE to see a forum where all the threads were started by bots and contained bot conversations on whatever topics.


You might be interested in /r/SubredditSimulator [1], where only bots are allowed to post and each bot there has been trained off a single (other) subreddit.

[1] https://www.reddit.com/r/SubredditSimulator/


There's one called Reddit.



There's actually a dedicated subreddit to this: https://www.reddit.com/r/SubredditSimulator/


It's fun using state machines, perfect for bot-making. In learning how to make a Messenger bot, state machine appeared very quickly as the thing to do.

Thinking in those terms I would think would be a great way to teach programming.


State machines are a great place to start, but are pretty confining for users. If you've asked a user for some info, they may reasonably want to ask you a question rather than provide that info.

You can often get away with a state machine, but it is definitely not the path to natural conversations.



This reminds of an old project of myself and a friend around 2001-2003 (yes, it is still hosted on SourceForge):

DAVIS - Dj's and Volker's IRC-Script

http://davis.sourceforge.net

Of course, our language was specific to IRC bots and very ad-hoc. But it had a very fast interpreter written in ANSI C that had beaten all EggDrop IRC bots in terms of speed any day. (Back then, EggDrop was the common choice for creating IRC bots.)


Is this what they use when customers interact with Google's product support?

(Not joking) - https://productforums.google.com/d/msg/phone-by-google/yk2qU...


Anyone figured out how to get this working? I was able to open the index.html in Chrome to see the various panels, but not to load a bot.

I tried pasting the relevant parts from the a raw bot file, but it wouldn't run.

Also, having developed and simulated, how would one use the resulting bot in production?


ya there are CORS issues if you just open the html file, you have to have a server to serve them instead. Try something like `python -m SimpleHTTPServer 8000` and then visit `http://localhost:8000/` and you'll be able to see content in the panels and interact w/ the bots.


That did the trick, thanks.


It is my understanding that this is like Invision but for chatbots. The cool thing would be integrating this with something like Dialogflow (previously known as API.ai)


The project looks cool. Does it have any applications beyond being able to talk about kittens ? I love kittens, nothing wrong with that.


Can I safely say that it's like Chatfuel ("a bot platform", instead of Api.ai which is more NLU) but text-only?


We have been working on building a conversation prototyping tool for non-developers at Botmock (https://botmock.com)

Our approach has been to give a tool that enables people to create a true prototype and quickly test it before spending time developing it.

Thanks for sharing this (and other solutions like Wild Yak etc).


this looks great. is the graph editor implementation that you used in botmock custom homegrown stuff, or is that an opensource component? something like this would be useful for a workflow modeling tool I've been thinking about for one of my clients.


So this is a more developer friendly version of AIML?


> (This is not an official Google product)

It appears that Google's policy is that all open source personal projects be hosted under its GitHub account. Thus, I think "Google open sources" is a bit misleading; that implies that it's an official project being used by Google, whereas this just looks like a personal project being hosted by Google due to their requirements.


Yes, we've updated the title “Google open sources Bottery – bot-making language/platform” to that of the project. This is one reason we ask submitters not to editorialized titles: it's all too easy to mislead.


There's a (large) middle ground between "personal project" and "official product". It not hard to imagine a project being build as a proof of concept as part of someones regular job, yet not making it to "product", much less "official" status (and never intended to), but still open sourced because it might benefit someone else.


I don't think so. They've released their internal guidelines here: https://opensource.google.com/docs/iarc/

In this case, the person seems to have opted for the easier "go/releasing" route where Google retains the copyright. But that doesn't seem to strictly mandate using GitHub either.


I bet releasing a project with /google/ in it is a pretty good way to make sure it hits the top of HN though, so it's probably an appealing choice. ;)


I am also confused with that statement because the files appear to have Google Copyright in them. Example https://github.com/google/bottery/blob/master/js/bots.js

So its not official Google Product yet has Google Copyright. Not sure how that works.


Google doesn't support it in any way (=not a product), it's just something the author made during her time at Google internally (=it has Google copyright) that's now open-sourced.

https://twitter.com/GalaxyKate/status/925159463807361024


A Googler once told me that any code he writes during his employment with Google belongs to Google copyright-wise.

If they want to open source anything they have to ask Google for permission. It doesn't have to be hosted under the Google GitHub organization though (take Camlistore[1] as an example, although their primary repository is still hosted at googlesource.com).

This also means that if you want to contribute code to an open source project started by a Googler you will have to sign the Google CLA.

1: https://camlistore.org/


I don't think that's true for every project, as I have contributed to an open-source project[1] started by a Googler, and never had to sign a CLA, nor is the project hosted under the Google Github org.

1: https://github.com/benvanik/xenia


See my reply above.

TL;DR: Google's employment agreement means Google owns the copyright, which is what you see here. That doesn't mean we are endorsing the repo or making any claims to its importance.


> Not sure how that works.

I guess she wrote it at work.


Hey ho. I'm Chris, I'm on Google's Open Source Team.

One of the replies was right to point out this URL here: https://opensource.google.com/docs/iarc/

The key passage is this:

> As part of your employment agreement, Google most likely owns intellectual property (IP) you create while at the company. Because Google’s business interests are so wide and varied, this likely applies to any personal project you have.

We have two systems for Googlers to release code. We want Googlers to open source stuff. It makes everyone happier. So we have one method, which is really simple and pretty fast-track, usually taking about a week. That's what you see here: Google retains the copyright, we release it under Apache 2 to a Google-owned GitHub organization. The repo owners can then patch their repository without further approval steps (Google owns the copyright on that new work too), accept patches (as long as the submitter has signed the CLA) and we trust owners to act with common sense (e.g. don't change the license :) ). If the Googler leaves the company, they are free to fork the repository.

The other method is IARC as detailed in the URL, where a committee has to approve that the work is something that Google is OK with handing the copyright over to. I think the most common example is Googlers who write games, but of course people have all sorts of reasons for why they want to hold onto the copyright.

We recognize the challenge that comes with releasing repositories under the Google GitHub organization, but for those repositories to be not official. Headlines like "Google open sources [x]" is legally true but not spiritually so: the original author is the person who really open sourced and owns it, and Google is not really putting its institutional brand behind it. We have to balance that with the fact that we really need to know where all our repositories are, and be able to administer them, such as enabling CLA checks and forcing 2FA. The GitHub setup right now means that means putting repos under orgs we control.

We've spoken before about having a separate org that the non-official repos sit under, but this has always presented its own difficulties: if a project takes off, when does it "graduate" to the main org? What breaks if that happens? (Go code would for sure) What if the author feels they should graduate but we don't? Would projects in the non-official org not get the attention they deserve? etc. etc. Given that it's not a clear win, we've not opted to do that.

That said, I feel like I've seen the "Google releases [x]" headline on Hacker News more of late, and I am not sure if that's because submitters are excited and editorializing, or if there's genuine confusion. I'd love to hear any thoughts people have on that.


Hey, not a directly related question, but why does the individual Google CLA require a home address and phone number?

The policy at https://opensource.google.com/docs/cla/policy/ talks about minimal personal information collection and says "The two pieces of information that should always be collected from CLA signees are email address and name" — but the form at https://cla.developers.google.com/clas has way more required fields :(


We need to be able to identify everyone as part of our legal responsibilities. I'll take your comment to the legal team to see if there's any flexibility on the address/number requirement.


> That said, I feel like I've seen the "Google releases [x]" headline on Hacker News more of late, and I am not sure if that's because submitters are excited and editorializing, or if there's genuine confusion. I'd love to hear any thoughts people have on that.

Yes, I've been seeing this a lot lately too, and am frustrated by it because it seems to imply a much bigger commitment on Google's part than "this is an employee's personal side project". Hence why I posted the note.

Thank you for the clarification on the exact policy; since I'd been seeing a lot of these side projects posted under the Google account on Github, I figured it was something like that, but it's nice to see it spelled out.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: