Skip to content

cyborginc/cyborgdb-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CyborgDB Examples

Example notebooks demonstrating encrypted vector search with CyborgDB - protecting your embeddings from vector inversion attacks and data breaches.

Why Encrypt Embeddings?

Vector embeddings capture semantic meaning from your data. Recent research shows that machine learning attacks can reconstruct original text from unencrypted embeddings stored in vector databases. CyborgDB uses homomorphic encryption to protect your vectors while maintaining full search functionality.

Examples

1. Encrypted RAG Chatbot (encrypted-rag/)

A production-ready RAG chatbot with end-to-end encrypted vector search. Upload documents, ask questions, and see the difference between plaintext and encrypted vectors.

  • Supports PostgreSQL or Redis backends
  • OpenAI integration for LLM responses
  • Gradio web interface
  • Runs on Google Colab or locally

Open in Colab

2. Private Fraud Detection (private-fraud-detection/)

Fraud detection using encrypted vector similarity search on credit card transaction embeddings.

  • Uses CyborgDB with in-memory storage
  • Demonstrates similarity search on encrypted fraud patterns
  • Privacy-preserving analytics

3. Vector Inversion Attack Demos (vector-inversion/)

Side-by-side comparisons showing how vec2text attacks can recover original text from unencrypted vectors in popular databases:

  • ChromaDB vs CyborgDB - See how ChromaDB's plaintext vectors are vulnerable while CyborgDB's encrypted vectors remain secure
  • Qdrant vs CyborgDB - Same comparison with Qdrant's local file-based storage

Both notebooks demonstrate:

  • Direct SQLite database extraction
  • Vec2text inversion attacks on plaintext embeddings
  • Protection provided by CyborgDB's encryption

Getting Started

Each example is a self-contained Jupyter notebook with detailed setup instructions. Simply open the notebook and follow along!

Most examples are designed to run on Google Colab with zero setup - just click the Colab badge and run.

Learn More

License

MIT License - see LICENSE file for details.

About

Example Applications for CyborgDB: The Confidential Vector DB

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •