ZenSearch AI Documentation

Welcome to the ZenSearch AI documentation. This comprehensive guide will help you integrate and use our semantic search and RAG platform effectively.

Platform Overview

ZenSearch AI is an enterprise-grade semantic search and knowledge management platform that combines advanced AI capabilities with intuitive content management tools. Our platform enables organizations to:

  • Intelligent Search: Find relevant information using natural language queries
  • Content Management: Automated ingestion and processing from multiple sources
  • Quality Assurance: Built-in evaluation framework for content quality
  • Team Collaboration: Multi-tenant architecture with role-based access
  • Enterprise Security: SOC 2 compliant with enterprise-grade security

Architecture

Our platform consists of three main components:

1. Content Hub

Centralized content management system for ingesting, processing, and managing your knowledge base content.

2. Semantic Search Engine

Advanced AI-powered search using hybrid semantic and keyword matching with RAG capabilities.

3. Analytics & Quality Evaluation

Comprehensive analytics and automated quality evaluation to ensure optimal performance.

Quick Start Guide

Get started with ZenSearch AI in just a few steps:

Step 1: Create Your Account

Sign up for a free trial account and create your first team workspace.

Step 2: Configure Authentication

Obtain your API credentials from the dashboard:

API_KEY: your-api-key-here
CLIENT_ID: your-client-id-here
BASE_URL: https://api.zensearch.zenous.ai

Step 3: Ingest Your First Content

Upload or connect your content sources through the Content Hub interface or API.

Step 4: Start Searching

Use our search API to find information in your knowledge base:

curl -X POST https://api.zensearch.zenous.ai/v1/search \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "query": "How do we handle customer data privacy?", "client_id": "your-client-id", "max_results": 5 }'

Authentication

ZenSearch AI uses JWT-based authentication with API keys for secure access to all endpoints.

API Key Authentication

Include your API key in the Authorization header of all requests:

Authorization: Bearer YOUR_API_KEY

Obtaining API Keys

  1. Log in to your ZenSearch AI dashboard
  2. Navigate to Settings → API Keys
  3. Click "Generate New Key"
  4. Copy and securely store your API key

Security Warning

Never expose your API keys in client-side code or public repositories. Always use environment variables or secure configuration management.

Search API

The Search API provides powerful semantic search capabilities across your knowledge base.

POST/v1/search

Perform semantic search across your content with advanced filtering and ranking.

Request Parameters

{ "query": "string", // Search query (required) "client_id": "string", // Client identifier (required) "max_results": 10, // Maximum results to return (optional) "filters": { // Content filters (optional) "source": ["website", "docs"], "date_range": { "start": "2024-01-01", "end": "2024-12-31" } }, "search_config": { // Search configuration (optional) "use_semantic": true, "use_keyword": true, "boost_recent": false } }

Response Format

{ "query": "How do we handle customer data privacy?", "total_results": 25, "results": [ { "id": "doc_123", "title": "Data Privacy Policy", "content": "Our comprehensive data privacy framework...", "source": "policies/data-privacy.pdf", "relevance_score": 0.95, "metadata": { "author": "Legal Team", "last_updated": "2024-01-15" } } ], "request_id": "req_456", "processing_time_ms": 245 }

RAG API

The RAG (Retrieval-Augmented Generation) API provides AI-generated answers based on your content.

POST/v1/rag

Generate contextual answers using retrieved content from your knowledge base.

Request Parameters

{ "query": "What is our refund policy?", "client_id": "your-client-id", "context": { "user_role": "customer_support", "product": "enterprise" }, "response_style": "professional", // professional, casual, technical "include_sources": true, "max_tokens": 500 }

Response Format

{ "answer": "Based on our policies, here's our refund policy...", "sources": [ { "title": "Refund Policy Documentation", "url": "https://...", "relevance": 0.98 } ], "confidence": 0.92, "request_id": "rag_789", "processing_time_ms": 1240 }

Content Management API

Manage your knowledge base content programmatically through our Content Management API.

Upload Content

POST/v1/content/upload

Upload new content to your knowledge base.

curl -X POST https://api.zensearch.zenous.ai/v1/content/upload \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: multipart/form-data" \ -F "file=@document.pdf" \ -F "metadata={\"title\":\"Policy Document\",\"category\":\"policies\"}"

List Content

GET/v1/content

Retrieve a list of content in your knowledge base.

Update Content

PUT/v1/content/{content_id}

Update existing content metadata or replace content.

Delete Content

DELETE/v1/content/{content_id}

Remove content from your knowledge base.

Privacy & Data Protection

ZenSearch AI includes advanced privacy protection features to automatically detect and protect sensitive information.

PII/PHI Detection

POST/v1/privacy/detect

Analyze content for personally identifiable information (PII) and protected health information (PHI).

{ "content": "Patient John Doe (SSN: 123-45-6789) was treated...", "detection_types": ["pii", "phi", "financial"], "action": "redact", // "detect", "redact", "encrypt" "preserve_format": true }

Response Format

{ "detections": [ { "type": "pii_name", "text": "John Doe", "start": 8, "end": 16, "confidence": 0.98 }, { "type": "pii_ssn", "text": "123-45-6789", "start": 23, "end": 34, "confidence": 0.99 } ], "protected_content": "Patient [REDACTED] (SSN: [REDACTED]) was treated...", "compliance_status": "hipaa_compliant" }

Supported Detection Types

  • PII Detection: Names, SSNs, addresses, phone numbers, email addresses
  • PHI Detection: Medical record numbers, patient IDs, health plan numbers
  • Financial Data: Credit card numbers, bank account numbers, tax IDs
  • Custom Patterns: Organization-specific sensitive data patterns

Compliance Note

All PII/PHI detection is performed in real-time during content ingestion. Detected sensitive information is automatically protected according to your organization's compliance requirements.

Best Practices

Content Optimization

  • Structure your content: Use clear headings, bullet points, and logical organization
  • Include metadata: Add relevant tags, categories, and descriptions
  • Keep content current: Regularly update and remove outdated information
  • Use consistent terminology: Maintain a consistent vocabulary across documents

Privacy & Compliance

  • Enable PII/PHI detection: Always enable automatic detection for regulated content
  • Review detection results: Regularly audit detected sensitive information
  • Configure custom patterns: Add organization-specific sensitive data patterns
  • Monitor compliance status: Use compliance dashboards to track protection status

Search Query Optimization

  • Use natural language: Write queries as you would ask a human expert
  • Be specific: Include relevant context and details in your queries
  • Use filters: Narrow down results with source, date, or category filters
  • Iterate and refine: Adjust queries based on initial results

Security Best Practices

  • Rotate API keys: Regularly rotate your API keys for security
  • Use HTTPS: Always use secure connections for API calls
  • Implement rate limiting: Protect your applications with appropriate rate limits
  • Monitor usage: Track API usage and watch for anomalies

Pro Tip

For optimal performance, batch multiple queries when possible and implement caching for frequently accessed content.

Rate Limits

To ensure optimal performance for all users, ZenSearch AI implements rate limiting across all API endpoints.

Rate Limit Tiers

Plan Requests/Minute Requests/Hour Daily Limit
Starter 60 1,000 10,000
Professional 300 5,000 50,000
Enterprise 1,000 20,000 Unlimited

Rate Limit Headers

All API responses include rate limit information in the headers:

X-RateLimit-Limit: 1000 X-RateLimit-Remaining: 999 X-RateLimit-Reset: 1640995200