KnowledgeDocumentDetailRead
A knowledge document in the RAG store that an agent's chatbot can retrieve from. It is ingested from text or a file (markdown, pdf, csv, xlsx, …) into retrievable units. The Detail form additionally includes the materialized units.
RAG document id.
product_id object
Main app product id that owns this knowledge document.
- integer
- null
Agent id whose chatbot can retrieve this knowledge.
Owning knowledge directory id. Every persisted knowledge document belongs to exactly one directory.
group_name object
Legacy group name mirror. Normally kept equal to the owning directory name for compatibility.
- string
- null
Human-readable document title, usually derived from filename or prompt name.
Original source format before text extraction.
Possible values: [text, markdown, csv, xls, pdf, xlsx]
How this document is materialized into retrievable units.
Possible values: [whole_document, section_under_heading, top_n_chunks, top_n_rows]
Ingestion lifecycle status for this document.
Possible values: [pending, ready, failed]
source_path object
Canonical S3 path to the original source artifact.
- string
- null
source_hash object
Hash of the effective ingested source used to detect changes.
- string
- null
extracted_text object
Canonical extracted text derived from the original source.
- string
- null
structure_json objectrequired
Derived structural metadata such as section counts, row counts, or page counts.
Derived structural metadata such as section counts, row counts, or page counts.
metadata_json objectrequired
Flexible document metadata for lineage, migration, and future retrieval hints.
Flexible document metadata for lineage, migration, and future retrieval hints.
When this document row was created in the RAG database.
When this document was last re-ingested or updated.
Number of currently materialized retrievable units for this document.
0units object[]
Fully materialized retrievable units belonging to this document.
RAG unit id.
Parent knowledge document id.
How this unit was materialized: document, section, chunk, or row.
Possible values: [document, section, chunk, row]
title object
Unit title used as semantic context, for example a section heading or document title.
- string
- null
heading_path object
Full heading breadcrumb for section-like units, if available.
- string
- null
Primary text payload returned to the chatbot when this unit is selected.
Normalized retrieval text used for lexical matching and as the basis for embeddings.
Stable order of the unit inside its document.
row_index object
Original row number for row-based units, if applicable.
- integer
- null
metadata_json objectrequired
Flexible per-unit metadata such as sheet name, headers, values, or section title.
Flexible per-unit metadata such as sheet name, headers, values, or section title.
When this unit was created in the RAG database.
{
"id": 0,
"product_id": 0,
"agent_id": 0,
"directory_id": 0,
"group_name": "string",
"title": "string",
"source_type": "text",
"retrieval_mode": "whole_document",
"status": "pending",
"source_path": "string",
"source_hash": "string",
"extracted_text": "string",
"structure_json": {},
"metadata_json": {},
"created_at": "2024-07-29T15:51:28.071Z",
"updated_at": "2024-07-29T15:51:28.071Z",
"unit_count": 0,
"units": [
{
"id": 0,
"document_id": 0,
"unit_type": "document",
"title": "string",
"heading_path": "string",
"content": "string",
"search_text": "string",
"ordinal": 0,
"row_index": 0,
"metadata_json": {},
"created_at": "2024-07-29T15:51:28.071Z"
}
]
}