{"path":"NexusReader.Domain/Entities/SemanticKnowledgeCache.cs","purpose":"Defines a domain entity that caches semantic extraction results (JSON payload, original text, model/prompt metadata) and stores an optional vector embedding for semantic search.","classification":{"role":"entity","layer":"domain","confidence":0.8,"evidence":["Domain/entity pattern","Domain path heuristic","Namespace NexusReader.Domain.Entities and folder path Entities","Class is a POCO with data annotations ([Key], [Required], [MaxLength]) used by an ORM","Uses Pgvector.Vector for embeddings (persistence of vector data)"]},"className":"SemanticKnowledgeCache","methods":[],"types":[{"name":"SemanticKnowledgeCache","kind":"entity","line":7,"purpose":"Represents a persisted cache entry for semantic knowledge including raw text, JSON result, model/prompt metadata, tenant scoping, and an optional vector embedding for semantic search.","fields":[{"name":"ContentHash","type":"string","required":true,"line":11,"description":"Primary key: hash of the content used as unique identifier (MaxLength 128)."},{"name":"JsonData","type":"string","required":true,"line":14,"description":"Serialized JSON result of the semantic extraction or analysis."},{"name":"OriginalText","type":"string","required":true,"line":17,"description":"Original source text used to produce the JSONData / embedding."},{"name":"ModelId","type":"string","required":true,"line":21,"description":"Identifier of the model used to generate the semantic data (MaxLength 50). Defaults to 'gemini-1.5-flash'."},{"name":"PromptVersion","type":"string","required":true,"line":25,"description":"Version of the prompt used for generation (MaxLength 10). Defaults to '1.0'."},{"name":"TenantId","type":"string","required":true,"line":29,"description":"Tenant or scope identifier for multi-tenant isolation (MaxLength 128)."},{"name":"Embedding","type":"Pgvector.Vector?","required":false,"line":32,"description":"Optional vector embedding used for semantic search (comment: 768 dimensions)."},{"name":"CreatedAt","type":"DateTime","required":true,"line":34,"description":"UTC timestamp when the cache entry was created; defaulted to DateTime.UtcNow."}]}],"serviceRegistrations":[],"startupActions":[],"dependencies":["NexusReader.Domain/Entities/SemanticKnowledgeCache.cs","Pgvector (NuGet package)","System.ComponentModel.DataAnnotations (for [Key],[Required],[MaxLength])"],"patterns":["ORM Entity","Repository (implied)","Vector embedding cache"],"domainConcepts":["Semantic cache","Embedding","Tenant scoping","Model and prompt versioning","Content hashing (cache key)"],"keyDetails":"Primary key is ContentHash (MaxLength 128). Embedding is stored via Pgvector.Vector (comment notes 768 dims). ModelId and PromptVersion have defaults and length constraints. CreatedAt defaults to UTC now.","orchestrationMethods":[],"typedContracts":[{"name":"SemanticKnowledgeCache","kind":"entity","line":7,"fieldCount":8,"evidencePaths":["NexusReader.Domain/Entities/SemanticKnowledgeCache.cs"]}],"persistenceInteractions":[],"externalInteractions":[],"evidenceAnchors":[{"kind":"typed-contract","label":"SemanticKnowledgeCache","line":7,"summary":"entity with 8 fields.","confidence":0.8,"evidencePaths":["NexusReader.Domain/Entities/SemanticKnowledgeCache.cs"]}]}