Feed aggregator

PreviousNext: OK Drupal - powering chatbots with Drupal

Drupal Planet -

Share:

Conversational UIs are the next digital frontier.

And as always, Drupal is right there on the frontier, helping you leverage your existing content and data to power more than just web-pages.

Want to see it action - click 'Start chatting' and chat to our Drupal site.

by lee.rowlands / 18 September 2017

Start chatting

So what's going on here?

We're using the Chatbot API module in conjunction with the API AI webook module to respond to intents. We're using API.ai for the natural language parsing and machine learning. And we're using the new Chatbot API entities sub module to push our Drupal entities to API.ai so it is able to identify Drupal entities in its language parsing.

A handful of custom Chatbot API intent plugin to wire up the webhook responses and that's it - as we create content, users and terms on our site - our chatbot automatically knows how to surface them. As we monitor the converstions in the API.ai training area, we can expand on our synonyms and suggestions to increase our matching rates.

So let's consider our team member Eric Goodwin. If I ask the chatbot about Eric, at first it doesn't recognise my question.

Eric isn't recognized as an entity

So I edit Eric's user account and add some synonyms

Adding synonyms to Eric's account

And then after running cron - I can see these show up in API.ai

Synonyms now available in API.ai

So I then ask the bot again 'Who is eric?'

Screenshot showing the default response

But again, nothing shows up. Now I recognise the response 'Sorry, can you say that again' as what our JavaScript shows if the response is empty. But just to be sure - I check the API.ai console to see that it parsed Eric as a staff member.

Intent is matched as Bio and Eric is identified as staff member

So I can see that the Bio Intent was matched and that Eric was correctly identifed as the Staff entity. So why was the response empty? Because I need to complete Eric's bio in his user account. So let's add some text (apologies Eric you can refine this later).

Adding a biography

