Big problem with ChatGPT based Chatbots


Hi Reader,

Welcome to the PYCAD newsletter, where every week you receive doses of machine learning and computer vision techniques and tools to help you learn how to build AI solutions to empower the most vulnerable members of our society, patients.

How to have more control over ChatGPT based custom chatbots

If you try to build a chatbot based on ChatGPT with your own data, you might face a big issue.

Your chatbot may start to spit out some non sensical responses.

For example, if your chatbot is for a support system for clothing, if a user asks the chatbot about food, it might actually answer him!

You definitely don’t want this.

A more reliable behavior would be:

If a user asks about food, say you don’t have information about that topic.

But how can you have that type of control over LLMs?

This is where NeMo Guardrails comes to the picture.

It’s an open-source toolkit for easily adding programmable guardrails to LLM-based conversational systems.

Guardrails (or β€œrails” for short) are specific ways of controlling the output of a large language model.

For example you can have control over:

  • Not talking about politics.
  • Responding in a particular way to specific user requests.
  • Following a predefined dialog path.
  • Using a particular language style.
  • Extracting structured data, and more.

In the image below, you see a configuration that controls how your Chatbot should respond to an insult from a user!

More info about NeMo Guardrails can be found here.

Deep Learning Compiler with Pytorch 2.0

In traditional software engineering, you have software compilers.

What’s the equivalent in deep learning engineering?

Well, deep learning compilers!

A deep learning compiler translates high-level code written in deep learning frameworks into optimized lower level hardware specific code to accelerate training and inference.

Deep learning compilers have to work with highly-parallelizable code often accelerated on specialized AI accelerator hardware such as:

  • GPUs,
  • TPUs,
  • AWS Trainium/Inferentia,
  • Intel Habana Gaudi etc.

To improve performance, a deep learning compiler has to take advantage of hardware specific features such as:

  • Mixed precision support.
  • Performance optimized kernels

Pytorch-2.0 has a deep learning compiler. You can invoke it using a single line of code:

torch.compile()

This can yield hardware specific, highly optimized Pytorch models! With a single line of code!

A code example can be seen below ↓

Here's a full tutorial on Pytorch deep learning compiler.


HIT THE INBOX OF MORE THAN 1500 MACHINE LEARNING PRACTITIONERS

Advertise with AIFEE to get your brand in front of hundreds of readers who are eager to start or accelerate their machine learning careers by learning about the latest and greatest in machine learning from: books, courses or online communities.

Many of our readers are also looking for machine learning related jobs.

​Get in touch today.


​

What'd you think of today's edition?

​

Machine Learning for Medical Imaging

πŸ‘‰ Learn how to build AI systems for medical imaging domain by leveraging tools and techniques that I share with you! | πŸ’‘ The newsletter is read by people from: Nvidia, Baker Hughes, Harvard, NYU, Columbia University, University of Toronto and more!

Read more from Machine Learning for Medical Imaging

Hello Reader, Welcome to another edition of PYCAD newsletter where we cover interesting topics in Machine Learning and Computer Vision applied to Medical Imaging. The goal of this newsletter is to help you stay up-to-date and learn important concepts in this amazing field! I've got some cool insights for you below ↓ AI Scribes: Transforming Medical Documentation Web Application for Medical Note Generation AI-powered medical scribes are revolutionizing clinical workflows by automating...

Hello Reader, Welcome to another edition of PYCAD newsletter where we cover interesting topics in Machine Learning and Computer Vision applied to Medical Imaging. The goal of this newsletter is to help you stay up-to-date and learn important concepts in this amazing field! I've got some cool insights for you below ↓ DeepSeek: A New Player in AI for Healthcare The new open-source LLM, DeepSeek, is creating buzz for its potential to transform AI in medicine and healthcare. Designed for...

Hello Reader, Welcome to another edition of PYCAD newsletter where we cover interesting topics in Machine Learning and Computer Vision applied to Medical Imaging. The goal of this newsletter is to help you stay up-to-date and learn important concepts in this amazing field! I've got some cool insights for you below ↓ Now You Can Use Large Language Models that are HIPAA Compliant People are finding ways to use large language models in all fields. MedTech is no exception. The amount of work...