How to build a responsible and sustainable generative AI chatbot

All right, good morning, everyone. Welcome to re:Invent. Thank you for joining us and I hope you guys will have an amazing time this week at re:Invent.

Today's session is about how to build a responsible and sustainable generative AI chatbot, which is based on a real use case that we developed in collaboration with Schneider Electric. This was about building a chatbot that is not only performant but that can be also used in the most safe, secure and sustainable way.

Throughout the talk, we're gonna share some guidelines and best practices that we incorporated during the design and development phase of this chatbot.

My name is Wafa. I'm a data scientist here at AWS. I support customers in building and adopting generative AI. My main focus areas are generative AI, responsible AI and sustainability.

With me today, I have the pleasure to have Antony Maros from Schneider Electric. Thank you for joining us.

So let's kick off this session and let's start with the global picture. I would like here to share with you an overview on generative AI so that you can hopefully understand what is specific about this technology and how generative AI models work. And also what makes them different from traditional machine learning models.

So let me start by asking you a question. Do you have any idea on how many pages do we have on the internet? Any guesses? Random guesses?

Well, so according to the estimates, there are at least 6 billion pages out there in the internet. And for us, human beings, if you would like to read or at least scan the information in those pages, it would take us thousands years, we would need multiple human lives to do that, which is basically impossible, right?

So now what if I tell you that a model, a generative AI model can do that for you in a shorter amount of time in a couple of weeks or a couple of months. A model can scan, parse and analyze all this information for you, summarize it and even helps you to understand it.

So how does this sound to you? I think this is really exciting and this is why generative AI is a very exciting topic and this is what I'm gonna be talking about today.

So let's start with some basics first. Generative AI is a type of artificial intelligence that can generate new contents as we can understand from the name. This content can be images, texts, videos, ideas, stories, so many things.

For instance, all those images that you see here are generated by a model. So there is a model that was asked to generate a picture of a funny dog wearing sunglasses. And this image came out generative.

AI applications are mostly powered by what we call foundation models or large language models, which are very large models that were trained and learned from huge amounts of data. They also contain billions of parameters. And this makes them able to do a lot of things. They can perform a variety of tasks. They can automate some of our most boring tasks. They can summarize information for us.

I'm sure you most probably use chatbots in your daily life. So, generative AI chatbots are also one of the most common and popular applications of generative AI. And today we'll have an example of that, but there is much more than that because generative AI is transforming multiple industries and even the way how companies operate, we have seen impactful applications of generative AI and our customers in the healthcare sector, in the education sector, in the telco sector, financial services, they are all using foundation models to reshape and transform their businesses. And we are still in early days, we think that there is much more things to come with all the diversity of foundation models. We think that there are even bigger opportunities for our customers to create more value, to find new ways to automate their processes, to improve productivity. And so many more.

So foundation models are not new. This is not something that happens in a day. This is not something that appears out of nowhere. This is not magic, but there is a whole research community that has been working on that since so many years.

What happens is that there are some factors, some enablers that helped in scaling those models. One of those factors is the transformer architecture.

So for those of you who don't know the transformer architecture, this is an architecture that came out in 2017. And it was designed to help computers understand better the meaning and context of words in a sentence, even in bigger sentence, this was something existing models struggled with at that time. And so it was really a big deal for large language models because it was like an upgrade, it helped computers understand what we are seeing what we are writing. And since then, there were so many popular large language models that were released based on this architecture.

So the landscape is getting bigger and bigger every day. We are seeing models from big tech companies from start ups such as AI21, Anthropic, Cohere, Meta, Amazon and so many others. And this is why we created Amazon Bedrock.

So Amazon Bedrock is our managed service to help customers experiment, build and scale their generative AI applications. So in Amazon Bedrock, you can access not only one single model, but a variety of models, a broad choice of foundation models. And among all those models, you can personalize and build on top of them, the most personalized applications for your business needs

Now as generative AI is very quickly evolving and the models are getting more performance. We have also seen some challenges that come with that.

So I would like to share with you some of those challenges and I will focus on two of them, which are also some of the main challenges that we faced with in the chatbot use case. And Antonio will share with you some of the techniques that we use to overcome those challenges.

