Skip to main content

RAG CLI

The praisonai rag command group provides full RAG (Retrieval-Augmented Generation) functionality from the command line.

Full RAG CLI Documentation

See the complete RAG CLI reference with all commands, options, and examples.

Quick Reference

CommandDescription
praisonai rag indexBuild or update an index from source documents
praisonai rag queryOne-shot question answering with citations
praisonai rag chatInteractive RAG chat session
praisonai rag evalEvaluate RAG retrieval quality
praisonai rag serveStart RAG as a microservice API

Key Features

  • Hybrid Retrieval: Use --hybrid to combine dense vectors with BM25 keyword search
  • Reranking: Use --rerank to improve result quality
  • OpenAI-Compatible API: Use --openai-compat with rag serve for drop-in compatibility
  • Performance Profiling: Use --profile to measure and optimize performance
  • Config Files: Use --config for reproducible setups with YAML configuration

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 rag serve --openai-compat --hybrid --port 8080