Skip to main content

Document Library

The Document Library is your centralized hub for managing, searching, and leveraging documents within the Plugged.in platform. With advanced AI capabilities, version control, and rich preview features, it transforms how you interact with your knowledge base.

Overview

AI-Powered Search

Semantic search that understands context and intent, providing intelligent answers from your documents

Version Control

Complete version history with diff tracking, model attribution, and rollback capabilities

Rich Previews

Native viewing for PDFs, images, code files, and markdown with zoom and navigation controls

Multi-Source

Support for uploaded files, AI-generated content, and API-created documents

🔍 AI Search Features

Transform how you find information with our intelligent search capabilities.
How it works: Uses natural language processing to understand the meaning and context of your query.Example Query: “How do I authenticate users in my application?”Returns: Comprehensive answer synthesized from multiple documents with source attribution.Best for:
  • Complex questions requiring context
  • Finding information across multiple documents
  • Getting synthesized answers
  • Natural language queries
1

Enable AI Search

Click the sparkles icon (✨) in the search bar to toggle AI mode
2

Enter Your Query

Type a natural language question or description of what you’re looking for
3

Review the Answer

The AI will provide a comprehensive answer based on your documents
4

Explore Sources

Click on any source document name to open it in the preview modal

AI Search Interface

AI Search uses a 500ms debounce to optimize performance and reduce unnecessary API calls while you type.

📄 Document Management

Supported Formats

Upload Documents

Via Web Interface

  1. Navigate to Library in the sidebar
  2. Click Upload Documents button
  3. Drag and drop or select files
  4. Add metadata (optional):
    • Title: Display name for the document
    • Description: Brief summary
    • Tags: Comma-separated keywords
    • Category: Document classification

Via API

Document Sources

Traditional file uploads from your local system.Metadata:
  • Upload timestamp
  • File size and type
  • User attribution
Documents created by AI models with full attribution tracking.Metadata:
  • Model name and provider
  • Generation timestamp
  • Token usage
  • Context used
Programmatically created documents via REST API.Metadata:
  • API client identification
  • Creation method
  • Integration source

🔄 Document Versioning

Track changes and maintain history for all your documents.

Version History Features

Timeline View

Visual timeline of all document versions with timestamps

Diff Visualization

Line-by-line comparison showing additions and deletions

Model Attribution

Track which AI models created or modified each version

Rollback

Restore any previous version with one click

Version Metadata Structure

Comparing Versions

1

Open Version History

Click the version badge or history icon on any document
2

Enable Compare Mode

Click the “Compare” button in the version history panel
3

Select Versions

Choose two versions to compare (checkboxes appear in compare mode)
4

View Differences

Click “Compare Selected” to see a detailed diff view

👁️ Document Preview

Rich preview capabilities for all document types with advanced controls.

Preview Features by Type

  • Page Navigation: Previous/Next buttons and page counter
  • Zoom Controls: Fit to width, fit to page, custom zoom
  • Search: Find text within the PDF
  • Download: Original file download
  • Fullscreen: Immersive reading mode

Preview Modal Structure

🎯 Advanced Features

Bulk Operations

Perform actions on multiple documents simultaneously:

Smart Filters

By Source

Filter by upload source (Upload, AI, API)

By Date

Date range filtering with presets

By Model

Filter by AI model that created/modified

By Tags

Multi-tag filtering with AND/OR logic

Keyboard Shortcuts

🔐 Security & Permissions

Access Control

Documents respect project and profile isolation:
  • Project Level: Documents are isolated per project
  • Profile Level: Further isolation within project workspaces
  • Visibility Levels:
    • private: Only accessible to document owner
    • workspace: Shared within the profile/project
    • public: Accessible via public API (with authentication)

Data Protection

All documents are encrypted at rest and in transit
  • Encryption: AES-256-GCM for document content
  • Sanitization: HTML/Markdown content sanitized before display
  • Path Protection: Prevention of directory traversal attacks
  • Rate Limiting:
    • Uploads: 100 per hour
    • Searches: 1000 per hour
    • AI generation: 10 per hour

📊 Usage Analytics

Track how your documents are being used:

🚀 Performance Optimization

The Document Library is optimized for speed and efficiency:

Recent Improvements (v2.11.1)

  • 68% reduction in bundle size
  • 60% reduction in memory usage
  • Dynamic import caching for heavy components
  • Comprehensive memoization with React optimization hooks
  • Single useReducer pattern replacing multiple state variables

Best Practices

  • Keep documents under 10MB for optimal performance
  • Use descriptive titles and tags
  • Group related documents in categories
  • Regular cleanup of obsolete documents
  • Use specific, descriptive queries
  • Leverage tags for faster filtering
  • Enable AI search for complex questions
  • Use traditional search for known keywords
  • Add meaningful change summaries
  • Regularly review version history
  • Clean up unnecessary versions
  • Use comparison before major changes

🔧 API Reference

Core Endpoints

Response Format

Next Steps

RAG Tutorial

Learn to build a knowledge base with RAG

API Integration

Integrate document library with your apps