Learning Library

← Back to Library

Quickly Connect LLMs to Chatbots

Key Points

  • Connecting a large language model to a chatbot can be done in under 10 minutes and requires no coding experience, making it accessible to non‑developers.
  • A rules‑based chatbot follows a fixed set of scripted answers, whereas a generative AI chatbot leverages LLMs trained on massive data to generate natural, on‑the‑fly responses to unforeseen questions.
  • The demo shows how to enhance a simple virtual assistant by using IBM’s AI Toolkit repository for pre‑built integrations, enabling it to answer complex queries like animal‑shelter hours, pet‑ownership rules, and nutrition recommendations.
  • The integration is performed with Watson X Assistant (IBM’s conversational platform) and the Granite LLM on Watson X, using an IBM Cloud API key and project ID to link the assistant to the model.
  • Secure handling of API keys is emphasized, with the workflow involving retrieving the key, storing it safely, and following a five‑step process to complete the assistant‑LLM connection.

Full Transcript

# Quickly Connect LLMs to Chatbots **Source:** [https://www.youtube.com/watch?v=c7ZAceXakIE](https://www.youtube.com/watch?v=c7ZAceXakIE) **Duration:** 00:05:37 ## Summary - Connecting a large language model to a chatbot can be done in under 10 minutes and requires no coding experience, making it accessible to non‑developers. - A rules‑based chatbot follows a fixed set of scripted answers, whereas a generative AI chatbot leverages LLMs trained on massive data to generate natural, on‑the‑fly responses to unforeseen questions. - The demo shows how to enhance a simple virtual assistant by using IBM’s AI Toolkit repository for pre‑built integrations, enabling it to answer complex queries like animal‑shelter hours, pet‑ownership rules, and nutrition recommendations. - The integration is performed with Watson X Assistant (IBM’s conversational platform) and the Granite LLM on Watson X, using an IBM Cloud API key and project ID to link the assistant to the model. - Secure handling of API keys is emphasized, with the workflow involving retrieving the key, storing it safely, and following a five‑step process to complete the assistant‑LLM connection. ## Sections - [00:00:00](https://www.youtube.com/watch?v=c7ZAceXakIE&t=0s) **Quick Integration of LLM Chatbots** - This walkthrough demonstrates how to upgrade a simple, rules‑based virtual assistant to a generative AI chatbot in under ten minutes, using pre‑built integrations from an AI toolkit and requiring no coding experience. ## Full Transcript
0:00everyone wants to use large language 0:02models and chat Bots to get the most of 0:04generative Ai and answer even more 0:06questions with their solution but did 0:09you know connecting the two is actually 0:11easier and faster than you'd think I can 0:14do it in under 10 minutes but I thought 0:16using large language models was an 0:18extremely complicated task once you get 0:20hands- on with the technology you're 0:22going to realize how accessible it is 0:23for everyone even non-coders so there's 0:26no coding experience required and I'm 0:28going to walk you through the setup 0:29process 0:30I'm going to break it down in just five 0:32steps let's go to our virtual assistant 0:34and get started here I've created a 0:36simple virtual assistant it can answer 0:39very simple questions that I've manually 0:40added but what if we want it to do more 0:43we're going to utilize the AI toolkit 0:45geub repository for some pre-built 0:48Integrations for example right now it 0:51answers questions like what time does 0:54the animal shelter open but if I ask it 0:56a more complicated question like how 0:59common are Swedish Val Hans it doesn't 1:02quite hit the mark but not for 1:05long after we' finished it will be able 1:08to answer this question in addition to 1:10questions like am I allowed to have a 1:12pet a possum or what is the recommended 1:15amount of dog food for a 30 lb dog 1:18before we move on let's talk about the 1:20difference between a rules-based chatbot 1:23and a generative AI based chatbot think 1:25of a rules-based chatbot as a very 1:28structured Limited dialog flow it has a 1:31set of questions that it's prepared to 1:33answer based on a user's input but 1:36that's it just that one set of questions 1:39it can't formulate any other answers 1:41other than exactly what has been 1:43provided now a generative AI based 1:46assistant on the other hand utilizes 1:49large language models to create an 1:50answer to the user's question it's been 1:52trained on massive amounts of data so 1:55the model's able to use all of this 1:57training in order to formulate a 1:58humanlike response 2:00so what we're going to do today is 2:03basically hook up your chatbot interface 2:05to a large language model allowing you 2:07to utilize AI to create natural language 2:10answers to questions you had not 2:14anticipated for the purpose of this 2:16demonstration I'll be using Watson X 2:18assistant IBM's conversational 2:20intelligence platform and Watson x.i 2:24which is a part of IBM's data and AI 2:26platform Watson X I'm going to assume 2:29you've already chosen your own platform 2:31and model for this one my model of 2:34choice is going to be Granite but the 2:36basic principles of this will work with 2:38most AI platforms models and 2:41assistants first we're going to grab our 2:44IBM Cloud API key it's important to 2:47always store your API keys in a safe 2:49place so that you can reuse them later 2:51or as I do create a new API key every 2:55single time because I forget where mine 2:57is stored so now you can head to your 2:59data AI platform in my case Watson x. go 3:03to the manage tab then copy the project 3:05ID which is what we use to connect our 3:08assistant and large language 3:10model time to integrate our large 3:12language model with our virtual 3:13assistant since I'm using Watson X I can 3:16go over to the assistant toolkit we're 3:19going to download the Open API spec and 3:21the sample action now let's add these to 3:24our 3:25assistant from within the assistant 3:27click 3:28Integrations you can think of an 3:30integration as a simple way to connect 3:32your assistant to some other service or 3:34data set then just follow the prompts to 3:38upload our open API spec now our open 3:41API spec is going to contain all of the 3:43URLs and data structures that we need to 3:46connect to our large language 3:48model okay so once that's completed 3:51you'll want to go to your extensions 3:52page and add your new extension follow 3:55the steps and enter your IBM Cloud API 3:58key to complete the process access bear 4:01with me we're almost 4:04done next let's upload the sample 4:06dialogue provided in the assistant 4:08toolkit here's where you're going to 4:10drag and drop your sample actions file 4:12and then click 4:14upload wait for it to complete and then 4:16click close now we're almost done I 4:19really mean it this 4:20time now we've got to set up our 4:22variables so you're going to navigate to 4:25variables created by then created by you 4:29you're going to past paste your project 4:30ID from Watson x. to the projector ID 4:35variable we just have one more step 4:38let's make sure our extension is 4:40configured and the integration actually 4:42works I don't know about y'all but I 4:45usually need to do a lot of testing 4:46because I may or may not rush and I 4:49usually skip a few steps along the way 4:51and end up causing a lot of Errors 4:53anyways you're going to open the invoke 4:55Watson X Generation API action and click 4:59edit extension select the Watson X 5:02extension and then just fill in the 5:06parameters voila you've now connected 5:08your Bot to a large language model in 5:10less than 10 minutes your assistant is 5:13going to be able to receive and reply in 5:15natural language while this is 5:17incredibly powerful making sure your llm 5:20enabled assistant provides accurate and 5:23appropriate responses that's a whole 5:25other story so check out our videos on 5:27AI governance or rag to D deeper into 5:30that thanks for watching and don't 5:32forget to like And subscribe for more 5:34content