Skip to main content
A Datasource is composed of multiple Resources. Each resource is a unit of content that agents can search and retrieve. PLai Framework supports three types of resources: Files, URLs/Sitemaps, and Manual Content.

Resource Types Overview

  • Datasource:
    • Files
      • PDF Documents
      • Word Documents
      • Text Files
      • Spreadsheets
    • URLs & Sitemaps
      • Single Pages
      • Website Crawls
      • Sitemap Indexing
    • Manual Content
      • Direct Text Entry

Files

Supported File Formats

PDF

.pdf - Full text extraction, images preserved

Word Documents

.docx - Microsoft Word format with formatting

Text Files

.txt, .md - Plain and markdown text

Spreadsheets

.xlsx, .csv - Tabular data and calculations

File Upload

Single File Upload

1

Go to Datasource

Navigate to the datasource you want to add to
2

Click Add Resource

Select Add Resource β†’ Upload File
3

Select File

Choose file from your computer
4

Verify Upload

Wait for file to be processed and indexed
5

Confirm

File appears in resource list

Bulk Upload

Upload multiple files at once:

File Processing

When you upload a file:
  1. Upload File
  2. Extract Text
  3. Split into Chunks
  4. Generate Embeddings
  5. Index for Search
  6. Ready for Queries
Processing Time:
  • Text extraction: Depends on file size (typically 1-5 seconds)
  • Chunking: Split into retrievable segments
  • Embedding: Convert to vector representations
  • Indexing: Make searchable

File Management

View Files:
  • See all uploaded files in resource list
  • File size and upload date
  • Processing status
  • Number of indexed chunks
Remove Files:
  • Delete individual files
  • Update datasource immediately
  • Changes available to agents
Organize Files:
  • Add metadata/tags to files
  • Group by topic or category
  • Document file contents
  • Track versions

Best Practices for Files

  • Use Clear Names: Descriptive filenames help agents understand content
  • Well-Structured: Use headings, sections, and clear formatting
  • Compression: Large PDFs may take longer to process
  • Clean Text: Remove unnecessary formatting or corrupted text
  • Complete Content: Include all relevant information
  • Versioning: Archive old versions, keep current ones

URLs & Sitemaps

Adding URLs

Single URL

1

Go to Datasource

Navigate to the datasource
2

Add Resource

Select Add Resource β†’ Add URL
3

Enter URL

Paste the web page URL
4

Crawl Option

Choose whether to crawl linked pages
5

Submit

System fetches and indexes the page

Sitemaps

Add an entire website using its sitemap:
1

Get Sitemap URL

Find website’s sitemap (usually /sitemap.xml)
2

Add Sitemap

Select Add Resource β†’ Add Sitemap
3

Paste Sitemap URL

Enter the sitemap XML URL
4

Configure Crawling

Set crawl depth and exclusions
5

Submit

System indexes all pages in sitemap

Web Crawling Options

URL Processing

When you add a URL:
  1. URL Request
  2. Fetch Web Content
  3. Extract Main Text
  4. Remove HTML/Styling
  5. Split into Chunks
  6. Generate Embeddings
  7. Index for Search
Processing Considerations:
  • Dynamic content: May need JavaScript rendering
  • Authentication: Public pages only
  • Rate limiting: Respectful crawling speed
  • Robots.txt: Honors site restrictions

URL Re-scraping (WEBPAGE Only)

IMPORTANT: Re-scraping is only available for WEBPAGE resources, not individual URL resources.

Automatic Re-scraping

WEBPAGE resources can be configured for automatic re-scraping:
1

Enable Scheduling

Set config.scheduled: true when creating the resource
2

Set Interval

Configure schedule_interval_hours (minimum 1 hour)
3

System Re-scrapes

Automatically re-scrapes on schedule
4

New URLs Detected

New links are extracted and created as resources
Configuration Example:

Manual Re-scraping

Force immediate re-scraping without waiting for the schedule:
Response shows:
  • New URLs found
  • Jobs created for new URLs
  • Processing status

