Demo video: https://youtu.be/SUFiF110KkE

Repository: https://github.com/domingosl/email-validator

0xAI (Zero AI) its a script that makes deep email validation by using industry-standard methods (format, disposable records, MX records check, SMTP check, and others) and improves upon it by augmenting the results with AI insights, making useful use of AI in a way that actually generates value for the end user.

Let's take a look at this example:

node index.js -e [email protected] 
{
  email: '[email protected]',
  validFormat: true,
  isDisposable: false,
  mxFound: true,
  smtpCheck: { error: false, status: true },
  domainAge: null,
  ai: null,
  isValid: true
}

This is a regular output of an email validation script without AI, now let's run that again this time with AI:

node index.js -e [email protected] --useAI

{
  email: '[email protected]',
  validFormat: true,
  isDisposable: false,
  mxFound: true,
  smtpCheck: { error: false, status: true },
  domainAge: null,
  ai: {
    username: "The username 'ing.domingo.sl' looks like a combination of the profession 'ing' that can refer to 'engineer' and the name of a person, which increases the likelihood of being a real email address",
    domain_name: "The domain name 'gmail.com' is a widely used email service provider and it seems legitimate, which indicates that the email may not be fake",
    conclusion: "Considering the combination of a professional term with a personal name in the username and the use of a legitimate email service provider, the email address '[email protected]' is likely a real email address",
    confidence: 90
  },
  isValid: true
}

My mother tongue is Spanish, and my email contains 3 letters at the beginning; ing, which is the abbreviation for "ingeniero" meaning engineer, now even if the whole context of this application is English, the AI is smart enough to understand the meaning of it and it increases its confidence on the email being valid.

Let's take a look with a more challenging email, again first with no AI:

node index.js -e [email protected] 

{
  email: '[email protected]',
  validFormat: true,
  isDisposable: false,
  mxFound: true,
  smtpCheck: { error: false, status: true },
  domainAge: null,
  ai: null,
  isValid: true
}

This is a temporary email created at temp-email.org, the format is valid of course, but it is not flagging the email as disposable even tho I know it is, and I'm using a database of disposable domains that has more than 120K domains in it. Well as you know these disposable email companies buy a lot of domains quite often, so it is a race between the database maintainers and the disposable email companies, and in this case, I lost the race, and since the MX record is found, and was even able the check the existence of the email in the SMTP server, the script had no choice but to flag the email a valid, and well technically it is, but let's be honest, for a consumer of an email validation service, this email its crap, and should be flag as fake.

Now, look what happens if we check the email again, this time using the AI engine:

node index.js -e [email protected] --useAI

{
  email: '[email protected]',
  validFormat: true,
  isDisposable: false,
  mxFound: true,
  smtpCheck: { error: false, status: true },
  domainAge: null,
  ai: {
    username: "The username 'mepoj68595' seems randomly generated and therefore less likely to be real.",
    domain_name: "The domain name 'andorem.com' is not widely known, which increases the likelihood of the email being fake.",
    conclusion: 'Based on the username and domain name, the email address seems highly likely to be fake.',
    confidence: 20
  },
  isValid: false
}

Altho the classic email checks pass, the AI is smart enough to flag the email as fake, resulting in a complete change in the results. And this is why I believe this application proposes a valid use case for AI in email validation.

I see a big potential already even if I'm just using a general model, the gpt-3.5-turbo that is not trained on email validation, it's just a general language model, imagine how this could be improved by training the AI using data from Zero bounce and improving the prompt.    Please check the repository on GitHub for instructions on how to run the script. You will need an OpenAI API token. I cannot publish mine since it is connected to my credit card, but if the judges want I can send you one privately, just please don't abuse it, or at least make me win one of the prizes so I can buy back my soul from VISA :)

For batch validation please use: (it cost around 0.5 EUR to handle 1000 emails)

node index.js -i test/data.csv --useAI

Developer?

If you want to dig deeper into the technologies and logic used, please start your journey at https://github.com/domingosl/email-validator/blob/main/lib/validate.js

Built With

Share this project:

Updates