Skip to main content

Knowledge Module

The Knowledge module provides a unified interface for building knowledge bases with document loading, vector storage, and intelligent retrieval.

Import

Wrapper entry points (praisonai.run, praisonai.arun, and the praisonai CLI) call register_default_adapters() for you before the agent starts, so retriever: fusion / reranker: llm in YAML resolve automatically (PraisonAI 4.7.9+). AutoReader.load() auto-wires the built-in readers on first call, so the reader example below works untouched. Call register_default_adapters() yourself only when looking up retrievers or rerankers by name from your own Python code.

Quick Example

Features

  • Document loading from files, directories, URLs
  • Vector storage with ChromaDB and Pinecone
  • Multiple retrieval strategies (Basic, Fusion, Recursive, AutoMerge)
  • Reranking for improved relevance
  • CLI integration for easy management

Architecture

CLI Commands

Add Documents

Query Knowledge Base

Manage Knowledge Base

CLI Options

Example: Building a Documentation Assistant

Retrieval Strategies