Group Purchasing
Group Purchasing
AI-FOCUSED

SEC495: Leveraging LLMs: Building & Securing RAG, Contextual RAG, and Agentic RAG

SEC495Cyber Defense, Artificial Intelligence
  • 7 Hours (Self-Paced)
Course authored by:
David Hoelzer
David Hoelzer
SEC495: Leveraging LLMs: Building & Securing RAG, Contextual RAG, and Agentic RAG
Course authored by:
David Hoelzer
David Hoelzer
  • 7 CPEs

    Apply your credits to renew your certifications

  • Self-paced

    Train at your own pace from wherever you are

  • Essential Skill Level

    Course material is for individuals with an understanding of IT or cyber security concepts

Learn practical skills to build secure, effective Large Language Model (LLM) solutions using Retrieval Augmented Generation (RAG) in this fully hands-on course.

Course Overview

Learn to build secure, self-hosted LLM solutions using Retrieval Augmented Generation (RAG) for tasks like knowledge retrieval and policy creation, while implementing defenses against prompt injection and enforcing information sensitivity controls—all without relying on public APIs or third-party platforms.

The leadership teams of many organizations have directed that the enterprise be on the lookout for opportunities to leverage AI in the business process. The problem is that there is very little clear articulation of what the vision for AI in the enterprise is.

While SEC595 teaches you everything you need to know to be able to build cutting-edge machine learning and AI solutions for real-world cybersecurity problems, SEC495 has an entirely different goal. Our experience tells us that most management teams asking for AI are reacting to the Large Language Models (LLMs) that have dominated the mainstream news for the last few years. In SEC495, you will work along with the instructor to build a completely self-hosted RAG (Retrieval Augmented Generation) system that leverages an LLM. More than this, you will learn how to implement security controls to defend the LLM from prompt injection and how to implement information sensitivity controls to limit the answers the LLM can provide based on the rights of the user.

If you need to build an LLM-based solution for question answering, knowledge base retrieval, policy creation, or any related task, this class will get you up and running quickly.

Author Statement

“More and more, management is looking to us to leverage AI in useful ways in the enterprise. How can we do this? What does it look like? While there are many answers to these questions, and SEC595 provides clear answers with regard to threat hunting and monitoring, SEC495 teaches you everything you need to know to get started building solutions that leverage LLMs. While the SEC595 solutions are extremely useful and cutting-edge, the SEC495 focus on building RAG solutions using LLMs is much more readily understood by management teams who can instantly see and understand how the solution is useful.

“While we focus on leveraging (and securing) RAGs for information retrieval, there are some beautiful natural extensions, such as identifying standards compliance based on policies, automated report generation, and many more. Perhaps the best part of SEC495 is that everything is completed using on-premises containers. Of course, you can host these in the cloud, scale them up, or even trade them out for commercial APIs, but you learn how to implement all these pieces without ever needing to send sensitive information to a third party. That’s a big win!”

- Dave Hoelzer

What You’ll Learn

  • Build an end-to-end RAG backend solution.
  • Extend a RAG to implement Contextual RAG solutions.
  • Understand and implement AI agents in an LLM context for RAG supervision.
  • Implement security controls limiting information disclosure from an LLM.
  • Prevent and defend against prompt injection attacks.

Business Takeaways

  • Work with and leverage vector databases.
  • Implement chatbot (and similar) style solutions internally.
  • Build AI/LLM solutions without disclosing sensitive internal information to a third party or using a public or commercial API.
  • Create cutting-edge contextual RAG solutions.
  • Implement agent-based AI solutions related to LLMs.

Course Syllabus

Explore the course syllabus below to view the full range of topics covered in SEC495: Leveraging LLMs: Building & Securing RAG, Contextual RAG, and Agentic RAG.

Section 1Building Useful LLM Solutions

Build secure, locally hosted LLM solutions from the ground up, progressing from traditional RAG to advanced Contextual and Agentic RAG while learning to enforce access controls, improve response quality, and protect sensitive data without relying on third-party APIs.

Topics covered

  • Tokenization and Word Embeddings
  • Building and Hosting LLMs Locally
  • Implementing and Securing RAG
  • Reducing Hallucinations and Cost
  • Developing Agentic AI Solutions

Labs

  • Where do Embeddings Come From?
  • Exploring Ollama
  • Retrieval Augmented Generation
  • RAG: Attribution & Security
  • Agentic RAG

Overview

After introducing the fundamental components upon which LLMs are built, you will work through how to build a traditional RAG solution. Once this is functioning, you will learn how to implement access controls to limit which data the AI can return to specific users. Next, you will improve the quality of the information delivered by your AI by learning how to build a Contextual RAG. The class finishes by introducing the notion of Agentic RAG, implementing auditor and prompting agents, and discussing other possible extensions.

