Quickstart: cli

Run a RAG query from the command line and see a grounded answer with citations in seconds.

attune-rag query "What is the return policy?"

Prerequisites

Steps

  1. Run a query. Pass your question as a positional argument:

    attune-rag query "What is the return policy?"
    

    You should see output similar to:

    Answer: Returns are accepted within 30 days of purchase. [1]
    
    Citations:
      [1] docs/policies.md, line 12
    
  2. Check corpus statistics. Confirm your corpus loaded correctly:

    attune-rag corpus-info
    

    Expected output:

    Documents indexed: 42
    Chunks:            317
    Embedding model:   text-embedding-ada-002
    
  3. Explore available options. Print the full help text to see every flag:

    attune-rag --help
    

Next

Read the build_parser() reference in src/attune_rag/cli.py to learn how to extend the CLI with custom subcommands.

Tags: cli, query, corpus-info