So the first one is toxicity. Toxicity means so as the name says is when the models generates an output that is toxic, an output that can be racist or sexist or discriminatory, all kind of harmful, even harmful output.

So the first thing is we need to understand why this happens. This has to do with the training data. Of course, because when there is biases there in the training data, the model will produce a toxic output because models are a reflection of real work. But it has to do also with the generative nature of those models. Because the way how models predict and generate output is not necessarily optimized for fairness, it doesn't include any fairness objective.

So this is why we need to make sure that we are able to mitigate those challenges by focusing on the training data whenever it's possible. And also we can put in place some filtering mechanisms or some guard rails to make sure that we are able to detect and filter out any unwanted output.

Another type of challenges is fidelity or hallucinations. So in generative AI, this refers to the model producing an output which is not true. So you can ask a question to the model, it will give you an answer that could seem like true. But that is not again, this happens because of the way how we train those models. Most of the time, we don't know what the model is learning. And when the model has some missing data, it will try to fill the gaps and this will lead to misleading statements.

So this has an impact on the users, right? Because it can provide them with inaccurate information and this is not acceptable for use cases such as chatbots.

So this is why we need to educate the users that this is the reality of this technology. So that they are aware of that, we can also add some disclaimers to make it explicitly clear that this is something that can happen. And that you know, the users should look out for that. And if it's possible, we can also augment the model with some verified and independent sources. To give the ability to the users to check and verify what they are getting back from the model.

So there are other challenges such as intellectual property, data privacy, for the interest of time. I'm not gonna address all of them. But if you want to have more details about all the challenges of the native AI, you can scan the QR code to access a blog post from Amazon Scholar Michael Cairns that gives more details about those challenges.

So bringing all this together, this is a very exciting time for the native AI. The models are getting more performance. The field is evolving very quickly, but it comes also with some challenges.

So we need to find the right balance between innovation and responsible use of generative AI. This is very important because this is how we can build trust in this technology and make sure that we are building safe, secure and transparent systems for our customers. And this is very important because when the end users trust the system that you are building, this is when real adoption happens, this is how you can accelerate adoption of your business.

And this brings me to the responsible AI portion of this talk in which I'll try to give you an overview of how we think of responsible AI in AWS and also share some of the guiding principles that we put in place when building generative AI systems that you can also leverage, of course in your applications.

So responsible AI doesn't necessarily have a universal definition. This is something that is globally debated. But in AWS, we think of responsible AI as being made up of six sub areas or six dimensions. Some of those dimensions are related to the technology itself, some others are related to the organization, the structure.

And I would like to mention here that this is our definition today because this is an area of active research, it is evolving and as soon as the science and engineering of responsible AI get more mature, we will also update and refine and continue to iterate.

So let's have a look at the dimensions.

Fairness is the first one and fairness is a broad topic but just to summarize a little bit, the idea we know that there are some biases that impact some populations depending on their characteristics. It can be race, gender, social background, any other kind of characteristics, we wanna make sure that we are able to detect and measure and minimize those biases as much as possible.

Now what fairness means to you is very important the way how you define fairness will depend on your business, on your sector, on your use case on your applications. There are so many factors that should be considered here and we would like our customers to really think about that so that hopefully we can build some systems that are harm free, that we are not causing any harmful disparities across populations. Because of an AI system.

Explainability is about being able to understand the logic or the rational behind the decision of the model. And this is very important for our customers because they want to understand the justification. They want to have a justification for the output of the model for why the model has made such a decision. And it's also even more important for the ones with compliance requirements.

So this is why we try to help them as much as possible, at least to avoid the black box thing. And we put in place some mechanisms for that that will be shared by Antony in the use case, in the use case parts.

Robustness is about being confident that the model is reliable, is operating as expected, that is accurate. The interesting part is that there is always usually a trade off that come into place here because most of the time you try to build a system that is fair, you try to reduce bias in your system. And at the same time, this will make your system less accurate.

