StillMe Core is a modular framework for building transparent, validation-first AI systems. It emphasizes:
- Transparency: All decisions are logged and explainable
- Validation: Mandatory validation at every step
- Intellectual Humility: Honest about limitations and uncertainties
- Self-Improvement: Continuous learning from usage patterns
"We're building a framework, not just an app. Everything we build for StillMe today must be usable by other AI systems tomorrow."
stillme_core/
├── validation/ # Validation engine (19 validators, 7 layers)
├── rag/ # RAG (Retrieval-Augmented Generation) system
├── external_data/ # External data providers (weather, news, time)
├── learning/ # Continuous learning pipeline
├── postprocessing/ # Post-processing and quality improvement
├── monitoring/ # Unified metrics and monitoring
├── self_improvement/ # Self-improvement mechanisms
└── config/ # Configuration management
Purpose: Ensure response quality, reduce hallucinations, enforce transparency.
Key Components:
ValidationEngine: Orchestrates multiple validatorsValidator: Base class for all validators- 19 specialized validators organized into 7 layers (citation, confidence, evidence_overlap, etc.)
Design Principles:
- Modular: Each validator is independent
- Parallelizable: Validators can run concurrently
- Extensible: Easy to add new validators
- Observable: All validation decisions are logged
Flow:
User Query → ValidationEngine → [Validator1, Validator2, ...] → ValidationResult
Purpose: Retrieve relevant knowledge from vector database.
Key Components:
RAGRetrieval: Main retrieval interfaceChromaClient: Vector database clientEmbeddingService: Embedding generation
Features:
- Multi-tier retrieval (L0-L3 knowledge levels)
- Similarity-based filtering
- MMR (Maximal Marginal Relevance) for diversity
- Context quality assessment
Purpose: Fetch real-time data from external sources.
Key Components:
ExternalDataOrchestrator: Coordinates data fetchingExternalDataProvider: Base class for providers- Providers: Weather, News, Time, etc.
Features:
- Intent detection
- Rate limiting
- Caching
- Retry logic
Purpose: Continuously acquire and integrate new knowledge.
Key Components:
LearningPipeline: Abstract learning interfaceLearningScheduler: Automated learning cyclesContentCurator: Content filtering and prioritizationLearningFetcher: Abstract fetcher interface- Fetchers: RSS, arXiv, CrossRef, Wikipedia
Flow:
LearningScheduler → Fetch from Sources → ContentCurator → RAG System
Purpose: Improve response quality after generation.
Key Components:
PostProcessor: Abstract post-processing interfaceQualityEvaluator: Assess response qualityStyleSanitizer: Normalize styleRewriteLLM: Conditional rewritingPostProcessingOptimizer: Smart skip logic
Flow:
Generated Response → QualityEvaluator → [Rewrite if needed] → Final Response
Purpose: Unified metrics collection and monitoring.
Key Components:
UnifiedMetricsCollector: Centralized metrics collectionMetricCategory: Metric categories (VALIDATION, RAG, LEARNING, etc.)MetricRecord: Individual metric records
Features:
- Counters, gauges, histograms
- Persistent storage (JSONL)
- Category-based organization
Purpose: Analyze patterns and suggest improvements.
Key Components:
ImprovementEngine: Automated improvement cyclesFeedbackLoop: Connect validation → learningAnalyzer: Pattern analysis and knowledge gap detection
Flow:
Validation Results → Analyzer → Improvement Suggestions → Learning System
Purpose: Centralized, type-safe configuration.
Key Components:
BaseConfig: Base configuration classValidatorConfig: Validator-specific settings
Features:
- Environment variable support
- Type safety
- Easy testing with different configs
stillme_app/ (StillMe Application)
↓
stillme_core/
├── validation/ (independent)
├── rag/ (independent)
├── external_data/ (independent)
├── learning/ → rag/ (uses RAG to store knowledge)
├── postprocessing/ (independent)
├── monitoring/ (used by all)
├── self_improvement/ → validation/, learning/
└── config/ (used by all)
- Core (
stillme_core/): Generic, reusable framework logic - App (
stillme_app/orbackend/): Application-specific logic
- App depends on Core, not vice versa
- Core doesn't know about StillMe app specifics
- Core provides abstract interfaces (ABC/Protocol)
- App implements application-specific logic
- Core receives config from app (dependency injection)
- No hardcoded application-specific values
- During migration, adapters maintain old import paths
- No breaking changes for existing code
User Query
↓
External Data Detection → External Data Providers (if needed)
↓
RAG Retrieval → Context Documents
↓
LLM Generation → Response
↓
Validation Engine → Validation Results
↓
Post-Processing → Final Response
↓
Metrics Recording → UnifiedMetricsCollector
LearningScheduler (every N hours)
↓
Fetch from Sources (RSS, arXiv, etc.)
↓
ContentCurator → Filter & Prioritize
↓
RAG System → Add to Knowledge Base
↓
Metrics Recording → UnifiedMetricsCollector
Validation Results (accumulated)
↓
Analyzer → Pattern Analysis
↓
ImprovementEngine → Generate Suggestions
↓
FeedbackLoop → Update Learning Priorities
- Inherit from
Validatorbase class - Implement
validate()method - Register in
ValidationEngine
- Inherit from
LearningFetcherinterface - Implement
fetch()andget_source_name()methods - Add to
LearningScheduler
- Inherit from
ExternalDataProviderbase class - Implement
fetch()method - Register in
ExternalDataOrchestrator
- Inherit from
PostProcessorinterface - Implement
process()andevaluate_quality()methods - Integrate into post-processing pipeline
- Validation: Parallel execution of independent validators
- RAG: Caching of retrieval results
- Learning: Pre-filtering to reduce embedding costs
- Post-Processing: Smart skip logic to avoid unnecessary rewrites
- Unit Tests: Each component tested independently
- Integration Tests: Test component interactions
- End-to-End Tests: Test full pipeline
- Backward Compatibility Tests: Ensure old imports still work
- SDK Package: Package
stillme_coreas installable SDK - Metrics Dashboard: Visual dashboard for metrics
- Plugin System: Dynamic loading of validators/fetchers
- Distributed Mode: Support for distributed deployment