Three months ago, I almost shipped a quote -unquote
clever feature. It was a drag and drop for a
CSV file. Where we could do auto, EDA, and boom,
done. And two weeks ago, I made this app better.
I included additional features. Here's what I
didn't take into account. The real world. Where
we have hospital claim files, student records.
purchase histories with emails and addresses.
And then I imagine someone dragging a million
rows into my app from a coffee shop Wi -Fi and
my stomach just dropped. So I pulled the plug,
not on everything, just on the uploads, just
on file uploads. And I rebuilt the whole thing
around one single question. What if your AI analyst
is not meant to see your data, but still help
you to analyze it like a pro? And today I'm going
to show you how I exactly did it. Hey, I'm Mukundan.
This show is about solving real problems with
small, useful AI. Things that you can actually
use today. Each week, we pick one problem, build
a simple workflow or tool, and talk through the
decisions, what to automate, how to check quality,
and how to make it reliable. If you're a builder,
creator, or just AI curious, you'll leave with
the steps that you can copy tonight. Welcome
to Data and AI with Mukundan, where you learn
AI by building. I'm Mukundan. Each week, we turn
everyday problems into small, useful AI workflows.
It's not some hand -wavy, someday, it is something
we ship today. This episode, where... we have
ai that thinks like an analyst i would call it
a more version 4 secure mode where we have no
file uploads no paste only i mean it's just copy
paste only more policy driven privacy where you
hash mask redact on your machine before any analysis
you can get a notebook ready transformer where
you can copy paste into jupyter notebooks or
collab by google so you'll get like a streamlet
wrapper for teams with a data handling report
that you can hand to your ops team legal or your
future self and if you have data that you can't
upload this is especially for you so let's look
at the story and what are what are the design
constraints that we need to take into account
here's the reality your stakeholders they want
insights they don't want any risk associated
with those insights but most ai tools They want
your files. And that's a non -starter in healthcare,
finance, education. Here's the reality. Your
stakeholders, your stakeholders, they want insights,
not risk associated with those insights. And
most AI tools, they want your files. That's a
non -starter, especially if you're working in
healthcare, finance, education. And most definitely,
and most likely, it's all industries really.
For small companies, big companies, they're trying
not to leak their customers' emails into the
void. So this time, I just picked four hard constraints.
One, no file uploads, period. Second, client
-side only or local runtime preferred. Basically,
running it on your own laptop. Third one was
policy presets, like a one -click default. That's
opinionated, but still editable. And a human
readable audit of what happened to each column.
Here's what design philosophy I had in mind for
this. Use a rules -first based approach where
you're focusing on the schema, the semantics,
and the policy to make safe decisions by default.
Then let AI suggest analysis steps. from structured
descriptions and not from raw rules and keep
the user in the loop a safe default is great
an understandable default is even better think
of three big privacy more that's what i wanted
to do here one is hash where you turn it into
a code like giving the value a nickname with
your secret key for example it could be alice
at 123 .com And this becomes F3A dot dot dot
9B2C or whatever. It's the same input, same secret,
and it gives the same code. It's great for joins,
but it's hard to reverse. Hashing is essentially
you are turning your emails or any kind of sensitive
data into like a key, a key which is hard to
directly recognize. Second privacy move is mask,
where you... blur the details it's like a black
marker where alice at example .com becomes a
dot dot dot dot at example .com right so you're
blurring the details here so you see the shape
but not the secrets and third is where you're
redacting or removing it so if you don't need
it delete it ssn is a good example that's it
just code it blur it or drop it i think i've
seen when i've worked with applications that
ask you for ssn they blur the details So it looks
more of a case of masking in those kind of applications.
While I don't particularly remember which one,
but I believe like maybe websites which ask you
for that. It could be these government websites
only. They will still be blurring the details
is what I believe. And let's come on to some
easy presets. So we ship with presets so you
don't have to overthink. So analytics is more
analytics safe, like hash emails or phones or
IDs. mask names or addresses keep dates drop
ssn so for analytics what you need you just need
a more heft value of emails phones or ids you
don't need the full names you can just mask it
like how i talked about earlier like a dot dot
dot at example .com right and addresses could
be masked as well the dates can be kept however
just drop the ssn that's more analytics safe
So if the AI models are using it, just make sure
those kind of values have been applied already.
And if it is marketing safe, so stricter on addresses
and phones. You don't want marketers to reach
out to you because your address is out there.
You don't want them to be sending stuff to your
mail, mailbox, or could be just your email address
or whatever, or your phone. You don't want them
to call you too. So you want that to be marketing
safe and HIPAA -like, right? more like an example
only but not legal advice so very strict where
it's like a lot of redaction required so if you
don't like a decision flip it a column keep hash
mask or redact that that's the basic rules to
keep in mind here now let's do it step by step
how how would this work so step one what you
do is like you paste a tiny sample so you would
paste like five to ten rows or just the header
row So example, if there is more sensitive information
involved, you just copy like just the column
names, which is user ID, email, signup date,
country, and a column for churned, which means
the customer or somebody churned. And the last
field could be phone. Step two, you choose a
preset. You say analytics safe. Step three, you
say set your secret. If anything will be hashed,
you type your secret and it could be a password
that you pick. Keep it safe. Step 4. Transform.
Step 4. In this step, we will transform. The
tool looks at each column and it does the right
move. So email, when it looks at email, it will
be hashed. Phone hash. User ID hash. SSL redact
or remove. Name, address, mask. Dates, usually
keep or bucket by month. step five get two things
back a safe table that you can analyze a short
report that says a short report that says what
we did and why what the report says in simple
words column email type looks like email action
hashed reason column name contains email result
columns test result column stays but now It's
quotes. This is your paper trail. What the AI
still does without your data. You might ask,
if the AI doesn't see my full data, is it useful?
Yes, because thinking like an analyst starts
with good questions, not with seeing every row.
You give it column names, a few sample rows,
or none, and your business question. Why did
churn spike in May? It gives you split churn
by plant type and country. Look at cohorts by
sign -up month. Check time to first value. Compare
activated versus not activated users. Look for
payment failures and support tickets around June.
See, that's your analyst thinking. Your rows
never left your laptop. Here are some real world
examples for your reference. So let's say you're
in healthcare, you hash patient IDs. You can
still join the tables, but you never see raw
names. If you're in education, you keep the cohorts,
you drop the names, but you measure the learning
without revealing the students. If you're in
marketing, hash emails for matching, mask the
phone, redact the SSL. You shouldn't have SSL
anyway. And when you're looking at internal product
analytics, you keep the date buckets, but you
drop the exact addresses. Let's look at some
common questions. So one of the questions that
could come up is why a secret for hashing? So
it makes the code hard to guess. Without the
secret, People can try common values, right?
And can I still join tables? Yes, you can. If
the same input and the same secret is kept, you
get the same code. Are the dates safe? Depends.
Often keep or bucket by month. Birthdays, well,
usually mask or remove. Is this legally compliant?
So it's more sensible defaults. So obviously
talk to your legal or privacy team for stricter
rules. HIPAA or GDPR related. But it definitely
gets you to a closer spot than uploading your
file to a tool where AI will be analyzing that
data. So this is definitely getting you in that
direction. So obviously this will be depending
on the legal teams that you get to work with
as part of a company, as part of your client
or whatever. Just make sure you're talking to
them and checking with them if this is something
that will work. But this, I would think, gets
you in that direction. And what about running
on a server? Like pasting it into a cloud app
still sends the text over the network. But for
maximum privacy, 100 % run locally. So when I
tried some demo in my words, what I did was I
gave a sample. I gave a sample of user ID, email,
signup date, country, churned, and phone. And
I gave it three rows. One, two, three of user
ID emails were analyst at example .com. Bob at
example .com. Charlie at example .com. And signup
dates were somewhere in the start of this year.
Churned. One of them was churned. One was not.
Two were not. And one was churned. And three
random phone numbers. And I picked analytics
safe. I set my secret. The result was email code,
phone code, user ID code. sign up date was kept
country kept churned kept and also get a report
that explains those choices in one page that's
it it's like a safe copy mode where then you
can move on to your analysis how you can start
today option a just copy one cell into the copy
one cell from the show notes paste your sample
pick a preset set your secret and then run it
You'll get a safe table and a report. Option
B, using Streamlit app for a local system. Run
the app, paste sample data, click transform,
download safe CSV plus report. Here's a pro tip.
Make privacy the default. Use the preset first.
Relax only if you truly need to. Here's a tiny
checklist you can read while working. Paste headers
plus 5 to 10 rows. Pick analytics safe. Set a
strong secret, but don't share it. Transform
into a safe table plus a report. Do analysis
on the safe table. Commit the report with your
work. So to close, today you learned the no upload
way. Hash, mask, and redact. Simple words. Simple
steps. It's solid on privacy. Your data stays
with you and you still get answers. If this helped,
share it with a teammate who handles sensitive
data. It might save them a headache and a compliance
email. A quick question for you. What privacy
move do you use most? Do you prefer hashing,
masking, redacting or not sure yet? Another question.
What's your toughest no upload challenge? I'll
reply with a simple pattern. I've also added
a little quiz for you that we can just do now.
Hey, are you excited to play a quiz? If you're
listening, why don't you just... If you're listening,
is it option A, keep? option b mask option c
redact or remove option d hash so if you paid
attention earlier in this episode you probably
know the answer and the answer is option c redact
remove you almost never need ssn for analysis
so it's safest to drop it question two why use
h mac instead of plain hash is it a is because
it's faster b because it's harder to guess C
because it's prettier or D because it's random
each time. HMAC is nothing but hashing. But like
I guess a more advanced hash. So why use HMAC
instead of plain hash? The options again are
faster. B harder to guess. C prettier or D random
each time. So if you selected harder to guess,
you are right. The reason being the secret salt
makes reversal or dictionary attacks much harder.
All right, so let's move on to question three.
You need to join two tables by email without
actually exposing their emails. What is the best
move? Is it option A, mask emails? B, hash or
HMAC, SHC, redact emails or D, keep the emails?
Again, so you need to join two tables by email
without exposing their emails. What is your best
move? Is it A. Masking emails? B. Hashing? Or
HMAC? Is it C. Redact emails? Or D. Keep emails?
Or is it D. Keep emails? So again, if you paid
attention earlier, you probably know this is
hashing is the answer. Option B. Why? Because
hashing keeps joinability without any raw values.
Question 4. You must show phone numbers in the
UI but hide most digits. Is it option A. Keep?
B, mask or keep shape? C, redact or de -hash?
So this is question four. You must show phone
numbers in UI but hide most digits. What does
this represent? That's the question. Is it option
A, is it a keep case? B, is it because it's mask
or keep shape? C, redact or de -hash? If you
selected option B, mask, you are right. why because
masking preserves human readable shape example
hyphen hyphen one two three four right question
five you're pasting five rows to test transforms
is that okay so question five is you're pasting
five rows to test transforms is that okay options
option a yes because the sample is minimal b
no because you need full data Option C, only
headers. D, upload the file. So this is the whole
purpose of this podcast, right? This particular
episode is trying to use a more secure way of
doing things. So a sample would be fine. Only
headers, yes, sure, it helps. I mean, what would
help more is a little sample. And if you can't,
at least take the sample and maybe put in some
junk values in it. It doesn't have to be... same
values either so the junk values would act like
as a proxy especially for fields like emails
ssn or whatever and the other fields we spoke
about so yeah tiny sample is enough here to verify
the rules safely right moving on to question
six which is not pii by itself at least in most
cases not pii so a email b phone d ssn but here's
the option which which is not pii by itself at
least in most cases A. Email B. Phone C. Month
bucket or D. SSN If you selected option C. Month
bucket, you are right. Why? Because month level
dates are usually non -identifying. Question
7. If two teams use different HMAC secrets, their
hashes A. Won't match B. Will match C. Become
random Or D. Decrypt each other. If two teams
use different HMAX secrets, their hashes A. Won't
match. B. Will match. Or C. Become random. Or
D. Decrypt each other. If you selected won't
match, that is right. Option A. Why different
secrets means different digest. So your policy,
question 8. Your policy says, there's more to
question 8. Your policy says mask names. A rare.
two letter your policy says mass names a rare
two letter name appears what's the risk a no
risk b re -id risk remains c legal issue only
or d just aesthetics so given the other options
sound a bit vague i would have gone with option
b where re -id risk remains why because very
short strings can still be unique Consider stricter
handling. Question 9. What is the best place
to run the paste -only app for max privacy? A.
Public cloud. B. Shared kiosk. C. Your local
machine. Or D. Your friend's laptop. So this
is something, again, that would have been easy
if you listened to the podcast. The option is
your local machine. So that's the best place
to run your paste -only app for max privacy.
Question 10. What should your logs contain? Should
it contain raw rows, B, PII excerpts, C, nothing
sensitive, or D, secrets for debugging? So I'll
go over this question one more time. What should
your logs contain? A, raw rows, B, PII excerpts,
C, nothing sensitive, or D, secrets for debugging?
If you selected nothing sensitive, you are right.
Obviously, nothing sensitive should be there
in your logs. Please will be copy pasting that
to understand. what went wrong or what went right
right so just make sure that is taken care of
so let's do another writing round of true and
false hashing with edge mac is deterministic
is it true or false answer true masking preserves
exact join keys answer false redacting reduces
breach blast radius dates are always safe to
keep false a data handling report helps audits
true what's one column Okay, here's some questions
for you to think about. In column, you always
hash and why? When is masking more useful than
hashing? What's your pace the minimum rule? And
something for more deeper prompt for you. Share
a time when privacy defaults saved you from a
mess. How do you balance need to know versus
nice to have columns? What would your team's
default policy be and why? I have some hot takes
for you. Date should always be bucketed. Agree
or disagree? hashing without h mac is reckless
redaction is underused in bi so i need to tell
you why i even came up with this whole episode
so when i was doing my research i kept on thinking
like yes i built this perfect tool you can upload
csv into this tool and it will give you like
analysis and questions to ask which is all great
But then I looked at some research online. I
looked at blogs. I looked at comments in the
blogs where people are saying like, oh, have
you even worked in real world? And then I realized,
you know what? They're right. Yes, I've worked
in real world. It's not that part. It's just
that because people are scared about using AI
tools for uploading their data because sensitive
data can be leaked. It's a very valid fear to
have, especially when you're working with AI.
You don't know what AI is tracking. So as someone
who uses AI to analyze data, I do make sure I'm
not using any sensitive data. I've used only
for non -sensitive data in the past. But like
something I knew in the back of my mind, I've
not been using it for sensitive data. But it's
something that I just wanted it to call out,
especially because... people have that fear like
how can we use it for sensitive data and that's
why i suggested these hashing techniques masking
techniques keeping or or redacting right like
ssn fields so those security aspect does become
a very important aspect security does become
very important aspect when you're dealing with
Even before AI tools. And now with AI tools,
especially, there's so much to be concerned about.
So that's why this episode is very important.
I want to challenge you on something. In the
comments section, post your default policy. Give
me a max of five lines. You know, that's helpful.
Give me three columns you always hash. And one
you will always redact. Share one logging fix
that you will ship this week. So in the show
notes, you'll also see some, you know, the prompt
challenges, the quiz, and a discussion question.
And a link to the blog which will have the app
as well. So that will help you try to do it by
yourself. Before you go, I just wanted to let
you know that I record with Riverside. I'm an
affiliate partner of Riverside. They helped me
record this episode and they have amazing audio
quality. So that's something I just wanted to
recommend if you're ever deciding to do your
own podcast. This is a great platform to record
because their editing features are amazing. Their
AI editing is, I think, next level. Helps you
remove all awkward pauses and gives your sound
a strong voice. It gives you a strong voice.
So I would highly recommend Riverside as the
reason why I chose to be an affiliate partner
because I actually use the product and I love
it. So link to join their platform. is in the
show notes. And again, I'm an affiliate partner.
So if you make any purchase, I may make a small
commission from it. I also host an rss .com.
Also, I'm an affiliate partner of RSS because
they have an amazing distribution channel. They
are able to publish your episodes from RSS into
Spotify, Apple Podcasts, Amazon Music, Audible,
Deezer. Pandora, iHeartRadio, and even lets you
publish your episode with one button into YouTube
as well. Did I forget to mention that you get,
you can start making money by hosting on rss
.com, even if you have just 10 downloads a month.
So that's all you need to make money, 10 downloads
a month. It's a new feature they started and
it's amazing. So again, link to joinrss .com
will be in the show notes. I'm also using cider
.ai to help with my research. So if you are interested
in any research for your content or for any general
you want to learn about anything, want to read
research papers or any kind of thing to improve
your knowledge, cider .ai is your platform to
use. So again, I'm an affiliate partner and I'd
love if you're able to support the show. by clicking
on my affiliate link and joining Cider. Tell
me one takeaway. I read every single one and
it helps more people find the show. That's all
for this week. Thank you for joining and I will
see you in the next episode of Data and AI with
Mukundan, where you learn AI by building.