PaigeSafe

PaigeSafe is a document security utility that protects your confidential information when using Large Language Models (LLMs). It uses the process of tokenisation by replacing sensitive data with non-sensitive placeholders. This enables you to maintain document confidentiality and avoid data leaks when using cloud-based LLMs like ChatGPT and Claude.

Project Status

Version v0.1.0-alpha: This version should only be run on your local machine. PaigeSafe is currently in the prototyping stage to test if there is demand for this type of utility. It offers basic functionality, and the code lacks robust error checking. However, since it is intended to be run locally, there is minimal risk to your documents. All it does is offer a convenient way to search and replace text before you paste or upload sensitive text to LLMs. I use it personally to tokenise my own documents, but it needs polishing up for general use.

More useful features to follow. Please send feedback to [email protected]

Installation

PaigeSafe is built using Python and the Streamlit framework. The recommended installation method is through Docker by pulling the PaigeSafe image from Docker Hub. This will take care of setting up all the package dependencies. Alternatively, you can clone the repository on GitLab and set up an environment using Conda.

Step 1: Install Docker

Install Docker for your platform using the instructions here.

Step 2: Create Application Directory

  1. Create a new folder on your computer called paigesafe
  2. Inside this folder, create another folder called data

Step 3: Download Configuration

Save the docker-compose.yml configuration file in your paigesafe folder. This will define the services that make up the PaigeSafe application stack and has the following settings.


    version: '3.8'
    services:
        paigesafeapp:
        image: myaccount/myapp:v0.1.0
        ports:
            - "8501:8501"
        volumes:
            - ./data:/app/data
        restart: unless-stopped
        deploy:
            resources:
            limits:
                cpus: '1.0'
                memory: 512M
            reservations:
                cpus: '0.25'
                memory: 128M
        environment:
            - PYTHONPATH=/app
        healthcheck:
            test: ["CMD", "curl", "-f", "http://localhost:8501/_stcore/health"]
            interval: 30s
            timeout: 3s
            retries: 3
        

The configuration sets the following resource limits:

  • Maximum CPU usage: 1 core
  • Maximum memory usage: 512MB
  • Minimum guaranteed CPU: 0.25 cores
  • Minimum guaranteed memory: 128MB

It's unlikely you'll need to adjust these but you can tweak or remove them as needed.

Step 4: Start the Application

  1. Open Terminal (Mac/Linux) or Command Prompt (Windows)
  2. Navigate to your paigesafe folder:
    cd path/to/paigesafe
  3. Start the application:
    docker compose up

Starting the application for the fist time with docker compose up will download the image from Docker Hub, build it for your platform, then run the container. Currently supported are:

  • AMD64: (or x86-64) for Linux, Windows and older Mac Intel PCs.
  • ARM64: for Apple M-Series Processors.

Using PaigeSafe

  1. Open your web browser
  2. Go to: http://localhost:8501
  3. Go to the Token management page and add some tokens.
  4. Go to the PaigeSafe page and paste your sensitive text in the Original Document text area.
  5. Click Tokenize
  6. The Tokenized Result text can be copied to the clipboard and pasted into an LLM chat window or text file.

To Stop PaigeSafe

  1. Press CTRL+C in the Terminal/Command Prompt
  2. Or run:
    docker compose down

Troubleshooting

Common Issues

  1. Docker Desktop not starting
    • Ensure virtualization is enabled in BIOS (Windows)
    • Verify system requirements are met
    • Check Docker Desktop logs
  2. Application not starting
    • Verify Docker Desktop is running
    • Check if port 8501 is already in use
    • Ensure docker-compose.yml is in the correct directory
  3. Cannot connect to application
    • Wait 30 seconds after starting for full initialization
    • Verify http://localhost:8501 in browser
    • Check container logs: docker compose logs
  4. Mounts denied error
    • If you are using Docker Desktop and encounter a Mounts denied error, please ensure that the data directory is shared with the Docker container via Settings ➡️ Resources ➡️ File Sharing.
  5. Performance issues
    • Close resource-intensive applications
    • Verify available system resources
    • Check container resource usage: docker stats

Updates and Maintenance

To update the application:


docker compose down
docker compose pull
docker compose up

Data Management

  • Application data is stored in the ./data directory
  • Backup this directory regularly
  • Container restarts will not affect stored data

About

This project is currently in the prototyping stage. For more information, please use the contact form at Another Cup of Coffee or subscribe to the mailing list below. You will be notified when it is ready for public release.

License

PaigeSafe is released under the MIT License.

Sign up

* indicates required
Product release

Please select all the ways you would like to hear from pAIgeSafe:

You can unsubscribe at any time by clicking the link in the footer of our emails. For information about our privacy practices, please visit our website.

We use Mailchimp as our marketing platform. By clicking below to subscribe, you acknowledge that your information will be transferred to Mailchimp for processing. Learn more about Mailchimp's privacy practices.

Intuit Mailchimp