Skip to main content

Overview

The retrieval CLI provides unified commands for indexing documents and querying knowledge bases. These commands are Agent-first and use the same retrieval pipeline as the Python SDK.

Commands

praisonai index - Index Documents

Index documents into a knowledge base for later retrieval.

Options

praisonai query - Query with Answer and Citations

Query the knowledge base and get a structured answer with citations.

Options

praisonai search - Retrieve from Knowledge Base

Return raw ranked hits from a knowledge-base collection. No LLM call, no answer synthesis. Use it when you want the retrieved snippets themselves (debugging retrieval, inspecting what an Agent would see). For an LLM-synthesised answer with citations, use praisonai query above.

Options

praisonai search never calls the LLM. If your invocation seems to hit the model, upgrade to a build that includes PR #4328 (fixes #4326) — earlier builds misrouted the command as a chat prompt.

Examples

Complete Workflow

Using Config Files

Create a config file retrieval.yaml:
Use with commands:

Performance Profiling

Profile indexing and query performance:

Verbose Mode

Get detailed output for debugging:
Output includes:
  • Collection being queried
  • Retrieval strategy used
  • Number of sources found
  • Relevance scores
  • Elapsed time

Environment Variables

Comparison with Legacy Commands

The unified retrieval commands replace the separate knowledge and rag command families: The legacy commands are still available but marked as deprecated. Use the new unified commands for all new projects.

Next Steps