RAG repeats back whatever's in your files. If a key, an ID number, or a phone number is sitting in there, it'll politely leak it right out.
Let's think about this for a second
Chatbot hallucination is leaking a wrong fact. RAG leak is leaking a real secret. The second one stings a lot more. So check what you're feeding it before you feed it. Don't include .env files, passwords, student ID numbers, or medical records. Writing "don't show the address / phone / key" in the prompt isn't nearly enough. If you don't put trash in, you don't need to clean up a mess later.
Let's connect it to everyday life
For Ask Your Notes, only use dummy lesson data. Don't put in your real diary, chats with friends, or an API key. In the logs, only keep the short question itself. Don't push your full notes to GitHub. If a user asks "what's the API key," refuse — even if it's sitting right there in the file, don't hand it back. That's your extra lock.
Let's try it hands-on together
Never index
- .env, passwords, tokens
- student scores, phone numbers
- other people's private chats
If asked for a secret → refuse, even if a file contains itYou'll be able to set secret-handling rules for a RAG project.5-minute try-it
List 5 files you shouldn't feed in. For each one, write a single line explaining why it's risky.
One quick warning
If you share your RAG demo with a friend, whatever's inside those files reaches them too. Only share dummy notes.