Something that sets this class apart is that we are focused on the security of your information. While all the techniques taught in the class can be translated directly to the use of commercial APIs, the entire course is taught leveraging locally hosted components. While it can seem that this makes the process more complex, it actually makes the process much more transparent... and demonstrates how to implement LLM based solutions without disclosing sensitive information to a third-party API.

Full Topic Details

  • Tokenization
  • Word embeddings
  • CBOW and Skipgrams
  • Vector data stores
  • Hosting LLMs effectively and efficiently
  • Interfacing with LLMs programmatically
  • Document preprocessing and ingestion
  • RAG prompt engineering
  • Limiting LLM hallucinations
  • Implementing ACLs within a RAG effectively
  • Implementing Contextual RAG efficiently
  • Building Agentic AI solutions
  • Deployment considerations for cost mitigation

Things You Need To Know

Important! Bring your own system configured according to these instructions.

A properly configured system is required to fully participate in this course. If you do not carefully read and follow these instructions, you will not be able to fully participate in hands-on exercises in your course. Therefore, please arrive with a system meeting all the specified requirements.

Back up your system before class. Better yet, use a system without any sensitive/critical data. SANS is not responsible for your system or data.

Mandatory System Hardware Requirements

Your system must have at least 16 gigabytes of RAM; more is better. The system must be running a modern 64-bit operating system such as Windows 10, Windows 11, Linux, or MacOS. Both Intel and ARM processors are fully supported in the labs. Your system must have at least 20 gigabytes of free disk space available.

This class does not use VMWare. You must have the appropriate rights to install software, or your system must be preconfigured with Rancher Desktop installed and functioning. Docker can also be used if you have a strong preference for it (especially if you are running Linux). Other containerization solutions supporting Docker compose files are acceptable, but you may need to supply your own support. Internet connectivity is required at several points during the class.

If you have additional questions about the laptop specifications, please contact customer service.

SEC495 training is recommended for a diverse range of individuals, including:

  • Anyone seeking to implement a generative AI solution for information retrieval
  • Individuals who have successfully completed SEC595 who wish to know more about LLMs
  • Professionals seeking to understand how to leverage LLMs for internal and customer facing information retrieval purposes

  • Electronic courseware
  • A set of dockerized containers for implementing and running all labs locally

Students must have at least intermediate Python skills since the series of workshops will all be written in Python.

The SEC495 course is a part of the “Artificial Intelligence” Learning Path, designed to train cybersecurity professionals in AI security essentials.

Depending on your current or desired future role, one of these courses is a great next step in your cybersecurity journey:

Retrieval Augmented Generation (RAG) is a powerful technique that enhances Large Language Models (LLMs) by allowing them to pull in relevant, up-to-date information from external data sources before generating a response. This approach helps ground the model’s answers in factual, context-specific content, making it ideal for enterprise use cases such as internal chatbots, policy generation, and knowledge retrieval. RAG is particularly valuable in secure environments where protecting sensitive data and controlling access is essential.

Key benefits of using RAG in secure AI applications include:

  • Reduced hallucinations: Answers are based on real, curated data.
  • Access control enforcement: Users can only retrieve content they’re authorized to view.
  • Data privacy: Systems can run fully on-premises without sharing information with third-party APIs.
  • Customization: Tailored responses based on your organization's unique content and use cases.

RAG bridges the gap between raw language generation and trustworthy, enterprise-ready AI.

As organizations race to integrate Large Language Models (LLMs) into business operations, professionals who understand how to build secure, context-aware solutions are in high demand. SEC495™ places you at the forefront of enterprise AI implementation with hands-on experience in Retrieval Augmented Generation (RAG), contextual data integration, and secure deployment practices, giving you a competitive edge in both technical and leadership roles.

Career-enhancing benefits include:

  • In-demand skills: Learn to build LLM-based systems companies want but struggle to implement.
  • Security expertise: Understand how to protect sensitive data and prevent AI misuse.
  • Versatility: Apply your knowledge across industries including finance, healthcare, tech, and government.
  • Credibility: Gain practical experience that complements certifications or degrees.
  • Future readiness: Stay ahead as AI evolves toward more autonomous and secure applications.

Course Schedule and Pricing

Looking for Group Purchasing Options?Contact Us
  • Location & instructor

    Virtual (OnDemand)

    Instructed by
    Date & Time
    OnDemand (Anytime)Self-Paced, 4 months access
    Course price
    $459 USD*Prices exclude applicable local taxes
    Registration Options
Showing 1 of 1

Benefits of Learning with SANS

Bryan Simon: Teacher Standing Next to Smartboard and Explaining Concept

Get feedback from the world’s best cybersecurity experts and instructors

OnDemand Mobile App

Choose how you want to learn - online, on demand, or at our live in-person training events

Close Up of Woman Holding a Pen and Documents

Get access to our range of industry-leading courses and resources