Skip to main content

Module system_prompt

Module system_prompt 

Source
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§

ArchiveCandidate
A candidate for memory archival.
ConsolidationAnalysis
Consolidation analysis response.
ContradictionAssessment
Contradiction assessment for captured content.
ContradictionDetail
Details about a detected contradiction.
ExtendedCaptureAnalysis
Extended capture analysis response with security and contradiction assessment.
ExtendedSearchIntent
Enhanced search intent response with namespace weights.
MergeCandidate
A candidate pair for memory merging.
SecurityAssessment
Security assessment for captured content.

Enums§

OperationMode
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.