PIIGhost - Keep personal data out of your LLM prompts

by
Send a prompt to GPT, Claude or Gemini and the provider sees everything in it, including your users' personal data. piighost swaps that data for placeholders like <> before the model sees it, then restores the real values in the reply. Your tools still receive the real values. Works on text, conversations and agents, with LangChain, Pydantic AI and LlamaIndex connectors and an OpenAI-compatible proxy. MIT, open source.

Add a comment

Replies

Best
Maker
📌
Hi all. I built piighost because the moment you send a prompt to a hosted LLM (GPT, Claude, Gemini), the provider receives everything in it, including your users' personal data. piighost replaces that data with placeholders before the model sees it, and restores the real values in the reply. For example this message: "Write to John () that Patrick agreed to hire him." becomes this for the model (transparent for the user): "Write to <> (<>) that <> agreed to hire him." The same value keeps the same placeholder across a conversation, and when a tool needs the real address, piighost hands it the real value while the model still only sees the placeholder. It started as a LangChain middleware, then grew into a small pipeline you can reuse anywhere: connectors for LangChain, Pydantic AI and LlamaIndex, and a dockerized OpenAI-compatible proxy where you just change the base url. Detectors are pluggable (regex, GLiNER2, spaCy, Transformers, Presidio, LLM). Note: I use the term “anonymization,” but strictly speaking, under the GDPR, we’re actually talking about de-identification. - Repo: - Docs: - Live demo: Don't hesitate to star project, happy to answer any questions.