KnowledgeDocumentRead
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.
0{
"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
}