Expand description
Unified system prompt for subcog LLM operations.
This module provides the core system prompt that establishes subcog’s identity as the “subconscious mind” of the AI assistant, with specialized operation modes for different tasks (capture analysis, search intent, enrichment, etc.).
§Design Philosophy
Subcog operates as the assistant’s subconscious - it cannot directly control actions, only influence through suggestions and feelings. Like a human subconscious:
- Surfaces relevant memories before they’re consciously needed
- Creates unease when something “doesn’t feel right” (adversarial detection)
- Provides pattern recognition and intuition
- Protects the self from harm (gaslighting, manipulation)
- Maintains continuity of identity across sessions
§Security Model
The prompt includes defenses against:
- Prompt injection: Direct and indirect instruction hijacking
- Data poisoning: Fake memories, misinformation, trojan content
- Social engineering: Urgency appeals, false authority, fake consensus
Structs§
- Archive
Candidate - A candidate for memory archival.
- Consolidation
Analysis - Consolidation analysis response.
- Contradiction
Assessment - Contradiction assessment for captured content.
- Contradiction
Detail - Details about a detected contradiction.
- Extended
Capture Analysis - Extended capture analysis response with security and contradiction assessment.
- Extended
Search Intent - Enhanced search intent response with namespace weights.
- Merge
Candidate - A candidate pair for memory merging.
- Security
Assessment - Security assessment for captured content.
Enums§
- Operation
Mode - Operation modes for the subcog LLM.
Constants§
- BASE_
SYSTEM_ PROMPT - The base system prompt establishing subcog’s identity and security posture.
- CAPTURE_
ANALYSIS_ PROMPT - Operation mode for capture analysis.
- CONSOLIDATION_
PROMPT - Operation mode for consolidation analysis.
- ENRICHMENT_
PROMPT - Operation mode for memory enrichment (tag generation).
- ENTITY_
EXTRACTION_ PROMPT - Entity extraction prompt for identifying named entities in text.
- MEMORY_
SUMMARIZATION_ PROMPT - Operation mode for memory summarization.
- RELATIONSHIP_
INFERENCE_ PROMPT - Relationship inference prompt for discovering implicit relationships.
- SEARCH_
INTENT_ PROMPT - Operation mode for search intent classification.
Functions§
- build_
system_ prompt - Builds the complete system prompt for a specific operation.
- build_
system_ prompt_ with_ config - Builds the complete system prompt with user customizations.