Chatbot Plugin

312 views
Skip to first unread message

ChristianB

unread,
Jul 16, 2020, 1:19:55 AM7/16/20
to TiddlyWiki
Hi All,

I've created a chatbot plugin that would like to share with this group.  


I'm interested to see what uses people can apply this to in their own wiki's... at the moment the chatbot is using a very simplistic set of responses that were available as a sample for the underlying AI library (RiveScript) so it would be interesting what useful responses people can program their own bot to provide...

Also any review on the code is welcome - this is my first plugin I've loaded to GitHub so happy to take on some push suggestions etc 

Cheers
CB

TW Tones

unread,
Jul 16, 2020, 4:46:09 AM7/16/20
to TiddlyWiki
Chjristian,

Thanks for sharing and looks like a nice additional feature to tiddlywiki's suit of possibilities.

Whilst many of us are familiar with using chatbots, I doubt many know how to furnish them with content. I may add that done the right way tiddlywiki would make a lovely repository on which to build responses, perhaps even extracting answers from a knowledge base.

Can you provides some instructions or references that can kick start us on this?

Regards
TW Tones

ChristianB

unread,
Jul 16, 2020, 6:59:04 AM7/16/20
to TiddlyWiki
Hey Tony

Yes - I forgot to add a direct link to the RiveScript tutorial (available here : https://www.rivescript.com/docs/tutorial )  which is pretty good as it starts with some simple programmed responses before building up into the slightly more complex stuff ... 

You can skip some of the intro on project directories etc as you are running this within TW so don't need that ... Start from the section "First Steps" and you will soon have a decent idea of what additional chatbot responses you can add straight away.

Cheers
CB 


bimlas

unread,
Jul 16, 2020, 7:08:01 AM7/16/20
to TiddlyWiki
//sci-fi mode ON//

https://www.rivescript.com/docs/tutorial -> Object Macros

It seems to support Javascript, so I can imagine a "chat bot integration into TiddlyWiki": the visitor talks to the chat bot, which in turn gives meaningful answers based on the notes stored in the tiddlers.

//sci-fi mode OFF//

Atronoush

unread,
Jul 16, 2020, 7:18:49 AM7/16/20
to TiddlyWiki
Hello Christian,
 This is wonderful!

I think this could be used for newcomers to help them start TW and ask their questions!


Wonderful! I am ready to help with testing!

Atro

TiddlyTweeter

unread,
Jul 16, 2020, 12:02:24 PM7/16/20
to TiddlyWiki
ChristianB ...

BRILLIANT! I'll reply in more detail later after I noodled around ...

Meanwhile ...

Annotation 2020-07-16 180021.jpg


Best wishes
TT

TW Tones

unread,
Jul 16, 2020, 5:43:40 PM7/16/20
to TiddlyWiki
TT

I too thought of Eliza

He tones

TiddlyTweeter

unread,
Jul 18, 2020, 12:28:39 PM7/18/20
to TiddlyWiki
Okay. Some comments.

As a first plugin its ace! Well done! Better than  I could!

Next steps you need add a panel explaining what it does & give some basic documentation.

Does it have a macro interface? What I mean is an initialisation such that you can specify a .reve sciptt. For example ...

<<chatbot "$:/answer-users.reve">>

Excuse me if it does that already!

Best wishes
TT

TiddlyTweeter

unread,
Jul 18, 2020, 12:50:11 PM7/18/20
to TiddlyWiki
Ciao CB,

As far as Chatbots go without "AI super-plus" this is STELLAR. It will DO all we'd need.

IMO, it could solve a zillion problems on communicating TW resources.

Its a superior ELIZA.

Just FYI I worked with Gene Gendlin, psychotherapist & philosopher, for the last 15 years of his life. He witnessed Eliza as she occurred. He was a colleague of Carl Rogers, founder of "person centered psychtheraphy" that Eliza was meant to be a a parody of.

Its ironic in that Eliza DOCTOR script, a parody of psychotherapy, ACTUALLY became an early proof of the Turing Test
Much to everyone's surprise.

A side note, but interesting.

Best wishes
TT

TW Tones

unread,
Jul 18, 2020, 7:19:31 PM7/18/20
to TiddlyWiki
TT

That is very interesting, but a "proof of the turring test"?

tony

ChristianB

unread,
Jul 18, 2020, 8:05:22 PM7/18/20
to TiddlyWiki
Thanks TT 

The macro would be a good approach to wrapping the UI and allowing some customisation... I'll add this to my GitHub repo as an issue and see about another version. 

Cheers
CB

TW Tones

unread,
Jul 18, 2020, 10:16:22 PM7/18/20
to TiddlyWiki
Folks,

On the chatbot, my thinking is how can we make the chatbot rely on content in a tiddlywiki, such as a knowledge base built with tiddlers fields and tags, perhaps TOC's or for example a genealogical tree such that the chat bot can be asked questions who's answers are sourced from the content of the wiki. eg; Does tony have an uncle, who are tony's aunts and uncles? Does fred have any living siblings? A bit like a Structured Query language in a chatbot.

It would allow for another level of abstraction, that is given a knowledge base provide the user with a way to ask questions of it. I could imagine later even using this code, to code solutions at the higher abstraction level so rather than a list widget you use a query or question to list a set.

To do this we need to find away to get the content to map to a data model that the bot can make use of and visa versa. The expert systems of old and the decision trees of big data and machine learning of today can easily be represented on top of tiddlywiki. It would be dreamy to allow these to be developed freely on tiddlywiki but then have a chatbot able to interpret plain language and respond with the knowledge. The 4th generation programming languages of the past which tiddlywiki, especially the list and set handling features is more than adequate for emulating, could be personified through a chat bot.

Perhaps we first start with allowing the chat bot to respond to questions in tiddlywiki terms eg; have you any tasks due today, where "tasks" and "today" are defined, tasks defined by the wiki by the wiki designer, today as part of the tool set. So ideally we need to give the chatbot a way to look into the content, rather than put the content into the chatbot.

Food for thought
TW Tones


On Thursday, July 16, 2020 at 3:19:55 PM UTC+10, ChristianB wrote:

Ed Heil

unread,
Jul 19, 2020, 3:16:30 AM7/19/20
to TiddlyWiki
Off topic, but I'm fascinated to hear you worked with Eugene Gendlin!  His work, and that of his student Ann Weiser Cornell, have been very helpful to me, and I even really enjoyed his philosophical work, _Experiencing and the Creation of Meaning_, to the degree I understood it!

TiddlyTweeter

unread,
Jul 19, 2020, 6:29:00 AM7/19/20
to tiddl...@googlegroups.com
Ed Heil wrote:
Off topic, but I'm fascinated to hear you worked with Eugene Gendlin!  His work, and that of his student Ann Weiser Cornell, have been very helpful to me, and I even really enjoyed his philosophical work, _Experiencing and the Creation of Meaning_, to the degree I understood it!

Ciao Ed

I can reply, I think, both acknowledging your interest, which I really appreciate! :-), and the thread theme.

