Ragbits CLI#
Ragbits comes with a command line interface (CLI) that provides a number of commands for working with the Ragbits platform. It can be accessed by running the ragbits
command in your terminal.
ragbits#
Common CLI arguments for all ragbits commands.
Usage:
Options:
Name | Type | Description | Default |
---|---|---|---|
--output , -o |
choice (text | json ) |
Set the output type (text or json) | text |
--install-completion |
boolean | Install completion for the current shell. | None |
--show-completion |
boolean | Show completion for the current shell, to copy it or customize the installation. | None |
--help |
boolean | Show this message and exit. | False |
Subcommands
- prompts: Commands for managing prompts
- vector-store: Commands for managing vector stores
ragbits prompts#
Commands for managing prompts
Usage:
Options:
Name | Type | Description | Default |
---|---|---|---|
--help |
boolean | Show this message and exit. | False |
Subcommands
- exec: Executes a prompt using the specified prompt class and LLM factory.
- generate-promptfoo-configs: Generates the configuration files for the PromptFoo prompts.
- lab: Launches the interactive application for listing, rendering, and testing prompts
- render: Renders a prompt by loading a class from a module and initializing it with a given payload.
ragbits prompts exec#
Executes a prompt using the specified prompt class and LLM factory.
For an example of how to use this command, see the Quickstart guide.
Usage:
Options:
Name | Type | Description | Default |
---|---|---|---|
--payload |
text | N/A | None |
--llm-factory |
text | N/A | ragbits.core.llms.factory:simple_litellm_factory |
--help |
boolean | Show this message and exit. | False |
ragbits prompts generate-promptfoo-configs#
Generates the configuration files for the PromptFoo prompts.
For more information, see the Promptfoo integration documentation.
Usage:
Options:
Name | Type | Description | Default |
---|---|---|---|
--file-pattern |
text | N/A | **/prompt_*.py |
--root-path |
path | N/A | /__w/ragbits/ragbits |
--target-path |
path | N/A | promptfooconfigs |
--help |
boolean | Show this message and exit. | False |
ragbits prompts lab#
Launches the interactive application for listing, rendering, and testing prompts defined within the current project.
For more information, see the Prompts Lab documentation.
Usage:
Options:
Name | Type | Description | Default |
---|---|---|---|
--file-pattern |
text | N/A | **/prompt_*.py |
--llm-factory |
text | N/A | ragbits.core.llms.factory:simple_litellm_factory |
--help |
boolean | Show this message and exit. | False |
ragbits prompts render#
Renders a prompt by loading a class from a module and initializing it with a given payload.
Usage:
Options:
Name | Type | Description | Default |
---|---|---|---|
--payload |
text | N/A | None |
--help |
boolean | Show this message and exit. | False |
ragbits vector-store#
Commands for managing vector stores
Usage:
Options:
Name | Type | Description | Default |
---|---|---|---|
--factory-path |
text | Python path to a function that creates a vector store, ina format 'module.submodule:function' | None |
--yaml-path |
path | Path to a YAML configuration file for the vector store | None |
--help |
boolean | Show this message and exit. | False |
Subcommands
- list: List all objects in the chosen vector store.
- query: Query the chosen vector store.
- remove: Remove objects from the chosen vector store.
ragbits vector-store list#
List all objects in the chosen vector store.
Usage:
Options:
Name | Type | Description | Default |
---|---|---|---|
--limit |
integer | Maximum number of entries to list | 10 |
--offset |
integer | How many entries to skip | 0 |
--columns |
text | Comma-separated list of columns to display, aviailable: id, key, vector, metadata | id,key,metadata |
--help |
boolean | Show this message and exit. | False |
ragbits vector-store query#
Query the chosen vector store.
Usage:
Options:
Name | Type | Description | Default |
---|---|---|---|
--k |
integer | Number of entries to retrieve | 5 |
--max-distance |
float | Maximum distance to the query vector | None |
--embedder-factory-path |
text | Python path to a function that creates an embedder, in a format 'module.submodule:function' | None |
--embedder-yaml-path |
path | Path to a YAML configuration file for the embedder | None |
--columns |
text | Comma-separated list of columns to display, aviailable: id, key, vector, metadata | id,key,metadata |
--help |
boolean | Show this message and exit. | False |
ragbits vector-store remove#
Remove objects from the chosen vector store.
Usage:
Options:
Name | Type | Description | Default |
---|---|---|---|
--help |
boolean | Show this message and exit. | False |