RAG & Knowledge Base Protection

    Keep PII out of your RAG pipeline
    before it's indexed, and before it's retrieved

    Privaro Ingest protects documents before they enter your vector store. Privaro Retrieval Guard protects retrieved chunks before they reach your LLM's context — even for knowledge bases indexed before you added Privaro.

    Two layers, one pipeline

    Ingestion-time protection and retrieval-time protection cover different failure modes — most teams need both.

    Protect before indexing

    Send raw text or upload a file directly — PDF, Word, Excel, CSV or email. Privaro extracts the text, detects PII, and returns a tokenized version ready to embed.

    Protect at retrieval time

    Scan chunks returned by your vector store search before they're stuffed into an LLM prompt — a second layer of defense that catches PII even in knowledge bases indexed without protection.

    Per-chunk access control

    Restrict specific chunks to specific roles. A chunk tagged for finance never reaches a support agent's context, regardless of what the vector search returns.

    Content-hash caching

    The same chunk retrieved repeatedly is only scanned once. Cached by content, not by your own chunk ID — re-indexed content still benefits.

    Ingest a document — text or file

    Paste text directly, or upload a file up to 20MB. Documents over roughly 20,000 characters are processed asynchronously — poll the job endpoint for the result.

    POST https://api.privaro.ai/v1/proxy/protect-document
    X-Privaro-Key: YOUR_API_KEY
    Content-Type: application/json
    
    {
      "pipeline_id": "YOUR_PIPELINE_ID",
      "document": "Full document text — up to 2,000,000 characters",
      "options": { "mode": "tokenise", "chunk_size": 512 }
    }
    
    // Response (documents under ~20,000 characters — synchronous)
    {
      "status": "completed",
      "protected_document": "...",
      "chunks": [
        { "index": 0, "text": "...", "char_start": 0, "char_end": 511 }
      ],
      "detections": [ ... ],
      "stats": { "total_detected": 12, "chunk_count": 8, "processing_ms": 340 }
    }

    Accepted formats

    Upload documents directly, or send extracted text yourself — whichever fits your pipeline.

    PDF
    DOCX
    XLSX
    CSV
    EML
    Plain text
    POST https://api.privaro.ai/v1/proxy/protect-document/upload
    X-Privaro-Key: YOUR_API_KEY
    Content-Type: multipart/form-data
    
    file: report.pdf
    pipeline_id: YOUR_PIPELINE_ID
    mode: tokenise
    
    // Same response shape as the text endpoint above —
    // PDF, DOCX, XLSX, CSV and EML are extracted server-side.

    Guard what reaches the model at query time

    Send a batch of retrieved chunks along with the requester's role. Chunks that fail access control or PII detection never make it into your prompt.

    POST https://api.privaro.ai/v1/proxy/protect-retrieval
    X-Privaro-Key: YOUR_API_KEY
    Content-Type: application/json
    
    {
      "pipeline_id": "YOUR_PIPELINE_ID",
      "chunks": [
        { "id": "chunk_123", "text": "...", "allowed_roles": ["finance"] },
        { "id": "chunk_456", "text": "..." }
      ],
      "requester": { "role": "support-agent" }
    }
    
    // Response
    {
      "allowed_chunks": [
        { "id": "chunk_456", "protected_text": "...", "from_cache": false }
      ],
      "blocked_chunks": [
        { "id": "chunk_123", "reason": "access_denied" }
      ],
      "stats": { "chunks_allowed": 1, "chunks_blocked": 1, "cache_hits": 0 }
    }

    Works with the RAG stack you already have

    LangChain
    CrewAI
    OpenAI Agents SDK
    n8n
    Python SDK
    JS / TS SDK

    Privaro doesn't index, embed or search anything — it protects the text going in and coming out of whichever vector store you already run.

    Built for regulated knowledge bases

    Fails closed, not open — a detection error blocks that one chunk instead of leaking it
    Reversible tokenization with a per-organization audit trail
    Blockchain-backed evidence per protection event

    Frequently asked questions

    See it work on your own documents

    Bring a real document from your knowledge base — we'll show you exactly what Privaro catches.

    Request Demo