Skip to content

cayu.knowledge.indexing

Public Cayu API. Definitions are grouped by their public source module, and definitions from private implementation modules appear on their package’s page; adding a symbol does not move existing links. The import shown at each entry is a supported public namespace. Read the Python API overview and install the required extra.

DEFAULT_KNOWLEDGE_EMBEDDING_WORK_RECORD_LIMIT

Section titled “DEFAULT_KNOWLEDGE_EMBEDDING_WORK_RECORD_LIMIT”
from cayu.storage import DEFAULT_KNOWLEDGE_EMBEDDING_WORK_RECORD_LIMIT
DEFAULT_KNOWLEDGE_EMBEDDING_WORK_RECORD_LIMIT = 500

Release source · Runtime guarantees · Capability guides

from cayu.storage import knowledge_chunk_embedding_identity

Build the built-in canonical chunk-text embedding identity.

knowledge_chunk_embedding_identity(chunk: KnowledgeChunk, *, embedding_model: str, dimensions: int) -> KnowledgeEmbeddingIdentity

Release source · Runtime guarantees · Capability guides

from cayu.storage import KNOWLEDGE_CHUNK_TEXT_GENERATOR
KNOWLEDGE_CHUNK_TEXT_GENERATOR = 'cayu:canonical-knowledge-chunk'

Release source · Runtime guarantees · Capability guides

from cayu.storage import KNOWLEDGE_CHUNK_TEXT_GENERATOR_VERSION
KNOWLEDGE_CHUNK_TEXT_GENERATOR_VERSION = '1'

Release source · Runtime guarantees · Capability guides

KNOWLEDGE_CHUNK_TEXT_PREPROCESSING_VERSION

Section titled “KNOWLEDGE_CHUNK_TEXT_PREPROCESSING_VERSION”
from cayu.storage import KNOWLEDGE_CHUNK_TEXT_PREPROCESSING_VERSION
KNOWLEDGE_CHUNK_TEXT_PREPROCESSING_VERSION = 'cayu:knowledge-chunk-text:v1'

Release source · Runtime guarantees · Capability guides

from cayu.storage import KNOWLEDGE_CHUNK_TEXT_PROJECTION
KNOWLEDGE_CHUNK_TEXT_PROJECTION = 'knowledge_chunk_text'

Release source · Runtime guarantees · Capability guides

KNOWLEDGE_VECTOR_INDEX_REPRESENTATION_VERSION

Section titled “KNOWLEDGE_VECTOR_INDEX_REPRESENTATION_VERSION”
from cayu.storage import KNOWLEDGE_VECTOR_INDEX_REPRESENTATION_VERSION
KNOWLEDGE_VECTOR_INDEX_REPRESENTATION_VERSION = 'float32-cosine-v1'

Release source · Runtime guarantees · Capability guides

from cayu.storage import KnowledgeEmbeddingBackfillResult

Portable outcome from one bounded embedding repair/backfill pass.

Bases: BaseModel.

Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.

Name Type Default
scanned_records int required
indexed_records int required
failed_records int required
skipped_records int required
limit int required
refresh_existing bool required
next_cursor str | None None
KnowledgeEmbeddingBackfillResult.validate_count(value: int, info) -> int
KnowledgeEmbeddingBackfillResult.validate_limit(value: int) -> int
KnowledgeEmbeddingBackfillResult.validate_refresh_existing(value) -> bool
KnowledgeEmbeddingBackfillResult.validate_next_cursor(value: str | None) -> str | None
KnowledgeEmbeddingBackfillResult.validate_partition() -> KnowledgeEmbeddingBackfillResult

Release source · Runtime guarantees · Capability guides

from cayu.storage import KnowledgeEmbeddingIdentity

Complete identity of one durable knowledge embedding projection.

Content hashes alone are not sufficient reuse keys. Comparable vectors must agree on the canonical revision, projected content, embedding space, the projection generator, preprocessing, and the stored index representation.

Bases: BaseModel.

Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.

