List RAG Chunks
dataset.chunksRetrieve paginated RAG-ready text chunks from an indexed dataset. Filter by quality grade and PII masking, then integrate with LangChain or LlamaIndex.
Instructions
Retrieve LangChain/LlamaIndex-ready text chunks from an indexed dataset (Pro+ plan).
Returns paginated RAG chunks. Each chunk includes text, token count, and metadata (quality grade, PII masking status, document type, language). Use FlexOrchRetriever or FlexOrchReader from the flexorch-sdk for automatic pagination. The dataset must be indexed first via dataset.index(dataset_id).
Args: dataset_id: ID of the indexed dataset. min_quality: Minimum quality grade to include: A, B, C, or D. Default: B. Chunks with grade at or above this threshold are returned. Example: "B" returns grade A and B chunks. pii_masked_only: When true, return only chunks where PII was masked. Default: false. page: Page number, 1-indexed. Default: 1. page_size: Chunks per page, max 100. Default: 20.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | ||
| page_size | No | ||
| dataset_id | Yes | ||
| min_quality | No | B | |
| pii_masked_only | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | ||
| error | No | ||
| total | No | ||
| chunks | No | ||
| isError | No | ||
| has_more | No | ||
| page_size | No | ||
| dataset_id | No | ||
| chunk_count | No |