Appearance
Your First Protected Chat
Learn how GhostAI protects sensitive data through a hands-on tutorial.
What You'll Learn
- How PII detection works in real-time
- Understanding tokenization and detokenization
- Reading the audit log
- Adjusting detection sensitivity
Prerequisites
- GhostAI running locally (Quick Start)
- A web browser
Step 1: Open the Application
- Navigate to https://localhost:5173
- Accept the self-signed certificate warning
- You should see the GhostAI chat interface
Step 2: Send a Message with PII
Type the following message (or similar):
Hi, my name is Sarah Johnson and I need help understanding my
medical benefits. My SSN is 987-65-4321 and my email is
sarah.johnson@email.com. My phone number is (555) 123-4567.What Happens
Detection: GhostAI scans your message and detects:
PERSON: "Sarah Johnson"US_SSN: "987-65-4321"EMAIL_ADDRESS: "sarah.johnson@email.com"PHONE_NUMBER: "(555) 123-4567"
Highlighting: Detected entities are highlighted in the input:
- Yellow background for detected PII
- Hover to see entity type and confidence
Tokenization: Before sending to the AI, GhostAI replaces:
Sarah Johnson → [PERSON_a1b2c3] 987-65-4321 → [US_SSN_d4e5f6] sarah.johnson@email.com → [EMAIL_g7h8i9] (555) 123-4567 → [PHONE_j0k1l2]AI Response: The AI sees only tokens, not real data
Detokenization: GhostAI restores original values in the response
Step 3: View the Audit Log
Click the shield icon in the sidebar to see:
Protection Summary
| Metric | Value |
|---|---|
| PII Items Protected | 4 |
| Entity Types | PERSON, US_SSN, EMAIL_ADDRESS, PHONE_NUMBER |
| Session ID | abc123... |
Detailed Log
| Timestamp | Entity Type | Token | Confidence |
|---|---|---|---|
| 10:30:15 | PERSON | [PERSON_a1b2c3] | 0.95 |
| 10:30:15 | US_SSN | [US_SSN_d4e5f6] | 0.99 |
| 10:30:15 | EMAIL_ADDRESS | [EMAIL_g7h8i9] | 0.98 |
| 10:30:15 | PHONE_NUMBER | [PHONE_j0k1l2] | 0.92 |
Step 4: Try Prompt Enhancement
Before sending your next message, try the magic wand:
- Type a short, rough prompt like:
explain common security vulnerabilities - Click the sparkle icon (✨) next to the send button, or press
Cmd/Ctrl + Shift + E - Watch your prompt transform into a detailed, well-structured query
- If you prefer your original, click Undo within 8 seconds
Tip: The enhancement adapts to your industry. If your organization is configured for healthcare, legal, or finance, the enhanced prompt will include relevant terminology and compliance context automatically.
Step 5: Test Code Protection
Try sending a message with code:
Here's my API configuration:
const config = {
apiKey: 'sk-1234567890abcdef',
dbPassword: 'SuperSecret123!',
awsAccessKey: 'AKIAIOSFODNN7EXAMPLE'
};Code Protection Dialog
GhostAI will show a dialog asking you to choose:
- Warn: Show warning but allow sending
- Block: Prevent sending entirely
- Redact: Automatically tokenize code and secrets
Detected Secrets
| Type | Value | Action |
|---|---|---|
| API_KEY | sk-1234... | Redacted |
| PASSWORD | SuperSecret... | Redacted |
| AWS_KEY | AKIAIOSF... | Redacted |
Step 5: Test File Upload
Upload a document with sensitive data:
- Click the paperclip icon in the chat input
- Select a PDF, Word document, or image
- GhostAI scans the file before processing
Supported File Types
- Documents: PDF, DOCX, XLSX, PPTX
- Images: JPG, PNG (with OCR)
- Archives: ZIP, 7z (recursive scanning)
- Medical: DICOM, HL7
Step 6: Adjust Sensitivity
If you're seeing too many false positives:
- Click Settings (gear icon)
- Go to Detection Settings
- Adjust the Confidence Threshold:
- Lower (0.3-0.5): More sensitive, more false positives
- Higher (0.7-0.9): Less sensitive, may miss some PII
Per-Entity Thresholds
Fine-tune specific entity types:
| Entity | Default | Recommended for Healthcare |
|---|---|---|
| US_SSN | 0.5 | 0.3 (more sensitive) |
| PERSON | 0.5 | 0.7 (reduce false positives) |
| DATE_TIME | 0.5 | 0.4 (important for PHI) |
Step 7: Export Audit Report
Generate a compliance report:
- Click Analytics in the sidebar
- Click Export Report
- Choose format: PDF, CSV, or JSON
- Select date range and filters
Report Contents
- Total PII items protected
- Breakdown by entity type
- Detection confidence distribution
- Compliance certification statement
Common Scenarios
Healthcare Use Case
Patient John Doe (DOB: 01/15/1980) presented with chest pain.
His insurance ID is BC12345678. Contact his wife Jane at
(555) 987-6543 to discuss discharge planning.Detected PHI:
- Patient name (PERSON)
- Date of birth (DATE_TIME)
- Insurance ID (MEDICAL_LICENSE)
- Family member name (PERSON)
- Phone number (PHONE_NUMBER)
Financial Use Case
Please process refund for customer Mike Wilson.
Card ending in 4242, CVV 123.
Account routing: 021000021, Account: 123456789Detected PCI Data:
- Customer name (PERSON)
- Credit card (partial) (CREDIT_CARD)
- CVV (CREDIT_CARD_CVV)
- Routing number (US_BANK_NUMBER)
- Account number (US_BANK_NUMBER)
Step 6: Document Preview
Upload a document (PDF, Word, Excel, or PowerPoint) to see the visual preview system in action.
Upload a Document
- Click the paperclip icon in the chat input
- Select a PDF or Word document
- The file is automatically scanned for PII
Preview the Document
- Click the uploaded file in the chat to open the preview modal
- You'll see the redacted view by default — PII is replaced or blurred
- Tabs let you switch between the visual Document view and extracted Text
Toggle Original View (Admin)
If you have admin or owner permissions:
- Click the "Show Original" toggle at the top of the preview
- The original, unredacted document is displayed with a red "ORIGINAL — Contains PII" warning
- Switch back to the protected view at any time
Download Redacted Copy
- Click the download button in the preview modal
- Select "Download Redacted" for a safe-to-share copy
- Select "Download Certificate" for a redaction compliance record
Try Different File Types
| Upload This | What You'll See |
|---|---|
| A PDF with names/SSNs | PDF viewer with PII blacked out |
| A photo of an ID card | Blurred image with PII covered |
| An Excel spreadsheet | Formatted table with PII redacted |
| A PowerPoint deck | Slides rendered as PDF with redaction |
Troubleshooting
"No PII Detected" When Expected
- Check the confidence threshold isn't too high
- Verify the entity type is enabled
- Try the exact format (e.g., XXX-XX-XXXX for SSN)
Too Many False Positives
- Increase confidence threshold
- Adjust per-entity thresholds
- Use feedback to train the system:
- Click on a detection
- Mark as "Not PII"
- System learns over time
Slow Detection
- First request loads ML models (expected)
- Check memory availability (4GB recommended)
- Reduce number of enabled detectors
Step 8: Explore AI Chat Features
GhostAI includes a full-featured AI chat experience on par with ChatGPT and Claude:
Web Search
Ask GhostAI to search the web — queries are automatically PII-sanitized before searching.
Image Generation
Generate images with multiple models (DALL-E 3, Gemini Flash Image, Flux, Stable Diffusion, and more) — prompts are privacy-protected before being sent. Choose your preferred model from the image model selector in the toolbar; your choice is saved across sessions. See Image Generation for all supported models.
Rich Content
- LaTeX math — equations render with KaTeX
- Mermaid diagrams — flowcharts and sequence diagrams render inline
- Code blocks — syntax-highlighted with copy and download buttons
Personalization
- Custom Instructions — Click the ⋮ More menu in the header, then select Custom Instructions to set your preferences. Instructions persist across all sessions. Combine quick presets (Concise, Detailed, Technical, Simple) by clicking multiple options
- Prompt Library — Click the ⋮ More menu in the header, then select Prompt Library to browse and save prompt templates
- Light/Dark Mode — Click the ⋮ More menu in the header, then select Light/Dark Mode
- Incognito Mode — In comparison view, use the incognito toggle in the header overflow menu
Productivity
- Regenerate — Click the refresh icon on any AI response to regenerate it
- Keyboard shortcuts —
Ctrl+N/Cmd+Nfor new chat - Conversation search — Filter conversations in the sidebar
- Smart titles — Conversations are automatically named by AI
Model Comparison
Compare 2-4 AI models side-by-side:
- Click Compare in the sidebar (or hover a starter prompt and click the comparison icon)
- Select your models and type a prompt — all models stream in real-time
- Use attachments, web search, and image generation — just like normal chat
- Choose tool mode: Per Model (each model calls tools independently) or Shared (tools run once, results shared)
- Toggle incognito to prevent saving the comparison
- Vote as Winner and Continue as Chat to promote the best response
- Export the comparison as Markdown with
Ctrl+Shift+E
Combined Mode (Labs)
Get one clean answer from multiple models using a 3-stage deliberation pipeline — without switching to comparison view:
- Toggle Combined Mode in the input area (near the send button)
- Select 2-4 models and type your prompt
- GhostAI runs Initial → Deliberation → Blend behind the scenes
- You receive a single, seamless answer that incorporates the best of all models
Next Steps
- AI Chat Features — Web search, image gen, custom instructions
- PII Detection Deep Dive — All 64+ entity types
- Document Preview — Rich visual preview system
- Image Intelligence — Image content detection
- Configure Your Vertical — Industry-specific settings
- API Integration — Programmatic access