Skip to content

Ask the HotKV docs

Answers come only from these docs and can be wrong; check the linked pages before you rely on them.

RAG.STATS

Last updated
RAG.STATS pipeline
Group
RAG
Complexity
O(1)
Arity
2 (exactly, counting the command name)
Flags
read-only, fast
Keys
first 1, last 1, step 1
HotKV Cloud
Performance and Scale
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.

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.
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

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

RAG.CREATE, RAG.INGEST, RAG.SEARCH, RAG.DROP, RAG.LIST, AI features guide