So this is ok, you should be willing to accept that you don't always need the absolute performance. You don't always need the optimal performance. Sometimes it's ok to prioritize an acceptable performance over an optimal one in order to have more explainable and more fair systems.

Privacy and security. So this is our number one priority in AWS for any service. But in the context of generative AI, this is mainly related to the end user data protection. So all the data that is passed through the system that is used for training data and also the ability of not identifying any personal information when training those models.

So we put in place both preventive and proactive approaches for that.

And then governance. This is more about the organization, it's more about the people, the culture, the all the supporting system that is there to enforce responsible AI to make sure that it is adopted.

And transparency is really about giving the info to the end users, the information that they are interacting with an AI system to avoid any confusion here and to allow them to make informed decisions about what they wanna do with those systems.

Ok? So now we talked about the dimensions of responsible AI. Let's talk a little bit about how the, the way how we implement those dimensions into any system is an end to end process. This is not something that happens in a single component. When we build any generative AI applications, we go through multiple phases through an entire life cycle.

So when building your application, make sure to iterate over the entire life cycle and implement responsibly in every phase from scoping. All the way to deployments.

Always talking about the how as we've been working with customers, we also define some experience based best practices. And I would like to share some of some of them with you today.

So first one, as I said, responsible AI dimensions are use case dependence. So be specific about your use case, focus on defining your use case. The more specific, the more narrow the better because this will allow you to easily define the responsible AI dimensions for your use case.

Let's take fairness as an example. If you have a more specific use case, you can easily define fairness notions, fairness metrics and hopefully train some algorithms that can enforce this definition. And this goes also with risk assessment because every use case has different kind of risks.

So make sure to measure and assess risk for every use case, invest as much time as possible to test your system, test and test and test your system. And throughout the entire life cycle try to have a holistic view because this is how you can define all the limitations of your system and area of improvement and also governance policies.

So having clear governance policies are very important to assign responsibilities, assign accountability and make sure that responsible AI is adopted by all the stakeholders and engage and encourage them to be engaged in that process.

And the last one is education and diversity. Those are very important ones even much more important than you can imagine. Because the part of training, the data of training, the fine training, those are very important parts of, of generative AI and they are not fully automated. They are still humans that are involved there in data annotation in data collection, for instance.

So make sure to have as much representation of different groups as possible and promote diversity to be able to anticipate and overcome. Some of the challenges that I mentioned earlier.

So those best practices will continue to evolve and maybe some new challenges may emerge. We know that we don't have the answers for everything. This is why we work alongside others to keep addressing those challenges to develop new solutions and new approaches.

And we are actively engaged with uh global organizations and global standards uh such as ISO and y and we also come up with a risk assessment framework that is in line with those standards.

Uh so this is a four steps framework to conduct risk assessments and i will briefly walk you through each of those steps.

So the first one is you have to start by identifying the type of risks that you have in your system. So describe the risk that the possible risk of your system and also the stakeholders that are possibly impacted by that by those risks.

So for instance, if you are working, developing a chatbot and you think that there is a risk of hallucination, try to narrow the space of this risk as much as possible and also try to understand who are the stakeholders that are impacted, that are involved in that with that, you can quantify or measure the likelihood of this risk.

So for instance, you can measure that in terms of how severe is the risk, how likely it is to happen, what is the impact and so on. And this will allow you to move to the next step in which you can assign a level of risk.

You can raise these risks to have a sort of the priority metrics that will give you an overview on all the high priority risks within your organizations. And based on these priority metrics, you can take action to treat the risks.

And of course, the story doesn't end here because once you've taken actions, when you've, once you, you, you treated the risk, you need to keep, to keep a close eye and monitor your system to make sure that whatever action you have taken is still there operating as expected.

Ok. So we have talked so far about responsible AI dimensions. But there is another important aspect that is very important for us, which is sustainability.

AI models are evolving in capabilities, but their size is also evolving. So it's very important to make sure that we are addressing their environmental impact.

So first thing when we talk about sustainability in the cloud in AWS, we usually refer to all this effort that is focused on reducing the energy and improving the efficiency across all components of a workload. And we have a reference tool that we use uh for that, which is the Well-Architected Framework.

