Определение пола по имени с помощью ИИ

Определение пола по имени с помощью ИИ

AIs can do a lot - including useful things that, for example, improve quality in a CRM.

We at Launix once had a customer request that screamed 'AI': The customer had a database with over 31,000 addresses and wanted to address them with the correct gender (Dear Mr. ..., Dear Ms. ...) when contacting them.

So we fired up our local AI models, specifically llama3.2, and executed the following prompt:

Du bekommst eine Liste von Namen. Ordne diese einem Geschlecht zu:
Max
Laura
Petra
Oleg
Anchmaa

Then we triggered the following request via the local OLLAMA API:

curl http://127.0.0.1:11434/api/generate -d '{
  "model": "llama3.2",
  "prompt": "Du bekommst eine Liste von Namen. Ordne diese einem Geschlecht zu:\nMax\nLaura\nPetra\nOleg\nAnchmaa",
  "stream": false,
  "format": {
    "type": "object",
    "properties": {
            "people": {
                    "type": "array",
                    "items": {
                            "type": "object",
                            "properties": {
                                    "name": {
                                            "type": "string"
                                    },
                                    "isMale": {
                                            "type": "boolean",
                                            "required": true
                                    }
                            }
                    }
            }
    }
  }
}'|jq .response

Then the AI gave us the following response:

{
"people": [
    {
        "name": "Max",
        "isMale": true,
        "isFemale": false
}, {
    "name": "Laura",
    "isMale": false,
    "isFemale": true
} ,
{
    "name": "Petra",
    "isMale": false,
    "isFemale": true
} ,
{
    "name": "Oleg",
    "isMale": true
},
 {
   "name": "Anchmaa",
   "isMale": false,
   "isFemale": true
} ]
}

To be honest, the AI still needs some polishing regarding formatting - but the data is perfectly machine-readable and also correct in content. We just had to clean up the slightly "shaky" output (sometimes isFemale is not set) and we had our batch-capable name-gender assignment AI.

The AI model used has a size of 2 GiB - some think it's overkill, but that's the way of the world today.

Ultimately, we packed the AI model into a microservice that also caches already recognized names and integrated the microservice call into our CRM. From now on, all customers can be addressed with the correct gender.

During the run through all 30,000 names, we had an error rate of about 1%. The biggest problem was that names were mistakenly marked as female. We had no errors with the names marked as male.

Do you also want a CRM that performs tasks such as data extraction from the imprint, assigning genders, or summarizing notes via AI? Feel free to contact us!

Категории