Day 13 of 1460 minExploit ArchitectHands-on lab

Day 13: RAG Security Day 13 — Hidden Content and Adversarial Uploads

Taught by Mr Elite Updated

By the end of today you can

  • Explain how invisible Unicode and zero-width characters can affect document inspection and text processing
  • Describe why PDF, Markdown and extracted text may present different views of the same source
  • Compare what a human reviewer sees with what a parser, chunker and embedding pipeline receives
  • Identify suspicious hidden or transformed content using normalisation and text comparison
  • Recommend upload controls including file validation, length limits, provenance checks and review queues

A document can look harmless in a preview while the text-processing pipeline receives something different. Some characters occupy no visible space. Others alter how text is joined, displayed or interpreted. A PDF may contain selectable text, hidden text layers, annotations or reading-order quirks that do not match the page as it appears. Markdown can also be rendered differently from its raw source.

This matters in retrieval-augmented generation (RAG). An upload may pass through file parsing, text extraction, normalisation, chunking, embedding and indexing. A reviewer may inspect one representation while the pipeline processes another. If those views are not compared, content can be missed.

Today focuses on understanding and detecting that mismatch. You will use the designated training labs and synthetic material to compare visible content with extracted and processed text. The objective is defensive: identify suspicious discrepancies and improve the upload review process. Do not create or submit adversarial files to real services or shared knowledge bases.

In this lesson

  • Invisible Unicode and zero-width characters
  • PDF and Markdown parsing differences
  • What the reviewer sees versus what the chunker sees

Premium course

$27 one-time, lifetime access

This day is part of the full course. Unlock it to read every lesson, do every mission and track your progress to the end.

Privileged members get every paid course included. See the plans