Atomic units of knowledge in Cognee
See example class definition
id
— unique identifiercreated_at
, updated_at
— timestamps (ms since epoch)version
— for tracking changes and schema evolutionmetadata.index_fields
— critical: determines which fields are embedded for vector searchtype
— class namebelongs_to_set
— groups related DataPointsmetadata.index_fields
tells Cognee which fields to embed into the vector store.
This is the mechanism behind semantic search.
index_fields
→ converted into embeddingsClass_field
)add_data_points()
, Cognee automatically:
Example: indexing only one field
"name"
is semantically searchableExample: Book → Author transformation
Relationship syntax options
Built-in DataPoint types
Document
(metadata.index_fields=["name"]
)DocumentChunk
(metadata.index_fields=["text"]
)TextSummary
/ CodeSummary
(metadata.index_fields=["text"]
)Entity
, EntityType
(metadata.index_fields=["name"]
)Edge
— links between DataPointsExample: custom DataPoint with best practices
version
belongs_to_set