Skip to main content

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.

idIdrequired

RAG document id.

product_id object

Main app product id that owns this knowledge document.

anyOf
integer
agent_idAgent Idrequired

Agent id whose chatbot can retrieve this knowledge.

directory_idDirectory Idrequired

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.

anyOf
string
titleTitlerequired

Human-readable document title, usually derived from filename or prompt name.

source_typeKnowledgeDocumentSourceTyperequired

Original source format before text extraction.

Possible values: [text, markdown, csv, xls, pdf, xlsx]

retrieval_modeKnowledgeDocumentRetrievalModerequired

How this document is materialized into retrievable units.

Possible values: [whole_document, section_under_heading, top_n_chunks, top_n_rows]

statusKnowledgeDocumentStatusrequired

Ingestion lifecycle status for this document.

Possible values: [pending, ready, failed]

source_path object

Canonical S3 path to the original source artifact.

anyOf
string
source_hash object

Hash of the effective ingested source used to detect changes.

anyOf
string
extracted_text object

Canonical extracted text derived from the original source.

anyOf
string
structure_json objectrequired

Derived structural metadata such as section counts, row counts, or page counts.

property name*any

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.

property name*any

Flexible document metadata for lineage, migration, and future retrieval hints.

created_atdate-timerequired

When this document row was created in the RAG database.

updated_atdate-timerequired

When this document was last re-ingested or updated.

unit_countUnit Count

Number of currently materialized retrievable units for this document.

Default value: 0
KnowledgeDocumentRead
{
"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
}