In our first blog post, Introducing BLAZE (hyperlinked), Cisco Research proudly presented BLAZE – Build Language Applications Easily, a flexible, standardized, no-code, open-source platform to easily assemble, modify, and deploy various NLP models, datasets, and components. In our second blog post, we will walk through creating an NLP pipeline using Meeting Transcripts, BERT, BART, GPT, and the Webex Chatbot Interface. We’ll show how BLAZE makes the creation of NLP solutions simple, efficient, and flexible — as easy as Build, Execute, Interact, or 1-2-3!
To install BLAZE, we can follow the instructions in the README on BLAZE’s GitHub page, shown below:
(Cisco Open Source’s GitHub – BLAZE Repo) https://github.com/cisco-open/Blaze#installationThere are many options to install BLAZE, including, but not limited to: Docker, PyEnv, Conda, Shell.
Once the installation is ready to go, we can get started with creating our Webex Chatbot!
Cisco Webex enables seamless communication in the digital landscape, allowing users to meet virtually with a suite of intelligent tools at their disposal. One of these tools is Webex’s Meeting Assistant, which automatically records, transcribes, and stores transcripts for each Webex meeting.
However, with dozens of weekly meetings, one concern is the utility of these stored meeting transcripts. Given their lengthy durations as well as their numerous quantity, it is infeasible to quickly get a recap of each meeting or locate important information buried under hundreds of transcripts.
While Webex includes search features through its website, we want to make them more conversational and searchable semantically on the Webex Messaging App. Our solution can also be extended easily to other meeting or messaging platforms.
To address these issues, we can quickly design a Webex Bot using BLAZE that takes in these meeting transcripts and enables semantic search, summarization, and actionable extraction across all of them!
Before we begin, we need to retrieve our Webex Access Token and Bot Access Token.
Our journey continues with BLAZE, which operates in three steps: Build, Execute, and Interact.
In BLAZE, the YAML file is the “recipe” containing the pipeline’s specifications. This includes models, datasets, processing components, and UI. While BLAZE has a block-based drag-and-drop UI for users to build their own YAML recipes, we’ll use a pre-existing recipe in this case.
This YAML file can be found in the
yaml folder and is titled
In this case, we see the input data specified, namely
WebEx. Furthermore, we can see the specified two tasks, search and summarization, with models
Interestingly, we see that theWe’ll take a closer look at Dynamic APIs in our next blog post!
actionablestask has not been specified. This is due to our usage of Dynamic APIs for prompt-based tasks. The inclusion of
module: ['openai']indicates to BLAZE that we have one or more tasks that require an OpenAI LLM. The user can specify the corresponding prompts for these downstream tasks, giving them greater flexibility over specific functionalities.
This YAML file will be used to create a solution-specific REST API server in the “Execute” stage.
Now, BLAZE can utilize the YAML file chosen at the preceding stage to establish a server, fetching and hosting the appropriate models, data, and components as specified with the press of a button.
However, before doing this, we must first utilize our Webex Access Token and Bot Access Token.
To pass these tokens into BLAZE, we can simply add them as environment variables, detailed below:
To add an environment variable in MacOS or Linux, we can use the
export command, as shown:
export WEBEX_BOT_TOKEN=<YOUR_WEBEX_BOT_TOKEN> export WEBEX_ACCESS_TOKEN=<YOUR_WEBEX_ACCESS_TOKEN>
These commands can be run in any bash shell. However, they would only be valid for the current session. To permanently add them, we can open the
.bashrc file and add both lines anywhere in the file.
To confirm whether our additions were successful, try opening a new terminal and running:
echo $WEBEX_BOT_TOKEN echo $WEBEX_ACCESS_TOKEN
Both of your tokens should be displayed in the terminal, meaning we’re good to go!
To add an environment variable in Windows, we can open PowerShell and run the following commands:
$Env:WEBEX_BOT_TOKEN = '<YOUR_WEBEX_BOT_TOKEN>' $Env:WEBEX_ACCESS_TOKEN = '<YOUR_WEBEX_ACCESS_TOKEN>'
Alternatively, we can use any of the following commands in Command Prompt, depending on our intent. The
set command will only persist while the current Command Prompt is open. The
setx command will add environment variables in user (or machine) registry, depending on the
set WEBEX_BOT_TOKEN=<YOUR_WEBEX_BOT_TOKEN> set WEBEX_ACCESS_TOKEN=<YOUR_WEBEX_ACCESS_TOKEN>
setx WEBEX_BOT_TOKEN = <YOUR_WEBEX_BOT_TOKEN> setx WEBEX_ACCESS_TOKEN = <YOUR_WEBEX_ACCESS_TOKEN>
setx WEBEX_BOT_TOKEN = <YOUR_WEBEX_BOT_TOKEN> /m setx WEBEX_ACCESS_TOKEN = <YOUR_WEBEX_ACCESS_TOKEN> /m
For more information on setting environment variables, please check out this awesome blog post!
After adding our environment variables, we can simply run the following command:
bash run.sh server yaml=yaml/05_search_summary_webex.yaml
In a few seconds, we should see our pipeline up and running!
Finally, we can kick off our Webex Bot. A sample bot with the following endpoints has been created in the
webex_UI folder. Feel free to easily add and extend the current functionalities (detailed in “Interact”).
To launch the Webex Bot (our frontend), we can simply run any the following command:
bash run.sh bot
And voila, we have our Webex bot and NLP solution up and running. Let’s take it for a spin!
The current functionalities supported by our sample Webex bot include:
However, these can easily be modified and extended with minimal code. Let’s take a closer look!
Our Webex bot calls a number of endpoints hosted by our REST API server.
For example, the
/summary endpoint is ideal for quickly understanding what a meeting was about. Similarly, the
/search endpoint efficiently searches across all transcripts using our specified model.
webex_UI/webex_bot/main.py, we can see a number of commands added to the Webex bot. These commands are the functionalities that the Webex bot will have. For example, we see
webex_UI/webex_bot/cmds.py, we can see the specific inputs, outputs, and descriptions of each of these commands. For example, this is the
SummarAcross() command class.
webex_UI/webex_bot/help.py, we see the endpoints being called, enabling our Webex bot to be lightweight and extensible. It is very straightforward to add or modify a command!
Pretty neat! Now, let’s give our Webex Bot a try.
First, we can open our Webex chat interface and search for our bot using its username.
Next, we can type ‘help‘ to initiate a dialogue with the bot, getting a list of its supported commands.
From here, feel free to explore! Please bear in mind that the quality of the search and summarization depends solely on the models selected. Playing around with the specified models in the yaml file will lead to improvements in performance if desired.
Here are some sample interactions with our Webex Bot:
First, we can say
help to see our available commands.
Next, we can try out the
list feature to quickly see all of our meetings.
Nice! Now, let’s try out the
Actionables feature on one of them.
Pretty cool! What about the
Ahh, so that’s what that meeting was about! Finally, let’s try a
In this blog post, we created a Webex bot capable of summarizing and semantically searching across meeting transcripts using BLAZE! In a few easy steps, we learned how to build a YAML file, execute our REST API server hosting our NLP pipeline, and interact with our solution through Webex.
Thank you so much for taking BLAZE for a spin!
We’re always grateful for community involvement 😄. If you’re interested, feel free to contribute on GitHub by starring, forking, or sharing the BLAZE repository 🥳! Thank you for your support!
Here is a roadmap of our past, present, and future blog posts with BLAZE.
Next time, we’ll harness BLAZE to build a live meeting assistant for Webex! Stay tuned! 🥳
To learn more about BLAZE, please take a look at our GitHub repository and documentation.
If you have any questions, want to share your thoughts, or wish to contribute, feel free to reach out to our Group Mailing List (email@example.com) — we’d love to hear from you!
A lot of work went into building BLAZE — our team started this project last summer, and we have been meticulously working to ensure a seamless experience for users wishing to harness the promise of NLP.
In addition to those acknowledged in our first blog post, we wanted to express our special thanks to: