Which LLM is more accurate for data cleaning scraped names

SteadyWins

Newbie
Joined
Jan 3, 2025
Messages
43
Reaction score
31
Hey BHW,

As per the thread title, we recently just scraped about 10k emails from IG accounts (and will be scaling this up) but noticed the names are not 100% accurate.

This is because some users put different words in their "First Name" section, which we'd scrape.

90% of the time their real name is either in the bio or somewhere on their page which appears in one of the columns of data scraped.

Is there a LLM that can accurately review and make fixes where needed without (or little) hallucinations?

Cheers
SW
 
You might want to try data-cleaning-specific tools like Scrapy and a custom LLM to process data. More control over the cleaning.
 
You might want to try data-cleaning-specific tools like Scrapy and a custom LLM to process data. More control over the cleaning.
Thanks for the recommendation - it may be a little too technical for me.
I ended up creating a script + using openai api, probably not the most economical way but it seems to be doing the job fine (aside from the api closing the loop every ~30 minutes or so requiring me to re-run the script).
 
Definitely not the most economical to use an LLM. Deepseek has been good though
 
For data cleaning of scraped names, OpenAI's GPT-4 is one of the most accurate LLMs. It excels at understanding context, identifying and correcting errors, and standardizing names across large datasets. GPT-4 can help clean inconsistencies, fix typos, and ensure proper formatting with minimal manual intervention. For more specialized tasks, models like spaCy or BERT can also be effective, depending on the complexity of the data.
 
For accuracy, I would suggest GPT4 or Claude by Anthropic. They both handle structured data well and can be fine-tuned (or prompted carefully) to reduce errors. If you need something more specialized, Google’s Gemini might also work since it's optimized for factual consistency.
One way to approach this is to set up a pipeline where an LLM cross-checks the scraped name with the bio and other available data. You could have it compare patterns and make suggestions rather than automatically rewriting names to avoid hallucinations.

If you're working at scale, fine-tuning an open-source model like https://ai.meta.com/llama/ or https://mistral.ai/ on verified name-bio datasets could give you more control over accuracy. Another option is using NER (Named Entity Recognition) with tools like spaCy or Hugging Face’s Transformers to extract real names from bios more systematically. And if hallucinations are a major concern, I’d suggest running a few test prompts and setting up a validation step, maybe comparing the LLM’s output with another automated rule-based system to catch inconsistencies. Good luck.
 
For cleaning scraped names from IG profiles, GPT-4-turbo (OpenAI) or Claude 3 Opus (Anthropic) are the most accurate LLMs with minimal hallucinations.

Best approach:

  1. Pre-filter names using regex rules (remove emojis/symbols).
  2. Use few-shot prompting with examples of clean vs. messy names.
  3. Add context (e.g., "Extract the most likely real name from this IG bio: [text]").
  4. Set temperature=0 to reduce creativity.
Alternative: Fine-tune Mistral 7B on clean/dirty name pairs for cost-effective scaling.

Caution: No LLM is perfect—always validate outputs with a sample. For bulk processing, combine LLMs with rule-based checks.
 
Back
Top