URL Management

View URLs:
  • See all indexed URLs
  • Crawl date and re-scrape status
  • Link extraction results
  • Last indexed date
Limitations:
  • ❌ Not available for URL (type: URL) resources
  • ❌ Sitemaps not auto-discovered
  • ❌ Only one initial URL per WEBPAGE
  • βœ… Extracts links from scraped page
  • βœ… Creates resources for new links
Crawling Strategies:
  • Specific Pages: Target exact content
  • Section Crawling: Crawl product docs section
  • Sitemap: Complete website indexing
  • Scheduled: Regular updates for dynamic sites

Best Practices for URLs

  • Public Accessibility: Ensure pages are publicly accessible
  • Clean URLs: Avoid login-required pages
  • Stable URLs: Use permanent URLs, not temporary redirects
  • Site Structure: Organize content logically for crawling
  • Freshness: Recrawl periodically for updates
  • Respect robots.txt: Honor site crawling rules

Manual Content

Direct Text Entry

Add knowledge directly without files:
1

Go to Datasource

Navigate to the datasource
2

Add Resource

Select Add Resource β†’ Add Text
3

Enter Title

Give the content a descriptive title
4

Enter Content

Paste or type the text content
5

Add Metadata

Optional tags and descriptions
6

Save

Content is indexed and searchable

Content Format

Supported Formats:
  • Plain text
  • Markdown with formatting
  • Structured lists and tables
  • Code snippets (syntax highlighting)
  • Multi-paragraph content
Example Manual Content:

Text Entry Workflows

Workflow 1: Policy Documentation
  • Policy Statement
  • Eligibility Rules
  • Process Steps
  • Contact Information
Workflow 2: Procedures
  • Overview
  • Prerequisites
  • Step-by-step Instructions
  • Troubleshooting
  • Escalation Path
Workflow 3: FAQ Entries
  • Question
  • Answer
  • Related Topics
  • See Also Links

Content Management

Edit Content:
  • Update text directly
  • Changes indexed immediately
  • Available to agents right away
  • No additional upload needed
Organize Content:
  • Group related entries
  • Add meaningful titles
  • Use consistent formatting
  • Tag for categorization
Version Control:
  • Keep change history
  • Document updates
  • Track who edited
  • Revert if needed

Best Practices for Manual Content

  • Clear Structure: Use headings and sections
  • Completeness: Include all necessary details
  • Formatting: Use markdown for readability
  • Specificity: Be detailed, not vague
  • Examples: Include concrete examples
  • Updates: Keep current and accurate

Resource Metadata

Each resource has associated metadata:

Adding Metadata

1

Go to Resource

Find the resource in datasource
2

Edit Details

Click Edit Metadata
3

Update Fields

Modify title, description, tags
4

Save

Changes apply immediately

Resource Search & Retrieval

How Agents Use Resources

When an agent searches a datasource:
  1. Agent query β€” e.g. β€œHow do I reset my password?”
  2. Search all resources, such as:
    • PDF: User Guide
    • URL: FAQ Page
    • Text: Reset Procedure
  3. Find similar content
  4. Return top results
  5. Agent uses for response

Search Configuration

Each datasource can configure:
  • Top K: Number of resources to return (default: 10)
  • Similarity Threshold: Minimum relevance score
  • Reranking: AI-powered result refinement
  • Multi-Query: Generate query variations

Quality Metrics

Monitor resource quality:
  • Retrieval Rate: How often resources are used
  • Relevance: Quality of returned results
  • Coverage: Percentage of queries with results
  • Performance: Speed of retrieval

Resource Organization Strategy

By Content Type

  • Files/
    • Product Guides
    • API Documentation
    • Policies
  • URLs/
    • Blog Articles
    • Knowledge Base
    • Help Center
  • Manual/
    • Quick Answers
    • FAQs
    • Common Issues

By Topic

  • Getting Started/
  • Product Features/
  • Troubleshooting/
  • Billing/
  • Policies/

Next Steps