Expand description
Core data models used throughout Context Harness.
These types represent the documents, chunks, and search results that flow through the ingestion and retrieval pipeline. The data lifecycle is:
Connector → SourceItem → normalize() → Document → chunk() → Chunk
↓
embed() → Embedding
↓
search() → SearchResult§Type Relationships
- A
SourceItemis produced by a connector (filesystem, Git, S3) before any normalization or storage. - A
Documentis the normalized, stored representation with a deduplication hash and Unix timestamps. - A
Chunkis a segment of a document’s body, stored alongside a content hash for embedding staleness detection. - A
SearchResultis returned by the query engine with a relevance score and snippet.
Structs§
- Chunk
- A chunk of a document’s body text, stored in the
chunkstable. - Document
- Normalized document stored in the
documentstable. - Search
Result - A search result returned from the query engine.
- Source
Item - Raw item produced by a connector before normalization.