Now I ask the bot again (note I've not reloaded or anything, this is all in real time).

A working response!

And just like that, the bot can answer questions about Eric.

What's next?

Well API.ai provides integrations with Google Assistant and Facebook messenger, so we plan to roll out those too. In our early testing we can use this to power an Actions on Google app with the flick of a switch in API.ai. Our next step is to expand on the intents to provide rich content tailored to those platforms instead of just plain-text that is required for chatbot and voice responses.

Credits

Thanks go to @gambry for the Chatbot API module and for being open to the feature addition to allow Drupal to push entities to the remote services.

And credit to the amazing Rikki Bochow for building the JavaScript and front-end components to incorporate this into our site so seamlessly.

Further Reading Tagged Chatbots, Conversational UI, Drupal 8

Posted by lee.rowlands
Senior Drupal Developer

Dated 18 September 2017

Add new comment

Typing By Brain Arrives: No Surgery Necessary

Slashdot -

mirandakatz writes: 2017 has been a coming-out year of sorts for the brain-machine interface. But the main barrier to adoption is the potentially invasive nature of a BMI: Not many people are going to want to get surgery to have a chip implanted in their brains. A New York company may have found a solution to that. It's created a BMI that works just by an armband -- and it works now, not in some far-off future. Steven Levy describes a recent demo by the CEO of CTRL-Labs: After [typing] a few lines of text, he pushes the keyboard away... He resumes typing. Only this time he is typing on...nothing. Just the flat tabletop. Yet the result is the same: The words he taps out appear on the monitor... The text on the screen is being generated not by his fingertips, but rather by the signals his brain is sending to his fingers. The armband is intercepting those signals, interpreting them correctly, and relaying the output to the computer, just as a keyboard would have... CTRL-Labs, which comes with both tech bona fides and an all-star neuroscience advisory board, bypasses the incredibly complicated tangle of connections inside the cranium and dispenses with the necessity of breaking the skin or the skull to insert a chip -- the Big Ask of BMI. Instead, the company is concentrating on the rich set of signals controlling movement that travel through the spinal column, which is the nervous system's low-hanging fruit. Reardon and his colleagues at CTRL-Labs are using these signals as a powerful API between all of our machines and the brain itself.

Read more of this story at Slashdot.

[$] The rest of the 4.14 merge window

LWN Headlines -

As is sometimes his way, Linus Torvalds released 4.14-rc1 and closed the merge window one day earlier than some might have expected. By the time, though, 11,556 non-merge changesets had found their way into the mainline repository, so there is no shortage of material for this release. Around 3,500 of those changes were pulled after the previous 4.14 merge-window summary; read on for an overview of what was in that last set.

There's a Logic To How Squirrels Bury Their Nuts

Slashdot -

sandbagger shares an announcement from the University of California: Like trick-or-treaters sorting their Halloween candy haul, fox squirrels apparently organize their stashes of nuts by variety, quality and possibly even preference, according to new UC Berkeley research... Fox squirrels stockpile at least 3,000 to 10,000 nuts a year and, under certain conditions, separate each cache into quasi "subfolders," one for each type of nut, researchers said... Over a two-year period, the research team tracked the caching patterns of 45 male and female fox squirrels as the reddish gray, bushy-tailed rodents buried almonds, pecans, hazelnuts and walnuts in various wooded locations on the UC Berkeley campus... Using hand-held GPS navigators, researchers tracked the squirrels from their starting location to their caching location, then mapped the distribution of nut types and caching locations to detect patterns. They found that the squirrels who foraged at a single location frequently organized their caches by nut species, returning to, say, the almond area, if that was the type of nut they were gathering, and keeping each category of nut that they buried separate. Meanwhile, the squirrels foraging in multiple locations deliberately avoided caching in areas where they had already buried nuts, rather than organizing nuts by type.

Read more of this story at Slashdot.

Linux Foundation President Used MacOS For Presentation at Open Source Summit

Slashdot -

Slashdot reader mschaffer writes:It appears that Jim Zemlin, President of the Linux Foundation, was using MacOS while declaring "2017 is officially the year of the Linux desktop!" at the Open Source Summit 2017. This was observed by several YouTube channels: Switched to Linux and The Lunduke Show. Finally it was reported by It's FOSS. if, indeed, this is the year of desktop Linux, why oh why cannot people like Zemlin present a simple slide presentation -- let alone actually use a Linux distro for work. A security developer at Google has now "spotted Jim Zemlin using Apple's macOS twice in last four years," according to the article, which complains the Foundation's admirable efforts on cloud/container technology has them neglecting Linux on the desktop. Ironically, in March Zemlin told a cloud conference that organizations that "don't harvest the shared innovation" of open source "will fail."

Read more of this story at Slashdot.

Essential Phone Now Supported By All Four Major Carriers (Including Verizon)

Slashdot -

An anonymous reader quotes the Verge: Essential's debut smartphone has received approval to run on Verizon, meaning it's now supported by all four major US carriers. Sprint was the device's launch partner, so it of course had support, and both AT&T and T-Mobile gave tacit support ahead of the phone's launch. But Verizon, for some reason, said it couldn't guarantee that the Essential Phone would work and that the phone still had to clear a certification process. Evidently it's now done that, with Essential tweeting out this morning that the phone is now compatible with Verizon.

Read more of this story at Slashdot.

Idaho Wants To Establish America's First 'Dark Sky Preserve'

Slashdot -

schwit1 shares a story from the AP: Tourists heading to central Idaho will be in the dark if local officials get their way. The first International Dark Sky Reserve in the United States would fill a chunk of the state's sparsely populated region that contains night skies so pristine that interstellar dust clouds are visible in the Milky Way... Supporters say excess artificial light causes sleeping problems for people and disrupts nocturnal wildlife and that a dark sky can solve those problems, boost home values and draw tourists. Opposition to dark sky measures elsewhere in the U.S. have come from the outdoor advertising industry and those against additional government regulations. Researchers say 80 percent of North Americans live in areas where light pollution blots out the night sky. Central Idaho contains one of the few places in the contiguous United States large enough and dark enough to attain reserve status, Barentine said. Only 11 such reserves exist in the world... The proposed Idaho reserve is mainly land managed by the U.S. Forest Service and contains the wilderness of the Sawtooth National Recreation Area... Leaders in the cities of Ketchum and Sun Valley, the tiny mountain town of Stanley, other local and federal officials, and a conservation group have been working for several years to apply this fall to designate 1,400 square miles (3,600 square kilometers) as a reserve. A final decision by the association would come about 10 weeks after the application is submitted.

Read more of this story at Slashdot.

'Bodega' CEO Apologizes, Insists They'll Create More Jobs

Slashdot -

Remember those two ex-Googlers who started a company to replace mom-and-pop corner stores with automated vending kiosks? An anonymous reader writes: The company's CEO has now "apologized in the face of mounting outrage," according to CNN. CEO Paul McDonald had shared a vision with Fast Company of a world where centralized shopping locations "won't be necessary" because there'll be a tiny automated one every 100 feet. Within hours McDonald was writing a new apologetic essay insisting he's not trying to replace corner stores, which carry more items and include a human staff who "offer an integral human connection to their patrons that our automated storefronts never will." In fact, he added that "Rather than take away jobs, we hope Bodega will help create them. We see a future where anyone can own and operate a Bodega -- delivering relevant items and a great retail experience to places no corner store would ever open." Promising to review criticism, he added his hope was to "bring a useful, new retail experience to places where commerce currently doesn't exist." Bodega's CEO sees it as a way to beat Amazon by offering immediate access to popular products, and TechCrunch reports the company has already raised $2.5 million, while Fast Company notes "angel" investments from executives at Facebook, Twitter, Google, and Dropbox. The company has already begun testing 30 Bodega boxes over the last ten months, and unveiled 50 more boxes last week, with hopes to have over 1,000 by the end of next year.

Read more of this story at Slashdot.

Chinese Scientists Are Developing A Vaccine Against Cavities

Slashdot -

A vaccine against tooth decay "is urgently needed" writes Nature -- and a team of Chinese scientists is getting close. hackingbear writes: Scientists at Wuhan Institute of Virology, Chinese Academy of Sciences developed low side effects and high protective efficiency using flagellin-rPAc fusion protein KFD2-rPAc, a promising vaccine candidate. In rat challenge models, KFD2-rPAc induces a robust rPAc-specific IgA response, and confers efficient prophylactic and therapeutic efficiency as does KF-rPAc, while the flagellin-specific inflammatory antibody responses are highly reduced.

Read more of this story at Slashdot.

Trump's Officials Suggest Re-Negotiating The Paris Climate Accord

Slashdot -

Slashdot reader whh3 brings surprising news from the Wall Street Journal. "Trump administration officials said Saturday the U.S. wouldn't pull out of the Paris Agreement, offering to re-engage in the international deal to fight climate change, according to multiple officials at a global warming summit." Today an anonymous reader writes: Even an official White House statement in response to the article insisted only that the U.S. would withdraw "unless we can re-enter on terms that are more favorable to our country." On Sunday White House National Security Adviser H.R. McMaster "said President Donald Trump could decide to keep the U.S. in the Paris Climate Accord if there is a better agreement that benefits the American people," according to ABC News, while CNBC reports that Secretary of State Rex Tillerson also "said the United States could remain in the Paris climate accord under the right conditions. 'The president said he is open to finding those conditions where we can remain engaged with others on what we all agree is still a challenging issue.'"

Read more of this story at Slashdot.

'Bashware' Attacks Exploit Windows 10's Subsystem for Linux

Slashdot -

Mark Wilson quote BetaNews: While many people welcomed the arrival of Windows Subsystem for Linux (WSL) in Windows 10, it has been found to be a potential security issue. A new technique known as a Bashware has been discovered by security researchers that makes it possible for malware to use the Linux shell to bypass security software. While administrator access is needed to execute a Bashware attack, this is fairly easily obtained, and the technique can be used to disguise malicious operations from antivirus software and other security tools. Researchers from Check Point Research point out that the danger stems from the fact that "existing security solutions are still not adapted to monitor processes of Linux executables running on Windows."

Read more of this story at Slashdot.

Kernel prepatch 4.14-rc1

LWN Headlines -

The 4.14-rc1 kernel prepatch is out, and the merge window is closed for this development cycle. "Yes, I realize this is a day early, and yes, I realize that if I had waited until tomorrow, I would also have hit the 26th anniversary of the Linux-0.01 release, but neither of those undeniable facts made me want to wait with closing the merge window." In the end, 11,556 non-merge changesets were pulled into the mainline for this release.

IBM Open Sources Their Own JVM/JDK As Eclipse OpenJ9

Slashdot -

IBM has open sourced a "high performance, scalable virtual machine" with "a great pedigree... [it's] at the core of many IBM enterprise software products." Slashdot reader dxb1230 writes: IBM has open sourced their JDK/JVM implementation named J9 as OpenJ9. The community now has an alternative implementation of Java which has been well tested on enterprise workloads and hardware. This unlike, OpenJDK, has all the bells and whistles like jit.

Read more of this story at Slashdot.

Ask Slashdot: What's the Best Business Model for An Open Source Developer?

Slashdot -

An anonymous reader writes: I'm interested in creating really good open source software. However, unless programmers have an incentive to work on their projects for long periods, many projects are be abandoned. There's many business models surrounding free/libre open source software: support (pay for help, or additional features), premium (pay for more advanced software), hosting (pay for using the software on someone else's servers), donation (two versions of the same app, pay because you want to be nice to the developers), etc. Not all of those business models align the interests of the developer and the customer/user in the same way: support-based models for example, benefit developers who introduce certain mistakes or delay introducing features. (In the short term. In the long run, it opens a door for competitors...) Which of those align the interests of both? The original submission also asks if any of these models are "morally questionable" -- and if there's other business models that have proven successful for open source software. Leave your best thoughts in the comments. What's the best business model for an open source developer?

Read more of this story at Slashdot.

New Book Argues Silicon Valley Will Lead Us to Our Doom

Slashdot -

Long-time Slashdot reader Zorro quotes the San Diego Union-Tribune: To many Americans, large technology firms embody much of what's good about the modern world. Franklin Foer has a different perspective. In his new book, "World Without Mind," the veteran journalist lays out a more ominous view of where Big Tech would like to take us -- in many ways, already has taken us... These firms have a program: to make the world less private, less individual, less creative, less human... Big Tech has imposed its will on the resident population with neither our input nor our permission. The reviewer summarizes the book's argument as "Once hooked, consumers are robbed of choice, milked for profit, deprived of privacy and made the subjects of stealth social engineering experiments." Interestingly, Foer was fired from The New Republic in 2014 by its new publisher -- Facebook co-founder Chris Hughes -- and Foer's new book includes strong criticism of the way companies are assembling detailed profiles on their users. "They have built their empires by pulverizing privacy; they will further ensconce themselves by pushing boundaries, by taking even more invasive steps that build toward an even more complete portrait of us."

Read more of this story at Slashdot.

Will Linux Innovation Be Driven By Microsoft?

Slashdot -

Adobe's VP of Mobile (and a former intellectual property lawyer) sees "a very possible future where Microsoft doesn't merely accept a peaceful coexistence with Linux, but instead enthusiastically embraces it as a key to its future," noting Microsoft's many Linux kernel developers and arguing it's already innovating around Linux -- especially in the cloud. An anonymous reader quotes InfoWorld: Even seemingly pedestrian work -- like making Docker containers work for Windows, not merely Linux -- is a big deal for enterprises that don't want open source politics infesting their IT. Or how about Hyper-V containers, which marry the high density of containers to the isolation of traditional VMs? That's a really big deal... Microsoft has started hiring Linux kernel developers like Matthew Wilcox, Paul Shilovsky, and (in mid-2016) Stephen Hemminger... Microsoft now employs 12 Linux kernel contributors. As for what these engineers are doing, Linux kernel maintainer Greg Kroah-Hartman says, "Microsoft now has developers contributing to various core areas of the kernel (memory management, core data structures, networking infrastructure), the CIFS filesystem, and of course many contributions to make Linux work better on its Hyper-V systems." In sum, the Linux Foundation's Jim Zemlin declares, "It is accurate to say they are a core contributor," with the likelihood that Hemminger's and others' contributions will move Microsoft out of the kernel contribution basement into the upper echelons. The article concludes that "Pigs, in other words, do fly. Microsoft, while maintaining its commitment to Windows, has made the necessary steps to not merely run on Linux but to help shape the future of Linux."

Read more of this story at Slashdot.

Python's Official Repository Included 10 'Malicious' Typo-Squatting Modules

Slashdot -

An anonymous reader quotes BleepingComputer: The Slovak National Security Office (NBU) has identified ten malicious Python libraries uploaded on PyPI -- Python Package Index -- the official third-party software repository for the Python programming language. NBU experts say attackers used a technique known as typosquatting to upload Python libraries with names similar to legitimate packages -- e.g.: "urlib" instead of "urllib." The PyPI repository does not perform any types of security checks or audits when developers upload new libraries to its index, so attackers had no difficulty in uploading the modules online. Developers who mistyped the package name loaded the malicious libraries in their software's setup scripts. "These packages contain the exact same code as their upstream package thus their functionality is the same, but the installation script, setup.py, is modified to include a malicious (but relatively benign) code," NBU explained. Experts say the malicious code only collected information on infected hosts, such as name and version of the fake package, the username of the user who installed the package, and the user's computer hostname. Collected data, which looked like "Y:urllib-1.21.1 admin testmachine", was uploaded to a Chinese IP address. NBU officials contacted PyPI administrators last week who removed the packages before officials published a security advisory on Saturday." The advisory lays some of the blame on Python's 'pip' tool, which executes arbitrary code during installations without requiring a cryptographic signature. Ars Technica also reports that another team of researchers "was able to seed PyPI with more than 20 libraries that are part of the Python standard library," and that group now reports they've already received more than 7,400 pingbacks.

Read more of this story at Slashdot.

Is Online Advertising Worthless?

Slashdot -

turkeydance shares a story from ZeroHedge: Category 1 storm clouds are gathering over what has traditionally been one of the most lucrative, and perhaps only profitable, sectors to come out of Silicon Valley in decades: online advertising. Two months ago, it was P&G which fired the first shot across the "adtech" bow when not long after it announced it was slashing its digital ad spending because it thought it was not getting the kind of return on investment it desired, it made a striking discovery: "We didn't see a reduction in the growth rate." CFO Jon Moeller said "What that tells me is that that spending that we cut was largely ineffective"... So fast forward to last week, when during Thursday's Global Retailing Conference organized by Goldman Sachs, Restoration Hardware delightfully colorful CEO, Gary Friedman, divulged the following striking anecdote about the company's online marketing strategy, and the state of online ad spending in general... What Friedman revealed - in brief - was the following: "we've found out that 98% of our business was coming from 22 words. So, wait, we're buying 3,200 words and 98% of the business is coming from 22 words. What are the 22 words? And they said, well, it's the word Restoration Hardware and the 21 ways to spell it wrong, okay?" Stated simply, the vast, vast majority of online ad spending is wasted, chasing clicks that simply are not there....One wonders how long before all retailers - most of whom are notoriously strapped for revenues and profits courtesy of Amazon - and other "power users" of online advertising, do a similar back of the envelope analysis, and find that they, like RH, are getting a bang for only 2% of their buck?

Read more of this story at Slashdot.

Sedentary Lifestyle Study Called 'A Raging Dumpster Fire'

Slashdot -

Ars Technica's health reporter argues that a new study suggesting sitting will kill you "is kind of a raging dumpster fire. It's funded by Big Soda and riddled with weaknesses -- including not measuring sitting." An anonymous reader quotes this report: Let's start with the money: It was funded in part by Coca-Cola... [I]t's hard to look past the fact that this is exactly the type of health and nutrition research Coke wants. In fact, Coca-Cola secretly spent $1.5 million to fund an entire network of academic researchers whose goal was to shift the national health conversation away from the harms of sugary beverages. Instead, their research focused on the benefits of exercise -- i.e., the health risks of sedentary and inactive lifestyles. The research network disbanded after The New York Times published an investigation on the network's funding in 2015... It didn't actually measure sitting... In their words, "Our study has several limitations. First, the Actical accelerometer cannot distinguish between postures (such as sitting vs. standing); thus, we relied on an intensity-only definition of sedentary behavior." The "intensity-only" definition of sedentary behavior is based on metabolic equivalents, basically units defined by how much oxygen a person uses up doing various activities. But those definitions are also not cut and dried. There are no clear lines between lying down, sitting, standing in place, or light movement... Then there's the participant data: It's not representative -- like, at all... At the time of wearing the accelerometer, the most active group's mean age was 65. The mean age of the least active group: 75. Groups were assigned based on just a week's worth of data -- or less. And the people placed in the least-active group were already more likely to be smokers, to have diabetes and hypertension, and to have a history of coronary heart disease and stroke.

Read more of this story at Slashdot.

NSA Launches 'Codebreaker Challenge' For Students: Stopping an Infrastructure Attack

Slashdot -

Slashdot reader eatvegetables writes: The U.S. National Security Agency launched Codebreaker Challenge 2017 Friday night (Sept 15) at 9 p.m. EST. It started off as a reverse-engineering challenge a few years ago but has grown in scope to include network analysis, reverse-engineering, and vulnerability discovery/exploitation. This year's challenge story centers around hackers attacking critical "supervisory control and data acquisition" (SCADA) infrastructure. Your mission, should you choose to accept it, is to figure out how the SCADA network is being attacked, find the attack vector(s), and stop the bad guy(s)/gal(s)/other(s). Codebreaker-Challenge is unusual for capture-the-flag(ish) contests due to the scope/number of challenges and how long the contest runs (now until end of year). Also (this year, at least), the challenge is built around a less than well-known networking protocol, MQTT. It's open to anyone with a school.edu email address. A site leader-board shows which school/University has the most l33t students. Carnegie Mellon and Georgia Institute of Tech are at the top of the leader-board as of Saturday morning. Last year, 3,300 students (from 481 schools) participated, with 15 completing all six tasks. One Carnegie Mellon student finished in less than 18 hours. A resources page offers "information on reverse engineering," and the NSA says the first 50 students who complete all the tasks ths year will receive a "small token" of appreciation from the agency.

Read more of this story at Slashdot.

Pages

Subscribe to Heydon Consulting aggregator