LLM Sentinel | A project which can make the LLM Chatbot safer

Jason TC Chuang
aidatatools
Published in
2 min readJun 16, 2024
LLM Sentinel

I’m excited to introduce LLM Sentinel, my project for the NVIDIA AI Generative AI Agents Developer Contest, hosted by NVIDIA and LangChain (https://www.nvidia.com/en-us/ai-data-science/generative-ai/developer-contest-with-langchain/). This contest is a remarkable opportunity to advance generative AI-powered applications using cutting-edge NVIDIA and LangChain technologies.

With a background in ML/AI since my PhD studies at Purdue University in the late 2000s, I’ve witnessed rapid advancements in both hardware and software. While LLM chatbots excel at providing Q&A, they often lack the ability to discern and avoid answering unethical questions or even jailbreak cases.

LLM Sentinel addresses this issue by creating a safer chatbot using the open-sourced llama3:70b model, integrated with NeMo Guardrails and LangChain, and featuring a user-friendly Gradio UI. The chatbot is designed to deny answering questions on sensitive topics such as Illegal Activity, Hate Speech, Malware Generation, Physical Harm, Economic Harm, Fraud, Pornography, Political Lobbying, Privacy Violence, Legal Opinion, Financial Advice, Health Consultation, and Government Decision.

NeMo Guardrails enforce these restrictions through a YAML configuration file, while LangChain manages permissible inputs via a structured prompt template, utilizing Ollama for model backend interaction. The Gradio UI ensures an interactive user experience, adhering to safety and ethical standards. This setup guarantees safer and responsible AI interactions.

Explore my GitHub repository to get started with
LLM Sentinel 👉 https://github.com/aidatatools/LLM_Sentinel

#NVIDIADevContest #LangChain

Check out the 90-second introduction video on YouTube.

LLM Sentinel Demo

--

--

Jason TC Chuang
aidatatools

Google Certified Professional Data Engineer. He holds a PhD from Purdue University. He loves solving real-world problems and building better tools with ML/AI.