Inspiration

While large language models (LLMs) significantly boost productivity in quantitative research, algorithm development, and academic work, submitting raw prompts poses severe intellectual property (IP), financial strategy, and privacy leakage risks. When researchers or developers query commercial models, proprietary formulations, alpha signals, and confidential constraints are directly exposed to third-party logs and model training pipelines. We built this project to create a zero-trust, local-first intelligent gateway that allows users to leverage frontier models without compromising their core proprietary ideas.

What it does

PrivaShield acts as a local proxy security layer between users and cloud LLM APIs:

  • Semantic & Entity Masking: Parses proprietary domain logic, trading strategies, mathematical hypotheses, and PII, mapping them into generalized, isomorphic representations locally.
  • Adversarial Stress Testing (The Art of the Break): Employs a dedicated evaluator agent that attempts to reverse-engineer the original hypothesis strictly from the sanitized prompt, generating a dynamic leakage risk score.
  • Local Reconstruction Engine: Automatically maps external computational results, proofs, or code back to the user's original confidential variables and business logic without any plaintext ever leaving the machine.

How we built it

  • Frontend / Dashboard: Built with Streamlit for clean real-time workflow visualization, interactive parameter tuning, and risk analysis metrics.
  • Agent Architecture & Defense: Developed in Python using multi-agent deliberation, regex/NER parsing for sensitive boundary isolation, and prompt guardrails.
  • Model Integration: Connected via external LLM APIs (Gemini / OpenAI) for reasoning and adversarial stress-testing.

Challenges we ran into

  • Ensuring semantic validity: Stripping proprietary context while retaining enough abstract mathematical/computational structure so external models can still provide accurate answers.
  • Calibration of the leakage stress test: Formulating adversarial inversion prompts that reliably detect potential data recovery risks without false alarms.

Accomplishments that we're proud of

  • Designing and delivering a fully functional end-to-end MVP within an extremely constrained timeframe.
  • Implementing an adversarial stress-test agent that quantifies prompt leakage risks before any network request is dispatched.

What we learned

  • How to structure homomorphic prompt obfuscation pipelines in real-time developer workflows.
  • The balance between prompt entropy, context retention, and privacy boundaries when integrating external LLMs into enterprise and research environments.

What's next for PrivaShield

  • Supporting custom enterprise ontologies and local embedding-based entity masking.
  • Integrating homomorphic encryption techniques for continuous mathematical computation.
  • Developing browser and IDE extensions (VS Code / Cursor) for seamless background redaction.

Built With

Share this project:

Updates

Submission history