{"path":"NexusReader.Domain/Entities/SemanticKnowledgeCache.cs","purpose":"Defines a domain entity that persists cached semantic knowledge (original text, model/prompt metadata, JSON payload) and its vector embedding for semantic search.","classification":{"role":"entity","layer":"domain","confidence":0.9,"evidence":["Domain/entity pattern","Domain path heuristic","namespace NexusReader.Domain.Entities","class SemanticKnowledgeCache declared in Entities folder","uses data-annotation attributes ([Key], [Required], [MaxLength]) typical for ORM entities"]},"className":"SemanticKnowledgeCache","methods":[],"types":[{"name":"SemanticKnowledgeCache","kind":"entity","line":7,"purpose":"Represents a cached semantic artifact including original text, serialized JSON, model/prompt metadata, tenant scoping, and an optional vector embedding used for semantic search.","fields":[{"name":"ContentHash","type":"string","required":true,"line":11,"description":"Primary key / content fingerprint (MaxLength 128) used to deduplicate cache entries."},{"name":"JsonData","type":"string","required":true,"line":14,"description":"Serialized JSON payload stored alongside the cache entry."},{"name":"OriginalText","type":"string","required":true,"line":17,"description":"The original text content that was embedded / cached."},{"name":"ModelId","type":"string","required":true,"line":21,"description":"Identifier of the model used to produce the embedding (MaxLength 50). Default 'gemini-1.5-flash'."},{"name":"PromptVersion","type":"string","required":true,"line":25,"description":"Version of the prompt used when generating the cached material (MaxLength 10). Default '1.0'."},{"name":"TenantId","type":"string","required":true,"line":29,"description":"Tenant scoping identifier for multi-tenant data segregation (MaxLength 128)."},{"name":"Embedding","type":"Vector?","required":false,"line":32,"description":"Optional vector embedding (Pgvector.Vector) used for semantic search; comment notes 768 dimensions."},{"name":"CreatedAt","type":"DateTime","required":false,"line":34,"description":"Timestamp when the cache entry was created; defaulted to DateTime.UtcNow."}]}],"serviceRegistrations":[],"startupActions":[],"dependencies":["Pgvector (external package)","System.ComponentModel.DataAnnotations (framework)"],"patterns":["Entity","ORM-mapped model (EF Core style with data annotations)","Embedding cache"],"domainConcepts":["SemanticKnowledgeCache","Embedding","ModelId","PromptVersion","TenantId"],"keyDetails":"Entity stores deduplicated cached semantic artifacts keyed by ContentHash, includes model/prompt metadata, tenant scoping, JSON payload, optional Pgvector embedding (commented as 768 dims), and a UTC creation timestamp.","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"]}],"cacheMetadata":{"schemaVersion":2,"analysisVersion":"2026-05-23.cache-v1","contentChecksum":"b11a468239401df3d7a6cbfa2a6a26f0ad97f09313813aada85448e02f03b904","sourceByteSize":922,"analyzedAt":"2026-05-23T16:20:32.744Z","technology":"dotnet"}}