RAG CLI
Command-line interface for RAG operations
RAG CLI
The praisonai rag command group provides full RAG (Retrieval-Augmented Generation) functionality from the command line.
See the complete RAG CLI reference with all commands, options, and examples.
Quick Reference
| Command | Description |
|---|---|
praisonai rag index | Build or update an index from source documents |
praisonai rag query | One-shot question answering with citations |
praisonai rag chat | Interactive RAG chat session |
praisonai rag eval | Evaluate RAG retrieval quality |
praisonai serve rag | Start RAG as a microservice API |
Key Features
- Hybrid Retrieval: Use
--hybridto combine dense vectors with BM25 keyword search - Reranking: Use
--rerankto improve result quality - OpenAI-Compatible API: Use
--openai-compatwithrag servefor drop-in compatibility - Performance Profiling: Use
--profileto measure and optimize performance - Config Files: Use
--configfor reproducible setups with YAML configuration - Chunking Control:
--chunkingand--chunk-sizeonindexare honoured by theKnowledgechunker - Fail-Fast Indexing:
rag indexexits non-zero when a source stores zero chunks — see Exit codes forrag index
Common Examples
# Index documents
praisonai rag index ./documents --collection myproject
# Query with hybrid retrieval
praisonai rag query "What are the key findings?" --hybrid --rerank
# Start interactive chat
praisonai rag chat --collection myproject --hybrid
# Start API server with OpenAI compatibility
praisonai serve rag --openai-compat --hybrid --port 8080Related
- Knowledge CLI – Indexing and search without LLM generation
- RAG Module – Python API for RAG
- RAG Quickstart – Getting started with RAG