{"id":160863,"date":"2023-05-09T13:21:24","date_gmt":"2023-05-09T12:21:24","guid":{"rendered":"https:\/\/www.devoteam.com\/expert-view\/building-an-intelligent-chatbot\/"},"modified":"2023-05-09T13:21:24","modified_gmt":"2023-05-09T12:21:24","slug":"building-an-intelligent-chatbot","status":"publish","type":"expert-view","link":"https:\/\/devoteam.info\/uk\/expert-view\/building-an-intelligent-chatbot\/","title":{"rendered":"Integrating MuleSoft with OpenAI: Building an intelligent chatbot"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Recently, I wrote a <a href=\"https:\/\/splatform.devoteam.com\/whitepaper\/integrating-ai-with-mulesoft-for-intelligent-automation\/\">Whitepaper<\/a> giving an overview of Conversational Artificial Intelligence (AI), the relationship to Large Language Models (LLMs), and their potential use cases. If you\u2019ve not yet read the whitepaper, I\u2019d recommend doing so; to get a grounding in the technology and to understand this new article more effectively.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The white paper discussed a possible use case of an AI ecommerce chatbot, where MuleSoft was used as the integration layer to access the relevant LLM. As I proposed that use case, I feel it incumbent upon me to build a Proof-of-Concept (PoC) to demonstrate the capability of this use case.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">From this article, \u201cIntegrating MuleSoft with OpenAI: Building an intelligent chatbot\u201d, you\u2019ll discover that the software tools provided by MuleSoft are highly capable of integrating with this technology, allowing the development of solutions that utilise AI. You\u2019ve got the backbone of the infrastructure for these solutions using the core architectural concepts of API-Led Connectivity and Application Networks, combined with Anypoint Platform for full-lifecycle API Management iPaaS.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Architecture and Design<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">I proposed the building of an e-commerce chatbot. However, re-evaluating that original idea, I\u2019ll modify the aim slightly. For the PoC, I feel it\u2019s better to build a generic and easily adaptable chatbot that uses public or easily accessible services to provide the functionality. As this is a generic solution, it can easily be extended to use different services to create a custom-tailored chatbot or data analysis tool for any specific task.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So, the Brief:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Build a Smart chatbot (i.e. LLM-based) accessible over the internet from a Web Browser or a Personal Assistant hardware device (e.g. Amazon\u2019s Echo\/Alexa). The chatbot should use conversational AI technology to interact with a user and have accessibility features allowing it to use audio hardware (i.e. microphones and speakers).<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That\u2019s what\u2019s required; how\u2019s it going to be achieved?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Starting with the conversational Language Model. Most of you will be aware of the two most well-known LLMs currently in the spotlight; <a href=\"https:\/\/openai.com\/blog\/chatgpt\">OpenAI\u2019s ChatGPT<\/a> and <a href=\"https:\/\/blog.google\/technology\/ai\/bard-google-ai-search-updates\/\">Google\u2019s Bard<\/a>, and as ChatGPT has a publicly accessible API, that\u2019s the one we will use for this PoC.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For Automatic Speech Recognition (ASR), <a href=\"https:\/\/openai.com\/research\/whisper\">OpenAI\u2019s Whisper<\/a> Speech-to-Text (STT) service will interact with a microphone. It will capture and transcribe any spoken prompts\/requests from a user. OpenAI doesn\u2019t have a Text-to-Speech (TTS) service, so Google Translate\u2019s free TTS API will be used (sufficient for this PoC).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">One final Requirement that mustn\u2019t be forgotten is the ability to interact with a Personal Assistant device to access the chatbot. With Amazon\u2019s Echo device, it is possible to create custom functionality called <em>Alexa Skills<\/em>. A <em>Skill<\/em> will be developed to integrate with the chatbot and make it accessible from any such device.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Before getting into the Build, the first stage is to take a deeper look into those services and technology, to understand them and, technically, how to call the respective APIs.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">OpenAI<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Two services from OpenAI: ChatGPT (Conversational AI) and Whisper (STT), will be used:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/en.wikipedia.org\/wiki\/ChatGPT\"><em>ChatGPT<\/em><\/a> is an LLM based on OpenAI\u2019s <a href=\"https:\/\/en.wikipedia.org\/wiki\/Generative_pre-trained_transformer\">Generative Pre-trained Transformer<\/a> technology (GPT-3.5). The model has been tuned for a more conversational style of interaction, ideal for a chatbot.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The <em>Chat<\/em> endpoint is:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/api.openai.com\/v1\/chat\/completions\">https:\/\/api.openai.com\/v1\/chat\/completions<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This POST endpoint accepts JSON and contains the text prompt from the user.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As this API is well documented, there is no need for further detail apart from providing a link to the <a href=\"https:\/\/platform.openai.com\/docs\/api-reference\/chat\/create\">API Reference<\/a> page.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/openai.com\/research\/whisper\"><em>Whisper<\/em><\/a> is OpenAI\u2019s Speech-to-Text service that uses voice recognition technology to transcribe <em>voice captures<\/em>. Any captures will be used as input to the chatbot.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The <em>Transcriptions<\/em> endpoint is:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/api.openai.com\/v1\/audio\/transcriptions\">https:\/\/api.openai.com\/v1\/audio\/transcriptions<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This POST endpoint accepts multi-part data indicating the path to the relevant audio file.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Again, this API is well documented, so you only need a link to the <a href=\"https:\/\/platform.openai.com\/docs\/api-reference\/audio\">API Reference<\/a> page.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, before proceeding further, you should note:&nbsp;<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>There is a limit to the combined size of the request\/response that ChatGPT will process. OpenAI uses the concept of <em>Tokens<\/em> to measure this size &#8211; ChatGPT has a limit of 4097 tokens (and as a very rough <em>Rule of Thumb<\/em>, 100 tokens equals 75 words). Once this limit is exceeded, ChatGPT will stop responding. However, for this PoC, the requests and responses will be kept well below that limit.<\/li>\n\n\n\n<li>ChatGPT is conversational, but the API doesn\u2019t store any conversation history. The narrative must be resubmitted on each interaction to allow the LLM to stay in context. However, bear in mind that such resubmissions count towards the token limit! Again, for a PoC, all dialogues will be kept well below the threshold.&nbsp;<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Though note that <a href=\"https:\/\/openai.com\/product\/gpt-4\">GPT-4<\/a> (OpenAI\u2019s next iteration of the GPT series of LLMs) already has a much higher token limit. Additionally, further <a href=\"https:\/\/arxiv.org\/abs\/2304.11062?utm_source=the-ai-exchange&amp;utm_medium=newsletter&amp;utm_campaign=chatgpt-that-can-handle-1m-tokens\">research<\/a> aims to raise the threshold substantially higher, effectively removing this limit for most use cases.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Google<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">As stated earlier, this TTS service is sufficient for this PoC. But note there\u2019s no documentation on the API or how to use it (other than anecdotal evidence on developer-oriented sites such as <em>StackOverflow<\/em>).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To document what is known about this API for the necessary purposes of this PoC.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/translate.google.com\/translate_tts?ie=UTF-8&amp;tl=en-UK&amp;client=tw-ob&amp;q={text}\">https:\/\/translate.google.com\/translate_tts?ie=UTF-8&amp;tl=en-UK&amp;client=tw-ob&amp;q={text}<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It is a GET endpoint with all parameters passed as <em>query parameters<\/em> in the URL. The two essential parameters are tl which specifies the type\/accent of the voice, and q, which is the text to be spoken.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Note Google does have a much more advanced TTS API &#8211; but it\u2019s not free. Hence, the reason for using this one in the PoC.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Alexa Skills<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The <a href=\"https:\/\/developer.amazon.com\/en-US\/alexa\/alexa-skills-kit\">documentation<\/a> detailing how to build an Alexa Skill and how to call APIs from those Skills is extensive. There are also many blogs and posts to follow. As this article aims not to cover building such functionality, it will not be detailed here. All that is needed is a relatively simple Skill that can call out to APIs.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Python Flask<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The chatbot GUI is also simple; a <em>Python Flask<\/em> app using HTML. This article isn\u2019t concerned with Python web development, so it isn\u2019t covered. However, the <a href=\"https:\/\/flask.palletsprojects.com\/en\/2.2.x\/\">documentation<\/a> is extensive, and several Python libraries (e.g. <a href=\"https:\/\/streamlit.io\/\">Streamlit<\/a>) already exist that can be used to build chatbot interfaces if preferred.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">MuleSoft<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If we re-focus on MuleSoft and apply the principles of <a href=\"https:\/\/www.mulesoft.com\/lp\/whitepaper\/api\/api-led-connectivity\">API-Led Connectivity<\/a>, this is what a possible High-level <a href=\"https:\/\/www.mulesoft.com\/resources\/api\/what-is-an-application-network\">Application Network<\/a> will look like.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/devoteam.info\/wp-content\/uploads\/2024\/11\/image-9-1.png\" alt=\"\" class=\"wp-image-7045\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><em>If you\u2019ve not yet done so, I encourage you to read the <\/em><a href=\"https:\/\/splatform.devoteam.com\/whitepaper\/integrating-ai-with-mulesoft-for-intelligent-automation\/\"><em>Whitepaper<\/em><\/a><em> to understand more about MuleSoft and concepts such as API-Led Connectivity.<\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Building the Chatbot<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">With the Design in place, the Build can begin. Let\u2019s demo the necessary features and specific usability aspects.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Initial Loading Screen<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">First, this chatbot needs a persona relevant to its use case. As this is just a generic chatbot, it&#8217;ll take on the persona of \u2018Max, the Mule\u2019 &#8211; a helpful personal assistant.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To do this, a <em>System Message<\/em> has to be passed to ChatGPT, which initiates the interaction and tells ChatGPT how to act.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">{&#8220;role&#8221;: &#8220;system&#8221;, &#8220;content&#8221;: &#8220;You are Max the Mule, a helpful assistant.&#8221;}<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/devoteam.info\/wp-content\/uploads\/2024\/11\/image-10-1.png\" alt=\"\" class=\"wp-image-7044\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">There is a slight delay on initial loading as the screen makes an API call to ChatGPT to get the chatbot\u2019s initial greeting (as with all Web Sites making an API call). So while that is happening in the background, the screen is only partially rendered. It contains some static images, which have been added for aesthetics &#8211; to give the chatbot a certain \u2018look and feel\u2019. These can be customised or replaced as required. And, of course, the screen displays the obligatory <em>Loading Wheel<\/em>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Loaded Chatbot<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Once the initial call to ChatGPT is complete, the screen is then fully rendered.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/devoteam.info\/wp-content\/uploads\/2024\/11\/image-12-1.png\" alt=\"\" class=\"wp-image-7047\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">This initial screen contains several different objects:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>There is the opening greeting from Max &#8211; remember, the chatbot was given an initial persona by passing an appropriate phrase to ChatGPT.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>There are buttons provided for accessibility; see the audio control button to give the chatbot a <em>voice<\/em> (to play back the response). Remember, Google Translate\u2019s TTS service was used for this.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Finally, user input buttons and a text entry box are at the bottom of the screen.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Asking the First Question<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The screenshot below shows that the chatbot has picked up the user\u2019s question and added it to the conversation history. The chatbot then responded to it. Again, audio controls have been given to replay the response verbally.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/devoteam.info\/wp-content\/uploads\/2024\/11\/image-13-1.png\" alt=\"\" class=\"wp-image-7049\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The Grand Prix race the chatbot is referring to here was back in 2019 &#8211; its information doesn\u2019t appear to be completely up-to-date. But having read the <a href=\"https:\/\/splatform.devoteam.com\/whitepaper\/integrating-ai-with-mulesoft-for-intelligent-automation\/\">Whitepaper<\/a>, you\u2019ll know that LLMs are trained on existing data with a cut-off date. ChatGPT\u2019s training cut-off was towards the end of 2019, which makes sense considering the answer given.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">There are ways to overcome this by giving LLMs access to additional data processing tools and more recent data. This will be discussed again later on.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Conversation History<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A critical feature of any chatbot is its ability to keep the conversation&#8217;s context as it progresses. And as stated earlier, this is possible by re-submitting the conversation history on each interaction.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/devoteam.info\/wp-content\/uploads\/2024\/11\/image-14-1.png\" alt=\"\" class=\"wp-image-7050\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Remember, the resubmission of the complete conversation has implications, and there is a limit. However, there are ways to reduce this impact &#8211; such as dropping older interactions (probably not needed as the conversation has progressed) or only keeping track of the chatbot\u2019s responses (this will generally be sufficient to give a good overview of the conversation).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, in this PoC, the whole conversation history is retained. For this, a <em>Key-Value<\/em> store is the appropriate solution, and MuleSoft has one available, the <a href=\"https:\/\/docs.mulesoft.com\/object-store\/\">Object Store<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Spoken Input<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The final interesting aspect of the chatbot is its ability to take verbal input directly from the microphone. There are multiple ways of doing this, but for this PoC, there are simple buttons for turning the microphone on and off (bottom right of the screen).<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/devoteam.info\/wp-content\/uploads\/2024\/11\/Screenshot-2023-05-09-at-11.55.24.png\" alt=\"\" class=\"wp-image-7052\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Remember, the chatbot uses OpenAI\u2019s Whisper service to transcribe the spoken words. Notice that not only can it discern each word, but it can add correct punctuation &#8211; such as Question Marks.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">One final point is that the answer to the last question is wrong, referred to as a <em>hallucination<\/em> &#8211; the LLM has made up the answer. This is a fundamental flaw with generative AI and has to be taken seriously. However, many articles refer to this subject and ways to mitigate against it &#8211; more focused prompts, additional training, etc.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Alexa Skills<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The chatbot now runs happily from a Web Browser. However, the final aspect of this PoC was accessing it from a Personal Assistant device. The GUI itself cannot run on a device. Still, as MuleSoft\u2019s approach of API-Led Connectivity has been used, all that needs to be done is build an Alexa Skill to access the APIs within the Application Network. Below is the same conversation as above but from Alexa.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The following screenshot is taken from the <a href=\"https:\/\/developer.amazon.com\/alexa\/console\/ask\">Alexa Skills Developer Console<\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/devoteam.info\/wp-content\/uploads\/2024\/11\/image-11-1.png\" alt=\"\" class=\"wp-image-7046\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The first Command, open mule bot, is required to open the Alexa Skill (named \u2018<em>mule bot<\/em>\u2019). Then, each question is prefixed with the Command ask max to inform the Skill that a question is being asked.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Did we complete the brief of integrating MuleSoft with OpenAI and building an intelligent chatbot?&nbsp;&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Well the complete chatbot can be accessed from both a Web Browser and a Personal Assistant device. So I would say the Brief has been met. But this was only a PoC. What additional enhancements could be added in the future?<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Next Steps<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The most apparent enhancement (and probably the simplest) is to allow for further customisation to the responses from ChatGPT; many default settings were chosen for this PoC. Though, several parameters can be passed in with a user\u2019s prompt, such as <a href=\"https:\/\/platform.openai.com\/docs\/api-reference\/chat\/create#chat\/create-temperature\">temperature<\/a>, which can be used to tune the creativity and randomness of the response.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Another enhancement would be to replace the Object Store with a database (such as MongoDB) depending on whether the extra features and functionality of a complete NOSQL database would be helpful.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The final improvement to mention (and would be obligatory if this PoC were to be developed further) would be to allow multiple users to access the chatbot simultaneously. Currently, only one user can use the chatbot at any time, and the current retention of the conversation history reflects this. For multiple users, each conversation must be distinguishable from all other discussions. This could be done by giving each user a unique ID to be embedded in the key of the conversation database.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So we\u2019ve finished, and <em>Yes<\/em>, this has been a fun, technical challenge, and it demonstrates that it is possible to integrate with this technology, but is there any <em>actual<\/em> use to it? We must first understand what is happening in this sector to answer this question.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Unstoppable AI<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Advances in Conversational AI and Natural Language Processing are exceptionally rapid at the moment &#8211; new progress is seemingly being documented each week (for both good and bad). For example, OpenAI\u2019s GPT-3.5, which was only released at the end of last year, has already been superseded by GPT-4 (a model that\u2019s much more sophisticated).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">OpenAI has also recently introduced the ability to build <a href=\"https:\/\/platform.openai.com\/docs\/plugins\/introduction\"><em>Plugins<\/em><\/a> for ChatGPT, allowing access to third-party applications (such as internet search capabilities and computational functionality). Note that Plugin development is still in the early stages but will considerably increase the usefulness of LLMs and solutions built upon them.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Python-based projects, such as <a href=\"https:\/\/gpt-index.readthedocs.io\/en\/latest\/\">LlamaIndex<\/a> and <a href=\"https:\/\/python.langchain.com\/en\/latest\/\">LangChain<\/a>, provide similar capabilities extending the reach and capabilities of LLMs even further.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Privacy concerns and ethical questions are continually highlighted and debated, with new policies being written and reworked. Fully open-source LLM <a href=\"https:\/\/www.together.xyz\/blog\/redpajama\">variants<\/a> are being developed, giving broader access and demanding <a href=\"https:\/\/gpt4all.io\/index.html\">reduced hardware requirements<\/a> for running. All of which aim to combat the exclusive and closed nature of the technology.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Final Thoughts<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">So, to answer whether such technology is of actual use. The answer is <em>Yes<\/em>. It&#8217;s becoming possible to build solutions that allow LLMs to access data far beyond their initial training input, giving them access to up-to-date and non-public data.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Consider that many Organisations already hold and retain massive amounts of structured and unstructured data stored in documents, databases and private repositories &#8211; all key to their success. This technology is extremely good at tasks such as Summarisation, Extraction and Classification, which are invaluable but can also be utilised further to create Recommendations and perform Sentiment Analysis. These Organisations must start thinking about how AI-driven solutions can support them when challenged to maintain that competitive edge.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">By creating new services for internal and external consumption, they can provide value and benefit to consumers at all levels. Achieved through access, analysis, and ultimately from seeing meaningful and valuable insights into their business &#8211; all with the help of MuleSoft Integration. <a href=\"https:\/\/uk.devoteam.com\/get-in-touch\/\">Contact us<\/a> today to see how we can help you with integrating MuleSoft with OpenAI.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Recently, I wrote a Whitepaper giving an overview of Conversational Artificial Intelligence (AI), the relationship to Large Language Models (LLMs), and their potential use cases. If you\u2019ve not yet read the whitepaper, I\u2019d recommend doing so; to get a grounding in the technology and to understand this new article more effectively.&nbsp; The white paper [&hellip;]<\/p>\n","protected":false},"featured_media":112223,"template":"","categories":[752],"tags":[1148],"industry":[],"class_list":["post-160863","expert-view","type-expert-view","status-publish","has-post-thumbnail","hentry","category-business-platforms","tag-uk-import-uk"],"acf":[],"cards":"\n\t<div class=\"single-post-card\">\n\n\t\t<figure class=\"wp-block-post-featured-image\"><a href=\"https:\/\/devoteam.info\/uk\/expert-view\/building-an-intelligent-chatbot\/\" target=\"_self\" ><img width=\"1920\" height=\"1217\" src=\"https:\/\/devoteam.info\/wp-content\/uploads\/2024\/11\/chatbot-4071274_1920.jpg\" class=\"attachment-post-thumbnail size-post-thumbnail wp-post-image\" alt=\"Integrating MuleSoft with OpenAI: Building an intelligent chatbot\" style=\"aspect-ratio:4\/3;width:100%;object-fit:cover;\" decoding=\"async\" loading=\"lazy\" srcset=\"https:\/\/devoteam.info\/wp-content\/uploads\/2024\/11\/chatbot-4071274_1920.jpg 1920w, https:\/\/devoteam.info\/wp-content\/uploads\/2024\/11\/chatbot-4071274_1920-300x190.jpg 300w, https:\/\/devoteam.info\/wp-content\/uploads\/2024\/11\/chatbot-4071274_1920-1024x649.jpg 1024w, https:\/\/devoteam.info\/wp-content\/uploads\/2024\/11\/chatbot-4071274_1920-768x487.jpg 768w, https:\/\/devoteam.info\/wp-content\/uploads\/2024\/11\/chatbot-4071274_1920-1536x974.jpg 1536w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/a><\/figure>\n\n\t\t\n\t\t<div class=\"wp-block-group is-vertical is-layout-flex wp-container-core-group-is-layout-43282307 wp-block-group-is-layout-flex\">\n\t<p style=\"font-style:normal;font-weight:700\" class=\"has-link-color wp-elements-1 wp-block-lp-post-type has-text-color has-primary-color has-small-font-size\">Expert View<\/p>\n\n\t\t\n\t\t<h3 style=\"font-style:normal;font-weight:400\" class=\"wp-block-post-title has-base-font-size\"><a href=\"https:\/\/devoteam.info\/uk\/expert-view\/building-an-intelligent-chatbot\/\" target=\"_self\" >Integrating MuleSoft with OpenAI: Building an intelligent chatbot<\/a><\/h3><\/div>\n\t\t\n\t<\/div>\n\n","yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v28.4 (Yoast SEO v28.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Integrating MuleSoft with OpenAI: Building an intelligent chatbot | Devoteam<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/devoteam.info\/uk\/expert-view\/building-an-intelligent-chatbot\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Integrating MuleSoft with OpenAI: Building an intelligent chatbot\" \/>\n<meta property=\"og:description\" content=\"Introduction Recently, I wrote a Whitepaper giving an overview of Conversational Artificial Intelligence (AI), the relationship to Large Language Models (LLMs), and their potential use cases. If you\u2019ve not yet read the whitepaper, I\u2019d recommend doing so; to get a grounding in the technology and to understand this new article more effectively.&nbsp; The white paper [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/devoteam.info\/uk\/expert-view\/building-an-intelligent-chatbot\/\" \/>\n<meta property=\"og:site_name\" content=\"Devoteam\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"13 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/devoteam.info\\\/uk\\\/expert-view\\\/building-an-intelligent-chatbot\\\/\",\"url\":\"https:\\\/\\\/devoteam.info\\\/uk\\\/expert-view\\\/building-an-intelligent-chatbot\\\/\",\"name\":\"Integrating MuleSoft with OpenAI: Building an intelligent chatbot | Devoteam\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/devoteam.info\\\/uk\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/devoteam.info\\\/uk\\\/expert-view\\\/building-an-intelligent-chatbot\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/devoteam.info\\\/uk\\\/expert-view\\\/building-an-intelligent-chatbot\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/devoteam.info\\\/wp-content\\\/uploads\\\/2024\\\/11\\\/chatbot-4071274_1920.jpg\",\"datePublished\":\"2023-05-09T12:21:24+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/devoteam.info\\\/uk\\\/expert-view\\\/building-an-intelligent-chatbot\\\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/devoteam.info\\\/uk\\\/expert-view\\\/building-an-intelligent-chatbot\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/devoteam.info\\\/uk\\\/expert-view\\\/building-an-intelligent-chatbot\\\/#primaryimage\",\"url\":\"https:\\\/\\\/devoteam.info\\\/wp-content\\\/uploads\\\/2024\\\/11\\\/chatbot-4071274_1920.jpg\",\"contentUrl\":\"https:\\\/\\\/devoteam.info\\\/wp-content\\\/uploads\\\/2024\\\/11\\\/chatbot-4071274_1920.jpg\",\"width\":1920,\"height\":1217},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/devoteam.info\\\/uk\\\/expert-view\\\/building-an-intelligent-chatbot\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/devoteam.info\\\/uk\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Expert View\",\"item\":\"https:\\\/\\\/devoteam.info\\\/uk\\\/expert-view\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Integrating MuleSoft with OpenAI: Building an intelligent chatbot\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/devoteam.info\\\/uk\\\/#website\",\"url\":\"https:\\\/\\\/devoteam.info\\\/uk\\\/\",\"name\":\"Devoteam\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/devoteam.info\\\/uk\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Integrating MuleSoft with OpenAI: Building an intelligent chatbot | Devoteam","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/devoteam.info\/uk\/expert-view\/building-an-intelligent-chatbot\/","og_locale":"en_GB","og_type":"article","og_title":"Integrating MuleSoft with OpenAI: Building an intelligent chatbot","og_description":"Introduction Recently, I wrote a Whitepaper giving an overview of Conversational Artificial Intelligence (AI), the relationship to Large Language Models (LLMs), and their potential use cases. If you\u2019ve not yet read the whitepaper, I\u2019d recommend doing so; to get a grounding in the technology and to understand this new article more effectively.&nbsp; The white paper [&hellip;]","og_url":"https:\/\/devoteam.info\/uk\/expert-view\/building-an-intelligent-chatbot\/","og_site_name":"Devoteam","twitter_card":"summary_large_image","twitter_misc":{"Estimated reading time":"13 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/devoteam.info\/uk\/expert-view\/building-an-intelligent-chatbot\/","url":"https:\/\/devoteam.info\/uk\/expert-view\/building-an-intelligent-chatbot\/","name":"Integrating MuleSoft with OpenAI: Building an intelligent chatbot | Devoteam","isPartOf":{"@id":"https:\/\/devoteam.info\/uk\/#website"},"primaryImageOfPage":{"@id":"https:\/\/devoteam.info\/uk\/expert-view\/building-an-intelligent-chatbot\/#primaryimage"},"image":{"@id":"https:\/\/devoteam.info\/uk\/expert-view\/building-an-intelligent-chatbot\/#primaryimage"},"thumbnailUrl":"https:\/\/devoteam.info\/wp-content\/uploads\/2024\/11\/chatbot-4071274_1920.jpg","datePublished":"2023-05-09T12:21:24+00:00","breadcrumb":{"@id":"https:\/\/devoteam.info\/uk\/expert-view\/building-an-intelligent-chatbot\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/devoteam.info\/uk\/expert-view\/building-an-intelligent-chatbot\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/devoteam.info\/uk\/expert-view\/building-an-intelligent-chatbot\/#primaryimage","url":"https:\/\/devoteam.info\/wp-content\/uploads\/2024\/11\/chatbot-4071274_1920.jpg","contentUrl":"https:\/\/devoteam.info\/wp-content\/uploads\/2024\/11\/chatbot-4071274_1920.jpg","width":1920,"height":1217},{"@type":"BreadcrumbList","@id":"https:\/\/devoteam.info\/uk\/expert-view\/building-an-intelligent-chatbot\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/devoteam.info\/uk\/"},{"@type":"ListItem","position":2,"name":"Expert View","item":"https:\/\/devoteam.info\/uk\/expert-view\/"},{"@type":"ListItem","position":3,"name":"Integrating MuleSoft with OpenAI: Building an intelligent chatbot"}]},{"@type":"WebSite","@id":"https:\/\/devoteam.info\/uk\/#website","url":"https:\/\/devoteam.info\/uk\/","name":"Devoteam","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/devoteam.info\/uk\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"}]}},"uagb_featured_image_src":{"full":["https:\/\/devoteam.info\/wp-content\/uploads\/2024\/11\/chatbot-4071274_1920.jpg",1920,1217,false],"thumbnail":["https:\/\/devoteam.info\/wp-content\/uploads\/2024\/11\/chatbot-4071274_1920-150x150.jpg",150,150,true],"medium":["https:\/\/devoteam.info\/wp-content\/uploads\/2024\/11\/chatbot-4071274_1920-300x190.jpg",300,190,true],"medium_large":["https:\/\/devoteam.info\/wp-content\/uploads\/2024\/11\/chatbot-4071274_1920-768x487.jpg",768,487,true],"large":["https:\/\/devoteam.info\/wp-content\/uploads\/2024\/11\/chatbot-4071274_1920-1024x649.jpg",1024,649,true],"1536x1536":["https:\/\/devoteam.info\/wp-content\/uploads\/2024\/11\/chatbot-4071274_1920-1536x974.jpg",1536,974,true],"2048x2048":["https:\/\/devoteam.info\/wp-content\/uploads\/2024\/11\/chatbot-4071274_1920.jpg",1920,1217,false]},"uagb_author_info":{"display_name":"Julien Pawlowski","author_link":"https:\/\/devoteam.info\/uk\/author\/"},"uagb_comment_info":0,"uagb_excerpt":"Introduction Recently, I wrote a Whitepaper giving an overview of Conversational Artificial Intelligence (AI), the relationship to Large Language Models (LLMs), and their potential use cases. If you\u2019ve not yet read the whitepaper, I\u2019d recommend doing so; to get a grounding in the technology and to understand this new article more effectively.&nbsp; The white paper&hellip;","_links":{"self":[{"href":"https:\/\/devoteam.info\/uk\/wp-json\/wp\/v2\/expert-view\/160863","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devoteam.info\/uk\/wp-json\/wp\/v2\/expert-view"}],"about":[{"href":"https:\/\/devoteam.info\/uk\/wp-json\/wp\/v2\/types\/expert-view"}],"version-history":[{"count":0,"href":"https:\/\/devoteam.info\/uk\/wp-json\/wp\/v2\/expert-view\/160863\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devoteam.info\/uk\/wp-json\/wp\/v2\/media\/112223"}],"wp:attachment":[{"href":"https:\/\/devoteam.info\/uk\/wp-json\/wp\/v2\/media?parent=160863"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devoteam.info\/uk\/wp-json\/wp\/v2\/categories?post=160863"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devoteam.info\/uk\/wp-json\/wp\/v2\/tags?post=160863"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/devoteam.info\/uk\/wp-json\/wp\/v2\/industry?post=160863"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}