So this is uh a tool that can help you apply cloud based practices for your specific situations. Traditionally, we had five pillars in this uh framework in the Well-Architected Framework which are uh Security, Reliability Cost, uh Performance Efficiency, and Operational uh If uh Excellence and we have also added a Sustainability pillar to provide a way to our customers to benchmark their sustainability best practices to benchmark their architectures against sustainability best practices and help them in achieving their sustainability goals.

And uh we have also published recently some guidelines to uh for uh how to optimize generative AI workloads for sustainability that you can uh access through this QR code.

We have also a dedicated session, uh dedicated chat talk on this topic. For those of you who are interested by sustainability and generative uh generative AI uh make sure to attend uh the session, the chat talk on sustainability and generative AI.

And with that, I will hand it over to Antony to share with us more insights on the use case. Thank you.

A uh I'm Anthony Medas. I've been with Schneider Electric for 17 years. Now, seven of those years of my tenure have been on the North America AI team and I currently lead a team uh for solutions engineering and architecture.

Our team in North America AI, we handle use cases from all different verticals within North America could be customer care services, finance HR so we have our uh we have our eyes on a lot of different projects.

We have a team that's fully capable of, of developing and delivering projects. from from beginning to end, we have project managers, data scientists. uh the engineering team is under under my watch. uh UXUI as well as visualization as electric.

We strongly believe that access to energy and digital technology is a fundamental human right. We are proud to be a growing technology company ranked in the top 35 of global software vendors.

We are in a unique positioning where we integrate the most advanced technologies of energy management and industrial automation. We implement all opportunities for efficiency and sustainability for our customers in the domains of buildings, data centers, energy infrastructure, as well as industry.

Technologies already exist today to make companies energy resilient and net 0 70% of carbon emissions can be eliminated today with existing technologies, it offers a great economic return because it's eliminating waste and inefficiencies.

Whether it's virtual power plants, micro grids or other technologies, we can help deliver significant synergies to create a more reliable and sustainable electrical infrastructure. While also delivering economic benefit, the technology to make actual insights from data is AI.

Two trends that support the the sustainability transition are digitalization and electrification. Digitalization enables us to track energy consumption data for better efficiency and electrification allows us to use cleaner and cheaper energy sources. thus reducing the carbon impact on the planet.

If we or our customers and partners want to capture insights, predict, simulate and make agile decisions in volatile business conditions. AI is our best ally. Due to this realization, we have invested heavily in this area to support global initiatives.

We have three major hubs located in India, France and the US along with a dedicated hub in China supporting its region. I want to highlight our flagship hub. It goes by the name of Intensity and it is located in Grenoble, France.

It perfectly illustrates our vision of buildings of the future, fully digital sustainable and people centric the building uses 37 kilowatt hours per square meter per year which is 10 times less energy than average European buildings equipped with photo photovoltaic panels, wind turbines in on site. energy storage intensity is energy autonomous through unique micro grid partnership.

This energy is also shared with the neighboring buildings in the city of Grenoble. What are hubs without people? We have 300 AI specialists spread across a wide variety of concentrations working on our most impactful projects, both internal and external.

As Schneider Electric, we are adding responsible AI to our risk management strategy not creating a parallel channel where these concepts exist independently. There are three key areas which you want to focus on those being explainability, robustness and accountability.

Explainability is very important. A lot of us have been in situations where traditional modeling results are questioned, neural net outputs are scrutinized and AI is no different in the generative AI space. In fact, we believe it is even more important.

Now, one way explainability can be achieved is through chain of thought reasoning. In particular, we can display references or even SQL statements alongside of the LLM output.

Robustness. This is being resilient in the face of threats, coping with heavy workloads and the ability to scale out strong architecture, the right monitoring mechanisms and extensive testing all play a part here holding well, architected reviews with AWS helps us to identify areas for improvement using a service like CloudWatch.

We can aggregate resource metrics and build dashboards to track health as well as trigger alerts when critical thresholds are met, accountability, how do we deliver content responsibly? We do this by getting our experts involved and not developing these solutions in a vacuum.