Gene was an amazing selfless person. He was also a brilliant philosopher. 
Experience & The Creation Of Meaning is still not fully grasped for its significance. 
His brilliance as a philosopher clearly comes out when he debates with other thinkers.

Both are highly relevant to computer interface design, though the work needed to show that has not been done yet.

Ann Weiser Cornell is very important for widely popularising "Focusing", a major practical application of Gene's philosophy for self-help. She's Good.

In my years with him I grew to be Executive Director of archiving & preserving his work. 
I realised, along with Mary Hendricks, his wife, that giving public access to most of his published & unpublished (about 140) articles was a v. Good idea.
Result: after 18 months of good sponsor funded hard graft was the: Gendlin Online Library 

Back to this thread. 

Gene actually wrote a formal "Eliza" style script, though not a programmer,  he was interested in exploring the "semantics of response."
It was never made into a program. It only exists on paper.

As a philosopher he was fascinated by the Turing Test
His key take-away was 

"... a lot of life is pretending.
 
I know its a robot.
It does not matter, 
 
IF it helps me.
If it helps I can FEEL it, so will give it credence.
What is going on is that humans, programming machines,
provide tools that understand some aspects of meaning-making."

ChrsitianB's plugin may be a step towards that for TW.

Best wishes
TT


Mat

unread,
Jul 19, 2020, 8:07:16 AM7/19/20
to TiddlyWiki
@Christian

