Home Explore Blog CI



ragit

1st chunk of `docs/commands/retrieve-chunks.txt`
226abb244393dace706f9fbed524aedaa6cddf11e37056c000000001000003a7
rag-retrieve-chunks(1)
==========

NAME
----
rag-retrieve-chunks - Retrive chunks that are relevant to a query

SYNOPSIS
--------
[verse]
'rag retrive-chunks' [--uid-only] [--max-retrieval <n>]
            [--max-summaries <n>] [--[no-]rerank] [--json | -j] <query>

DESCRIPTION
-----------
It runs step 2, 3 and 4 of ragit's pipeline. If you wanna know about the
pipeline, run `rag help pipeline`. If `--no-rerank` is set, it only runs
step 2 and 3.

`--max-summaries` decides how many chunks are selected by tfidf-scores (step 3).
If it's not set, it uses the value in config.

`max-retrieval` decides how many chunks are selected by reranker (step 4).
If it's not, it uses the value in config. If `--no-rerank` is set, this
value is ignored.

If `--json` is set, it dumps a valid json to stdout. Its schema is,

- no flags: `[result: { source: string, summary: string, title: string, uid: string }]`
- `--uid-only`: `[uid: string]`

Title: Rag-Retrieve-Chunks Command
Summary
The rag-retrieve-chunks command retrieves chunks relevant to a query by running steps 2, 3, and 4 of the ragit pipeline, with options to customize the retrieval process and output format, including the ability to set maximum retrieval and summary limits, and to output results in JSON format with varying levels of detail, such as uid-only or full summary information.