We believe data scientists AI engineers, domain experts, stakeholders all need to be involved and feel like owners in the process. We de we design our project teams to be multidisciplinary and hold regular cadence with business stakeholders to ensure we're setting proper expectation and meeting everyone's goals. Where possible.

One example of this, a knowledge bought for our customer care agents. It is the product of the responsible AI principles we follow. This has led to a 40% reduction in time to serve for our customers as well as more consistent responses from customer to customer.

Oops. uh see ingestion of large amounts of internal and external documentation paired with a foundational model allow us to rapidly respond to customer questions with context appropriate answers delivered to our agents in real time. with high confidence.

This orchestration is achieved through the use of retrieval augmented generation or RAR. A enhances the capabilities of an LLM by adding an information retrieval system. In the case of our knowledge bo this is a repository of knowledge based articles which are curated by our internal agents.

Our internal experts RAG is not limited to document repositories for other use cases. We also leverage web search API s as well. RAG helps us to uh R A helps us to solve a few common challenges with L Ms.

First is timeliness slide ski movie. Sorry about that. Scroll on a bit. The first is timeliness. L Ms are trained on a set of information which can quickly go stale soon after training. RAG overcomes this by pulling from a trusted source of information. so the Lm does not have to impute information.

Second is hallucinations or knowledge extrapolation. When a foundational model is lacking its knowledge, typically, the LLM will attempt to fill in the gaps with its own creativity. You know, again, we want to reduce this by leveraging the internal source of information that we have collected through the right architecture.

How about fine tuning? Um so why not train our own model? Well, it's extremely expensive to do so and the gain in performance won't necessarily outweigh the cost or overcome the maintenance.

How about fine tuning? Adjusting the weights of the FM based on a specific data set may not necessarily help us to overcome some of the challenges of of training our own model.

So what we find is that we can use uh the conjunction of RAG architecture as well as in context learning through the context window of an LM and be able to have the happy medium.

Uh luckily for us, we use Bedrock and as well as Anthropic. It has a 100 k context window has a very large context window for us to be able to leverage RAG while also being able to deliver the content out to our agents. And thus our customers.

Schneider Electric together with AWS adapted the AWS Responsible AI principles in alignment with our broader vision today. I will be highlighting for them trustworthiness. This includes the EWS pillar for robustness which aims to have a reliable system in place to support repetitive inference, making sure that it performs similarly for similar requests, toxicity and safety.

This includes a pillar for fairness from AWS but also extends to general harmful content, not restricted to minorities or ethnicities but also to the but but also to the content which can promote hate or violence.

The key here isn't to enact guardrails in output filtering to make sure the model only responds to topics related to SE while preventing harmful output.

Explainability aligns well, with what WAA described earlier and domain knowledge expert, this is also referred to as human in the loop, making sure we have human involvement along the project life cycle and beyond.

Trustworthiness is built on a sound and reliable architecture. A curated array of input content from validated sources and technology which can support search and retrieval tasks to help build that trust.

We're using retrieval augmented generation partner with chain of thought model reasoning. There are a few points of mention here, we have step functions to provide workflow orchestration supporting the RAG preparation process.

Vector embeddings are stored in OpenSearch. Central to the architecture is a conversational agent which interacts with the requesting applications, triggering calls to the SageMaker endpoint in charge of handling the embeddings of the request.

And finally the call to Bedrock where the prompt is executed and returned.

Toxicity and safety. Using Bedrock, we can leverage foundational models like Anthropic Claw which adhere to its Constitutional AI principles. These principles guide their AI systems to generate useful responses while minimizing harm.

Likewise, we rely on AWS to host these models in a safe and secure escrow account, giving us the peace of mind knowing our IP or data is safe from being transmitted externally.

We have some video playing here. We're demonstrating that the model we have set up will not interact with uh with questions that we don't necessarily want them to. Maybe in the future, we'll train a model that will tell Schneider specific jokes, but we haven't hit that yet. Bye,

Explainability, reasoning through chain of thought, not only helps to build trust but also supports explainability. Furthermore, document references provide visibility to the method used by the foundational model to derive its answers as well as the content used as part of its contextual input.