Name Type Default
entry_id str required
entry_revision int required
chunk_id str | None None
projection_type str required
projection_content_hash str required
embedding_model str required
dimensions int required
preprocessing_version str required
generator str required
generator_version str required
index_representation_version str required
KnowledgeEmbeddingIdentity.validate_entry_id(value: str) -> str
KnowledgeEmbeddingIdentity.validate_entry_revision(value: int) -> int
KnowledgeEmbeddingIdentity.validate_chunk_id(value: str | None) -> str | None
KnowledgeEmbeddingIdentity.validate_identity_component(value: str, info) -> str
KnowledgeEmbeddingIdentity.validate_dimensions(value: int) -> int

Release source · Runtime guarantees · Capability guides

from cayu.storage import KnowledgeEmbeddingProjection

One externally computed vector fenced to an exact pending projection attempt.

Bases: BaseModel.

Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.

Name Type Default
identity KnowledgeEmbeddingIdentity required
readiness_sequence int required
attempt_id str required
vector list[float] required
KnowledgeEmbeddingProjection.copy_identity(value: KnowledgeEmbeddingIdentity) -> KnowledgeEmbeddingIdentity
KnowledgeEmbeddingProjection.validate_readiness_sequence(value: int) -> int
KnowledgeEmbeddingProjection.validate_attempt_id(value: str) -> str
KnowledgeEmbeddingProjection.copy_vector(value) -> list[float]
KnowledgeEmbeddingProjection.validate_vector_dimensions() -> KnowledgeEmbeddingProjection

Release source · Runtime guarantees · Capability guides

from cayu.storage import KnowledgeEmbeddingProjectionConflict

A projection attempt was reused with a different immutable vector payload.

Bases: RuntimeError.

KnowledgeEmbeddingProjectionConflict.__init__(reason: str) -> None

Release source · Runtime guarantees · Capability guides

from cayu.storage import KnowledgeEmbeddingProjectionWriteResult

Accepted identities from one bounded projection persistence request.

Bases: BaseModel.

Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.

Name Type Default
submitted_records int required
stored_identities list[KnowledgeEmbeddingIdentity] Field(default_factory=list)
KnowledgeEmbeddingProjectionWriteResult.validate_submitted_records(value: int) -> int
KnowledgeEmbeddingProjectionWriteResult.copy_stored_identities(value) -> list[KnowledgeEmbeddingIdentity]
KnowledgeEmbeddingProjectionWriteResult.validate_stored_partition() -> KnowledgeEmbeddingProjectionWriteResult

Release source · Runtime guarantees · Capability guides

from cayu.storage import KnowledgeEmbeddingWorkerResult

Bounded outcome from consuming canonical changes into one embedding index.

Bases: BaseModel.

Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.

Name Type Default
consumer_id str required
worker_id str required
claimed_changes int required
acknowledged_changes int required
indexed_records int required
failed_records int required
removed_records int required
limit int required
processed_records int required
record_limit int required
KnowledgeEmbeddingWorkerResult.validate_identity(value: str, info) -> str
KnowledgeEmbeddingWorkerResult.validate_count(value: int, info) -> int
KnowledgeEmbeddingWorkerResult.validate_limit(value: int) -> int
KnowledgeEmbeddingWorkerResult.validate_record_limit(value: int) -> int
KnowledgeEmbeddingWorkerResult.validate_claims() -> KnowledgeEmbeddingWorkerResult

Release source · Runtime guarantees · Capability guides

from cayu.storage import KnowledgeIndexCoverage

Machine-readable semantic-index coverage for one search projection.

Bases: BaseModel.

Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.

Name Type Default
projection_type str required
embedding_model str required
dimensions int required
preprocessing_version str required
generator str required
generator_version str required
index_representation_version str required
eligible_records int required
ready_records int required
pending_records int required
failed_records int required
high_water_sequence int required
complete bool required
KnowledgeIndexCoverage.validate_space_identity(value: str, info) -> str
KnowledgeIndexCoverage.validate_dimensions(value: int) -> int
KnowledgeIndexCoverage.validate_counts(value: int, info) -> int
KnowledgeIndexCoverage.validate_high_water_sequence(value: int) -> int
KnowledgeIndexCoverage.validate_complete(value) -> bool
KnowledgeIndexCoverage.validate_complete_partition() -> KnowledgeIndexCoverage

Release source · Runtime guarantees · Capability guides

from cayu.storage import KnowledgeIndexReadiness

Immutable sequenced evidence of one derived-index state transition.

Bases: BaseModel.

Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.

Name Type Default
sequence int required
identity KnowledgeEmbeddingIdentity required
state KnowledgeIndexState required
attempt_id str required
failure_code str | None None
operation_id str required
published_at datetime required
KnowledgeIndexReadiness.validate_sequence(value: int) -> int
KnowledgeIndexReadiness.copy_identity(value: KnowledgeEmbeddingIdentity) -> KnowledgeEmbeddingIdentity
KnowledgeIndexReadiness.validate_required_identity(value: str, info) -> str
KnowledgeIndexReadiness.validate_failure_code(value: str | None) -> str | None
KnowledgeIndexReadiness.validate_published_at(value: datetime) -> datetime
KnowledgeIndexReadiness.validate_failure_state() -> KnowledgeIndexReadiness

Release source · Runtime guarantees · Capability guides

from cayu.storage import KnowledgeIndexReadinessBatch

Bounded ordered readiness events through one captured high-water mark.

Bases: BaseModel.

Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.

Name Type Default
readiness list[KnowledgeIndexReadiness] Field(default_factory=list)
after_sequence int 0
next_after_sequence int 0
high_water_sequence int 0
truncated bool False
limit int required
KnowledgeIndexReadinessBatch.copy_readiness(value: list[KnowledgeIndexReadiness]) -> list[KnowledgeIndexReadiness]
KnowledgeIndexReadinessBatch.validate_sequences(value: int, info) -> int
KnowledgeIndexReadinessBatch.validate_limit(value: int) -> int
KnowledgeIndexReadinessBatch.validate_truncated(value) -> bool
KnowledgeIndexReadinessBatch.validate_page() -> KnowledgeIndexReadinessBatch

Release source · Runtime guarantees · Capability guides

from cayu.storage import KnowledgeIndexReadinessConflict

A readiness publication conflicts with its identity or sequence fence.

Bases: RuntimeError.

KnowledgeIndexReadinessConflict.__init__(reason: str) -> None

Release source · Runtime guarantees · Capability guides

from cayu.storage import KnowledgeIndexReadinessUpdate

One requested state transition for an exact embedding identity.

Bases: BaseModel.

Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.

Name Type Default
identity KnowledgeEmbeddingIdentity required
state KnowledgeIndexState required
attempt_id str required
failure_code str | None None
KnowledgeIndexReadinessUpdate.copy_identity(value: KnowledgeEmbeddingIdentity) -> KnowledgeEmbeddingIdentity
KnowledgeIndexReadinessUpdate.validate_attempt_id(value: str) -> str
KnowledgeIndexReadinessUpdate.validate_failure_code(value: str | None) -> str | None
KnowledgeIndexReadinessUpdate.validate_failure_state() -> KnowledgeIndexReadinessUpdate

Release source · Runtime guarantees · Capability guides

from cayu.storage import KnowledgeIndexState

Publication state for one exact derived-index identity.

Bases: StrEnum.

Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.

Name Type Default
PENDING class attribute 'pending'
READY class attribute 'ready'
FAILED class attribute 'failed'

Release source · Runtime guarantees · Capability guides

from cayu.storage import MAX_KNOWLEDGE_EMBEDDING_DIMENSIONS
MAX_KNOWLEDGE_EMBEDDING_DIMENSIONS = 2 ** 31 - 1

Release source · Runtime guarantees · Capability guides

from cayu.storage import MAX_KNOWLEDGE_EMBEDDING_WORK_RECORD_LIMIT
MAX_KNOWLEDGE_EMBEDDING_WORK_RECORD_LIMIT = 10000

Release source · Runtime guarantees · Capability guides

from cayu.storage import MAX_KNOWLEDGE_INDEX_READINESS_LIMIT
MAX_KNOWLEDGE_INDEX_READINESS_LIMIT = 1000

Release source · Runtime guarantees · Capability guides