Quick Start
1
Simple Usage
Pass file paths or directories — the agent indexes on first run, then retrieves on each query:
2
With Configuration
Use
KnowledgeConfig for vector store, chunking, and reranking:How It Works
For pre-indexed stores, pass vector config via task context or call
agent.retrieve("query") directly.
Configuration Options
Install knowledge extras:
pip install "praisonaiagents[knowledge]"
Best Practices
Index documents before querying
Index documents before querying
Pass sources via
knowledge=["file.pdf"] at agent creation — first run indexes, later runs retrieve without re-indexing.Use specific questions
Use specific questions
Narrow questions retrieve better chunks than broad prompts like “tell me everything”.
Use persistent vector stores in production
Use persistent vector stores in production
Set
vector_store with Chroma path, Qdrant, or Pinecone — avoid in-memory stores for production.Combine RAG with tools for live data
Combine RAG with tools for live data
Pair
knowledge= with web tools when you need both static documents and real-time data.Related
Vector Store
Pluggable embedding storage
Knowledge
Sources and retrieval strategies