Here's a demonstration of the chain of thought reasoning where we can see it stepping through the documentation as well as providing references. So this information wouldn't necessarily be found within a foundation model. But again, using RAG, we can curate our own internal document repository to provide exactly what we want.

Lastly is domain knowledge leon experts to vet answers ensures the output is staying consistent with reality. Even though the answers may look coherent. It takes a keen eye to gauge its quality accuracy and relevancy.

Maybe it returned a one time factually correct answer. But now it's outdated. Using SageMaker Ground Truth, we can stage our prompt output and gather feedback from our domain experts. Using that feedback, we can then tune the generative AI workflow to provide higher quality responses.

As much as AI has the potential to allow us to be more efficient. It would be irresponsible to have a process devoid of human interaction.

We have the thumbs up, thumbs down button alongside of the SageMeer Ground Truth labeling jobs to provide feedback.

Thank you for listening. Feel free to find out more about Schneider Electric at se.com/ai.

Thank you. All right. Thank you very much, Antony. It was very interesting.

Uh before concluding, i would like to share with you some resources related to the session topic. So in case you don't know, uh there is an entire team in AWS that is called the Generative AI Innovation Center. And i have the pleasure to be part of this team.

Uh this is a team that is dedicated to support customers, accelerate uh generative AI adoption and drive it to production. Uh it's a global team uh of scientists, strategies uh subject matter experts. And we work with customers uh across multiple uh verticals and sectors.

So you can have more information on the team by scanning the QR code, but also feel free to reach out if you would like to have more information.

I also wanted to share with you. Uh so this blog post about the emerging challenges of uh generative AI that could be an interesting uh read for you.

Uh i would like to highlight also some uh recent commitment commitments where uh Amazon uh joined the White House and other technology le leaders with some voluntary commitments uh to avoid any uh risk and uh handle any societal concerns about generative AI.

So feel free to have a look and examine those commitments in the QR code. Uh and there is also a link to our Get Started with Generative AI on AWS page uh that could be of interest for you as well.

So this is my favorite slide of this uh session. I would like to give a big shout out to the to the team members behind this uh work that couldn't join us today. Uh Seol Desert Florent Feliz and Oscar Snack. Thank you very much for your amazing work.

Thank you again, Anthony for joining me today on stage. And if you have any questions, uh this is my email and Antoni email, uh feel free to drop us uh your questions, we would be more than happy to uh answer your questions and uh support you the best.

We will also be in the coffee area and the entire week in area events. So, uh if you would like to discuss, please uh feel free to reach out.

Uh thank you very much for listening and enjoy the rest of your time.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
I choose Germany to talk about its attitude and measures towards sustainable energy use. Germany is a leading country in the world when it comes to sustainable energy use. The country has committed to phase out nuclear power and shift towards renewable energy sources. The German government has set a target of generating 65 percent of its electricity from renewable energy by 2030. One of the main measures taken by Germany to achieve this target is the Renewable Energy Sources Act, which was introduced in 2000. This act provides financial incentives for individuals and companies to invest in renewable energy sources such as wind, solar, and biomass. The act guarantees a fixed price for renewable energy generated by private individuals and businesses, making it easier for them to recover their investment costs. Germany has also invested heavily in research and development of renewable energy technologies. The country has a number of research institutions and universities that are dedicated to developing new and innovative technologies to support sustainable energy. Another notable measure taken by Germany is the introduction of the Energiewende program. This program is a comprehensive strategy aimed at transforming the country’s energy system to one that is based on renewable energy sources. The program seeks to create a sustainable and affordable energy system that is also socially responsible. The German government has also introduced a number of policies and regulations to promote energy efficiency. For instance, all new buildings in Germany are required to meet strict energy efficiency standards. The country has also implemented a number of policies to promote the use of electric vehicles and public transportation. In conclusion, Germany has shown a strong commitment towards sustainable energy use. The country has taken a number of measures to promote the use of renewable energy sources and to phase out nuclear power. With the Renewable Energy Sources Act, Energiewende program, and other policies and regulations, Germany is well on its way to achieving its target of generating 65 percent of its electricity from renewable energy by 2030.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值