Posts

Showing posts from October, 2024

hey GenAI, who buy what for Christmas

Image
Generated by DALL.E 3 What if we ask GenerativeAI to generate a set of user profiles. We generate these . That's  male/female resides in one of these states, California, Oregon and Washington annual household income of 70K, 100K, 150K. With these different profiles, we ask GenerativeAI if they would purchase a list of electronics for Christmas. Results are posted here . For example. all will likely to purchase a "Bose Bluetooth Headphones" gender state annual_income_k decision 0 female California 70 1.0 1 male California 70 1.0 2 female California 100 1.0 3 male California 100 1.0 4 female California 150 1.0 5 male California 150 1.0 6 female Oregon 70 1.0 7 male Oregon 70 1.0 8 female Oregon 100 1.0 9 male Oregon 100

Azure AI Content Safety Service

Image
  https://www.pexels.com/photo/grayscale-photo-of-barbed-wire-274886/ We looked at  Azure AI Content Safety Service  to see what the services that are offered. It is good that we have a set of services to detect harmful content that may be sent or generated by Generative AI.  Some of the services have Python client and some (new ones) do not. Hence, we create a Python library for all of them. (see github ). This library offers asynchronized function calls so we can make concurrent requests. We tested that HTTP overheads and it is extremely fast. There is also a terraform script in  github , so you can deploy the Azure Content Safety Service under a resource group easily for testing. All the instructions are in the README.md. We also added simple unit tests.

PII Anonymizer

Image
  I was playing around with  Presidio Anonymizer . Quote The Presidio anonymizer is a Python based module for anonymizing detected PII text entities with desired values. Presidio anonymizer supports both anonymization and deanonymization by applying different operators. Operators are built-in text manipulation classes which can be easily extended. I am particular interested in creating operators for it. As a result, I have created a python library. pii_anonymizer . For sample, I have a text Her name is Mary Ann. My name is James Bond. My phone number is 212-555-5555. My credit card is 5548364515335857. Again my name is James Bond and number is 212-555-5555. and I want to anonymize it to Her name is Monique Hamilton. My name is Jesse Townsend. My phone number is <phone_number_1>. My credit card is XXXXXXXXXXXXXXXX. Again my name is Jesse Townsend and number is <phone_number_1>. The names are replaced. When "James Bond" appeared twice, we replaced with the same name