Skip to main content

Knowledge Base System

The knowledge system provides sophisticated document processing and semantic search capabilities, enabling agents to access and utilise information from various sources.

Key Features

Process PDFs, documents, spreadsheets, images, and raw text
Multiple strategies for optimal text segmentation
Vector-based search with optional reranking
User, agent, and run-specific knowledge scoping
Optional relationship extraction and storage
Automatic quality assessment for stored knowledge

Quick Start

Configuration Options

Basic Configuration

Advanced Configuration with Graph Store

Chunking Strategies

The chosen strategy applies to every file type, including plain-text files.

Document Processing

Supported File Types

  • PDF (.pdf)
  • Word (.doc, .docx)
  • Text (.txt)
  • Markdown (.md)
  • RTF (.rtf)
  • Excel (.xls, .xlsx)
  • CSV (.csv)
  • JSON (.json)
  • XML (.xml)
  • Images (OCR)
  • Local HTML files (.html, .htm)
  • Raw text strings
  • YouTube videos
  • Remote URLs (http:// / https://) — via MarkItDown, Knowledge.add(url)
All supported UTF-8 text extensions — .txt, .md, .csv, .json, .xml, .html, .htm — are chunked with the configured chunker (respecting chunk_size and chunk_overlap), and the original case is preserved. Behaviour matches every other file type. Since PraisonAI PR #4831.

Processing Options

As of PraisonAI #4334 (2026-08-25), Knowledge.add() accepts remote URLs directly. The URL is fetched and extracted with MarkItDown (already a Praison runtime dependency), chunked with the configured chunker, and stored on the vector store — the same pipeline used for local files. Stored chunks carry metadata["source_type"] = "url" and metadata["source"] = <the URL>. A single bad URL in a batch surfaces the error rather than being silently dropped, matching local-file behaviour.
Agent(knowledge=["https://..."]) is a separate code path and still skips remote URLs (PR #4004). Build a shared Knowledge instance, call kb.add(url), then pass knowledge=kb to the agent. See Knowledge Quick Start.

Search Features

Advanced Search Options

Memory Integration

When used with agents, knowledge automatically integrates with memory:

Graph Store Features

Graph stores enable relationship extraction and complex queries beyond simple semantic search.

Configuration

Relationship Queries

Best Practices

Chunking Strategy

  • Smaller chunks (100-200 tokens): Better precision
  • Larger chunks (500-1000 tokens): Better context
  • Match chunk size to query complexity

Organisation

  • Separate collections by domain
  • Use metadata for filtering
  • Regular cleanup of outdated content

Performance

  • Enable caching for repeated queries
  • Use appropriate embedding models
  • Batch document processing

Quality

  • Verify document processing
  • Monitor search relevance
  • Regular reindexing if needed

Example: Research Assistant

Troubleshooting

Next Steps

Learn about memory integration
Build RAG applications