# RAG.STATS

> Report the documents, chunks, queries and chunking settings of a RAG pipeline.

URL: https://docs.hotkv.com/commands/rag-stats/

```
RAG.STATS pipeline
```

- Group: RAG
- Complexity: O(1)
- HotKV Cloud: Performance and Scale plans
- On-Premise: requires the rag-pipeline license feature

A RAG pipeline splits your documents into chunks, keeps each chunk with the embedding you computed for it, and answers searches that combine keyword (BM25) relevance with vector similarity, all inside HotKV. `RAG.STATS` describes one pipeline.

## Return value

The reply is a flat array of alternating field names and values in both RESP2 and RESP3 (it is not sent as a RESP3 map). The fields, in order:

| Field | Type | Meaning |
| --- | --- | --- |
| `name` | Bulk string | Pipeline name. |
| `dimensions` | Integer | Embedding dimensions. |
| `totalDocs` | Integer | Documents currently stored. |
| `totalChunks` | Integer | Chunks currently stored. |
| `totalIngested` | Integer | Ingest calls that stored chunks, re-ingests included. |
| `totalQueries` | Integer | Searches run. |
| `chunkSize` | Integer | Chunk size in characters. |
| `chunkStrategy` | Bulk string | `fixed_size`, `sentence` or `paragraph`. |
| `chunkOverlap` | Integer | Chunk overlap in characters. |

Errors:

- `ERR pipeline not found` if the pipeline does not exist.
- `ERR wrong number of arguments for 'rag.stats' command` if the argument count is wrong.
- `NOLICENSE rag-pipeline requires a HotKV license. Contact sales@hotkv.com` if your license does not include the `rag-pipeline` feature.

## Examples

```
127.0.0.1:6379> RAG.STATS faq
 1) "name"
 2) "faq"
 3) "dimensions"
 4) (integer) 3
 5) "totalDocs"
 6) (integer) 1
 7) "totalChunks"
 8) (integer) 2
 9) "totalIngested"
10) (integer) 1
11) "totalQueries"
12) (integer) 1
13) "chunkSize"
14) (integer) 512
15) "chunkStrategy"
16) "paragraph"
17) "chunkOverlap"
18) (integer) 64
```

## Compatibility

HotKV-only command. Redis and Valkey have no equivalent.

## See also

[RAG.CREATE](https://docs.hotkv.com/commands/rag-create/index.md), [RAG.INGEST](https://docs.hotkv.com/commands/rag-ingest/index.md), [RAG.SEARCH](https://docs.hotkv.com/commands/rag-search/index.md), [RAG.DROP](https://docs.hotkv.com/commands/rag-drop/index.md), [RAG.LIST](https://docs.hotkv.com/commands/rag-list/index.md), [AI features guide](https://docs.hotkv.com/ai-features/index.md)