Member e0be4fHey everyone 😃↑ go to message
I am Ashwin, currently architecting an engine to discover and classify sensitive data patterns (covering frameworks like GDPR, CCPA, plus regional IDs like Aadhaar, PAN, etc.) across various data sources.
I’m running into a few technical design bottlenecks and would appreciate insights from anyone who has tackled this:
Local Model Selection for Data Gen: I am on an Apple M4 Mac (24 GB unified memory). I want to run a local model via Ollama/llama.cpp to generate realistic synthetic benchmark data for sensitive entities. Which model (e.g., Llama 3.x 8B, Qwen 2.5 14B/7B, Mistral Nemo) yields the most structurally consistent synthetic PII/records without hallucinating broken formats?
Scaling Data (from ~10 seed patterns to large scale): Simple few-shot prompting deteriorates fast when scaling volume - the outputs get repetitive or collapse in diversity. What pipelines or generation strategies (e.g., seed-based generative agents, token slot-filling, Faker + LLM hybrid) have you successfully used to scale up synthetic test datasets robustly?
Pluggable & Extensible Rule Engine: Rather than hardcoding logic, I want the pattern registry to be completely modular where any engineer can plug in custom regex, checksum validators (like Luhn or Verhoeff algorithms), or semantic NER layers on the fly. How are you designing your rule definitions (declarative YAML/JSON specs, pluggable Python classes, or an established framework like Microsoft Presidio)?
Hey Ashwin!
Interesting project, Here's what I'd suggest based on your requirements
Probably start with Qwen 2.5 7B. It offers a good balance between structured output and resource consumption on your M4. You can also try the 14B version if performance allows. Just make sure to add programmatic validation rather than relying entirely on the model for correct formats.
Instead of relying only on few-shot prompting, Go with a Faker + LLM approach. Faker can generate structurally valid data, while the LLM can introduce contextual variations and diversity Adding deduplication and validation checks will also help avoid repetitive or malformed records.
Have a look at Microsoft Presidio. It already has a pretty flexible recognizer architecture that supports custom regex patterns and NLP based detection you can combine declarative YAML/JSON configurations with custom python classes for other specialized rules.
I'd keep data generation, validation, and detection as separate modules
Interesting project, Here's what I'd suggest based on your requirements
Probably start with Qwen 2.5 7B. It offers a good balance between structured output and resource consumption on your M4. You can also try the 14B version if performance allows. Just make sure to add programmatic validation rather than relying entirely on the model for correct formats.
Instead of relying only on few-shot prompting, Go with a Faker + LLM approach. Faker can generate structurally valid data, while the LLM can introduce contextual variations and diversity Adding deduplication and validation checks will also help avoid repetitive or malformed records.
Have a look at Microsoft Presidio. It already has a pretty flexible recognizer architecture that supports custom regex patterns and NLP based detection you can combine declarative YAML/JSON configurations with custom python classes for other specialized rules.
I'd keep data generation, validation, and detection as separate modules