Outshift Logo

10 min read

Blog thumbnail
Published on 09/21/2023
Last updated on 02/05/2024

Building with BLAZE — Creating LLM-powered Webex Bots for Interacting with Meetings

Share

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!


Installing BLAZE

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#installation

There 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!


Waltzing with Webex

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 searchsummarization, and actionable extraction across all of them!

Before we begin, we need to retrieve our Webex Access Token and Bot Access Token

Building our Bot — Webex Access Token

Webex access token
  • Upon logging in (top right button), we can select the copy button underneath the subheading "Your Personal Access Token." This string is our Webex Access Token, valid for a period of 12 hours.

Building our Bot — Bot Access Token

Build with webex
  • Upon logging in (top right button), we can select our profile and click "My Webex Apps."
  • Next, we can create a new App by selecting "Create a New App" followed by "Create a Bot."
Create a new app_webex
  • Then, we can fill in the required details on the provided page. The "Bot name" and "Bot username" should be unique. Please make sure to keep this information handy for later! 
Create a new bot_webex
Webex_dashboard
  • Keep track of the "Bot Access Token" for later - this will be used within BLAZE.
Webex_Blaze transcription bot
  • Finally, navigate to Cisco Webex and search for your bot using its username (in our case, for example, testBlaze@webex.bot). You'll find your bot listed in your Webex directory.
Cisco_Webex_bot_username

Booting up the Bot

Our journey continues with BLAZE, which operates in three steps: BuildExecute, and Interact

Build - Specifying the Pipeline

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 05_search_summary_webex.yaml:

Build_Specifying the Pipeline

In this case, we see the input data specified, namely WebEx. Furthermore, we can see the specified two tasks, search and summarization, with models ElasticBERT and BART, respectively.

Interestingly, we see that the actionables task 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. 

We'll take a closer look at Dynamic APIs in our next blog post!

This YAML file will be used to create a solution-specific REST API server in the "Execute" stage.


Execute - Launching the Pipeline

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:


A) MacOS and Linux Distributions

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!


B) Windows Environment Variables

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 /m flag.

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!


Interact - Using the Pipeline

The current functionalities supported by our sample Webex bot include:

  • list - list all meetings
  • search <query> - search across all meeting transcripts
  • actionable s <meeting_id> - identify all actionables (todos) from the specified meeting
  • summarize [<meeting_id>, ...] or all - summarize one, multiple, or all meeting transcripts

However, these can easily be modified and extended with minimal code. Let's take a closer look!


Underneath the Hood

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.

Within 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 SummarAcross(), SearchAcross(), and Actionables() below.

Underneath_the_hood

Within 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_specific_inputs_output_example

Finally, within 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!

Webex_endpoint

Pretty neat! Now, let's give our Webex Bot a try.


Bringing it all Together

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.

Webex_Blaze_Transcription_Bot

Next, we can try out the list feature to quickly see all of our meetings.

Webex_Blaze_Transcription_Bot_Feature

Nice! Now, let's try out the Actionables feature on one of them.

Webex_Blaze_Transcription_Bot_Actionables_Feature

Pretty cool! What about the summarize feature?

Webex_Blaze_Transcription_Bot_Summarize_Feature

Ahh, so that's what that meeting was about! Finally, let's try a search.

Webex_Blaze_Transcription_Bot_Meeting

Coming to a Close

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!

Blaze

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!


The Road to Tomorrow

Here is a roadmap of our pastpresent, and future blog posts with BLAZE.

Next time, we'll harness BLAZE to build a live meeting assistant for Webex! Stay tuned! 🥳


Getting Started with BLAZE

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 (blaze-github-owners@cisco.com) — we’d love to hear from you! 


Acknowledgments

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:

  • The Webex team, for their fantastic meeting and chat interface, helpful documentation, and impressive developer tools. BLAZE's integrations with Webex would not be possible without their curated open-source libraries, easy-to-follow demos, and meticulous blog posts 😄.

Subscribe card background
Subscribe
Subscribe to
the Shift!

Get emerging insights on emerging technology straight to your inbox.

Unlocking Multi-Cloud Security: Panoptica's Graph-Based Approach

Discover why security teams rely on Panoptica's graph-based technology to navigate and prioritize risks across multi-cloud landscapes, enhancing accuracy and resilience in safeguarding diverse ecosystems.

thumbnail
I
Subscribe
Subscribe
 to
the Shift
!
Get
emerging insights
on emerging technology straight to your inbox.

The Shift keeps you at the forefront of cloud native modern applications, application security, generative AI, quantum computing, and other groundbreaking innovations that are shaping the future of technology.

Outshift Background