There was someone who created a fuzzy search some time back... (maybe a year ago?) I'm thinking that could be of use?

<:-)

TiddlyTweeter

unread,
Jul 19, 2020, 8:43:23 AM7/19/20
to TiddlyWiki
Mat

I think you thinking of ...

plugin: https://hoelz.ro/files/fts.html
 
discussion: https://groups.google.com/forum/#!searchin/tiddlywiki/Rob$20hoelz%7Csort:date/tiddlywiki/ZvvLTxQz3Ag/jsN4xhzqBgAJ 

BUT you missing something. First you need look at the .rive format the plugin supports! It is pretty smart already. The docs are extremely Good quality.  https://www.rivescript.com/docs/tutorial

TT 

Mat

unread,
Jul 19, 2020, 8:55:45 AM7/19/20
to TiddlyWiki
TiddlyTweeter wrote:
BUT you missing something. First you need look at the .rive format the plugin supports! It is pretty smart already. The docs are extremely Good quality.  https://www.rivescript.com/docs/tutorial

I meant the other way around; the fuzzy search could perhaps be used in the chatbot to make the chatbot smarter.

<:-)

TiddlyTweeter

unread,
Jul 19, 2020, 8:58:34 AM7/19/20
to TiddlyWiki
Have you tested how smart it is ??? :-)

TiddlyTweeter

unread,
Jul 19, 2020, 8:59:25 AM7/19/20
to TiddlyWiki
TW Tones

As ever you reach for the further shore. In this case it is maybe premature.

The .rive scripting is well mature. The documentation is excellent. The plugin simply instantiates it.

The issue you getting at is whether we need "more".

SO let us pragmatically see!

My one practical comment to CB was to add a macro so we could do <<chatbot "$:/inter-act.rive">>.

I think, already, its a neat interface with a lot of intelligence. Deeper integration with TW will require understanding .rive scripts, I think.

Best wishes
TT

Mat

unread,
Jul 19, 2020, 9:03:54 AM7/19/20
to TiddlyWiki
TiddlyTweeter wrote:
Have you tested how smart it is ??? :-)

I did test with 

"What is your nmae?" and similar, yes, and it did not give the same reply as if correctly spelled.

<:-)

TW Tones

unread,
Jul 19, 2020, 7:35:50 PM7/19/20
to TiddlyWiki
TT,

I think I understand the point you are making, but being aware of the further shore is important, to ensure we do not compromise the future. Some one can set off for that shore when they please, but to know its there permits us to choose if we wish to learn to build a boat.

I am yet to understand the scripts on which it is driven but I would like to see it respond to content. Even just simply "how are you today?" "I am good and in edit mode", or "who are you", "I am wikititle".

ChristianB

unread,
Jul 20, 2020, 1:05:24 AM7/20/20
to TiddlyWiki
Hey All,

Its been an interesting discussion so far - thanks everyone for their input !  :-)     The plugin uses an open-source  JavaScript library (ie RiveScript)  that is maintained elsewhere and as yet I haven't explored that library in detail to be able to make suggestions for modifications.. So improvements like fuzzy search will be a little bit beyond my abilities... I've read a bit on how NLP programs can provide phonetic tokens to eliminate  spelling errors etc.

RiveScript probably won't be improved further towards some NLP capabilities - looking at is contribution page (https://www.rivescript.com/contributing) there keeping the scope pretty simple to reflect early chatbots.  If I was to look at those capabilities I would probably look at alternative libraries ( not all of them as simple to use though)

One of the reasons I developed this plugin was to learn about chatbots ( and some of their limitations - such as spelling mistakes and n! factorial complexity in building conversations) ... The standalone ability of TW makes it easier to experiment with the tutorial examples and start understanding the technology (and its limits) 

Cheers
CB

Ed Heil

unread,
Jul 20, 2020, 1:14:00 PM7/20/20
to tiddl...@googlegroups.com
That's really awesome!   And I'll be bookmarking that Online Library.
Chritian B's plugin may be a step towards that for TW.

Best wishes
TT



--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages