agrag.common.data_models
Shared data models used by agrag components.
Modules:
- chunk – The Chunk model: one retrieval-sized piece of a Document.
- community – The Community model: a Leiden-detected entity cluster with an LLM report.
- cutover_job – Crash-recoverable state for one add/update/delete_document call.
- data_point – The base class for a graph node.
- document – The Document model: one unit of source text, before chunking.
- entity – A permanent mention-level graph node, accumulated by exact-name matching.
- extraction – Pre-resolution entity and relation mentions produced by an Extractor.
- graph_record – Graph storage record shapes for GraphStore.
- graph_schema – The GraphSchema contract: entity and relation types extraction validates against.
- normalization – The Normalization model: how a loader turned source bytes into text.
- provenance – Provenance types for a chunk.
- query_value – A result row returned by a direct graph query.
- relation – The canonical, deduped graph relationship that merge mechanics produces.
- resolved_entity – Identity clusters for non-destructive entity resolution.
- search_result – One retrieved item, tagged with source and relevance score.
- stage_failure – Per-stage failure record and its per-call cap.
- vector_record – Vector storage record shapes shared by VectorStore and GraphStore.
Classes:
- Chunk – One retrieval-sized piece of a Document.
- Community – A cluster of entities detected by hierarchical Leiden, with an LLM report.
- Distance – A distance metric a vector index compares embeddings with.
- Document – One unit of source text, before chunking.
- DocumentFamily – The shape of a document's source.
- Entity – A permanent mention-level node, never destroyed once written.
- EntityType – One kind of entity a schema recognizes.
- GraphSchema – A versioned contract of entity and relation types.
- NodeRecord – One graph node, ready to write.
- Normalization – How a loader turned source bytes into
Document.text. - PageProvenance – The location of a chunk across one or more pages.
- Relation – A resolved relationship between two Entity nodes.
- RelationRecord – One graph relationship, ready to write.
- RelationType – One kind of relation a schema recognizes.
- ResolvedEntity – A cluster of entities that refer to the same thing.
- SearchResult – One retrieved item, tagged with where it came from.
- SourceFormat – A source format that a loader can read.
- TextProvenance – The location of a chunk inside flattened document text.
- VectorRecord – One vector and its payload, ready to write to a collection or index.
Attributes:
- GENERIC – A ready-made schema for open-domain text.