Multi-Paradigm Problem Solving

DOCTRINE

Multi-Paradigm Problem Solving

Overview

Multi-Paradigm Problem Solving enables platform agents to apply multiple problem-solving paradigms to complex challenges. Rather than constraining agents to a single computational model, the Prismatic Platform embraces the insight that different problem domains respond optimally to different computational paradigms. Agents combine functional programming patterns, logical reasoning, heuristic approaches, graph-based analysis, and formal verification methods to achieve solutions that no single paradigm could deliver alone.

This capability is foundational to the platform's approach to Intelligence Synthesis, where real-world problems rarely conform to a single analytical model. A compliance assessment, for instance, may require functional data transformations, logical rule evaluation, graph traversal for entity relationships, and formal proofs for regulatory completeness -- all within a single investigation workflow.

The multi-paradigm approach is not eclecticism. It is a structured capability where paradigm selection is governed by problem characteristics, agent tier authority, and quality requirements. Each paradigm has defined strengths, known limitations, and measurable performance characteristics. The platform's paradigm selection protocol matches problems to paradigms based on empirical evidence, not arbitrary preference.

Paradigm Catalog

The platform supports six distinct problem-solving paradigms, each implemented through Elixir/OTP's capabilities and extended through specialized libraries and formal tools.

Functional Programming

The platform's Elixir/OTP foundation makes functional programming the default paradigm. Pure functions, immutable data structures, and composable transformations provide the backbone for data processing pipelines.

Functional PatternPlatform ApplicationBenefit
Pure TransformationsOSINT data normalization, entity extractionDeterministic, testable, cacheable
Pipeline CompositionMulti-stage analysis workflowsEach stage independent and replaceable
Pattern MatchingProtocol dispatch, error handlingExhaustive case coverage at compile time
Immutable DataEvidence chain preservationTamper-proof audit trails
Higher-Order FunctionsAgent capability compositionDynamic behavior assembly
# Functional pipeline for OSINT entity enrichment
defmodule PrismaticOsint.EntityEnrichment do
  @moduledoc """
  Pure functional pipeline for entity enrichment.
  Each stage is a pure transformation with no side effects.
  """

  @spec enrich(entity()) :: {:ok, enriched_entity()} | {:error, term()}
  def enrich(entity) do
    entity
    |> normalize_identifiers()
    |> resolve_aliases()
    |> enrich_from_registries()
    |> score_risk_factors()
    |> validate_through_trinity_gate()
  end

  defp normalize_identifiers(%{identifiers: ids} = entity) do
    normalized = Enum.map(ids, &Identifier.normalize/1)
    %{entity | identifiers: normalized}
  end

  defp score_risk_factors(entity) do
    risk_score =
      entity.signals
      |> Enum.map(&Signal.risk_weight/1)
      |> Enum.sum()
      |> normalize_score()

    Map.put(entity, :risk_score, risk_score)
  end
end

OTP Concurrency Patterns

OTP provides the concurrency paradigm through lightweight processes, message passing, and supervision trees. This paradigm excels at problems requiring parallel execution, fault isolation, and stateful coordination.

OTP PatternPlatform ApplicationBenefit
GenServerAgent state management, rate limitersControlled state with crash recovery
SupervisorFault-tolerant agent hierarchiesAutomatic restart on failure
TaskParallel OSINT source queriesConcurrent execution with timeouts
GenStage/BroadwayHigh-throughput data ingestionBackpressure-managed pipelines
DynamicSupervisorOn-demand investigation workersElastic resource allocation
# Parallel OSINT collection with timeout and fault isolation
defmodule PrismaticOsint.ParallelCollector do
  @moduledoc """
  Concurrent data collection across multiple OSINT sources.
  Uses Task.async_stream for parallel execution with timeout.
  """

  @timeout_ms 30_000

  @spec collect(list(source()), query()) :: list(result())
  def collect(sources, query) do
    sources
    |> Task.async_stream(
      fn source -> source.adapter.fetch(query) end,
      max_concurrency: 10,
      timeout: @timeout_ms,
      on_timeout: :kill_task
    )
    |> Enum.reduce([], fn
      {:ok, {:ok, data}}, acc -> [data | acc]
      {:ok, {:error, _reason}}, acc -> acc
      {:exit, _reason}, acc -> acc
    end)
    |> Enum.reverse()
  end
end

Graph-Based Reasoning

Entity relationships, dependency chains, and knowledge networks require graph-based reasoning. The platform uses KuzuDB for persistent graph queries and in-memory graph algorithms for real-time analysis.

Graph TechniquePlatform ApplicationBenefit
TraversalEntity relationship discoveryMulti-hop connection analysis
CentralityKey entity identification in networksInfluence and risk propagation modeling
Community DetectionCluster identification in corporate structuresHidden relationship exposure
Shortest PathConnection chain analysisMinimum-hop entity linking
Cycle DetectionCircular ownership identificationFraud and evasion pattern detection

Formal Verification

The White Team agents employ formal verification through Lean4 theorem proving, property-based testing, and contract validation. This paradigm provides mathematical certainty where heuristic approaches offer only probabilistic confidence.

Formal MethodPlatform ApplicationGuarantee Level
Lean4 ProofsTrinity Gate Layer 3 (Formal Necessity)Mathematical certainty
Property-Based TestingAdapter contract complianceExhaustive input space coverage
Typespec + DialyzerType safety across modulesStatic type verification
Contract TestingStorage adapter behaviorInterface compliance proof
Invariant ProofsNABLA Axioms enforcementEpistemic correctness

Epistemic Reasoning

NABLA Infinity provides the epistemic paradigm where agents reason about uncertainty, confidence, and belief revision. This paradigm governs how the platform handles incomplete or contradictory information.

Epistemic PatternPlatform ApplicationOutcome
Confidence ScoringIntelligence assessment reliabilityCalibrated uncertainty quantification
Belief GraphKnowledge network representationTraceable reasoning chains
Contradiction PreservationConflicting intelligence handlingNo premature resolution of ambiguity
Signal PluralityMulti-source corroborationMinimum evidence thresholds enforced
Time DecayTemporal relevance weightingStale intelligence automatically discounted

Heuristic Pattern Recognition

For problems where formal methods are impractical and pure functional approaches lack domain knowledge, heuristic pattern recognition applies learned patterns from historical data to current situations.

Heuristic MethodPlatform ApplicationAccuracy
Risk Scoring ModelsEntity risk assessment85-92%
Anomaly DetectionFinancial transaction analysis88-95%
Behavioral ProfilingAgent performance baseline90-97%
Historical CorrelationThreat pattern matching82-90%

Paradigm Selection Protocol

The platform does not randomly apply paradigms. A structured selection protocol matches problem characteristics to optimal paradigm combinations.

Problem Input --> Complexity Assessment --> Paradigm Selection --> Execute --> Validate
     |                  |                       |                   |           |
  Classify         Measure              Pick optimal          Apply      Trinity
  domain          constraints           approach(es)        solution      Gate

Selection Criteria

Problem CharacteristicPrimary ParadigmSupporting Paradigms
Data transformationFunctionalOTP (parallelism)
Entity relationshipsGraphEpistemic (confidence)
Regulatory complianceFormalLogical (rules)
Uncertainty managementEpistemicFunctional (composition)
Real-time processingOTPFunctional (purity)
Pattern detectionHeuristicGraph (structure), Epistemic (scoring)
Proof obligationsFormalLogical (inference)

Combined Paradigm Example

A typical EASM security assessment demonstrates multi-paradigm synergy.

PhaseParadigmOperationOutput
1FunctionalTransform raw scan data into normalized asset recordsCanonical asset inventory
2OTPParallel discovery across DNS, certificates, ports, cloudRaw discovery data
3GraphMap relationships between discovered assets and entitiesAsset relationship graph
4EpistemicScore findings with NABLA-compliant confidence levelsCalibrated risk scores
5FormalVerify Compliance claims against NIS2 requirementsFormal compliance proof
6HeuristicApply pattern-based risk scoring from historical dataComparative risk assessment

Agent Tier Integration

Paradigm availability is governed by the AIAD Standard tier system, ensuring that complex multi-paradigm operations are coordinated by appropriately authorized agents.

Agent TierAvailable ParadigmsAuthority
L1 (Tactical)Functional, OTPSingle-paradigm execution
L2 (Operational)Functional, OTP, HeuristicDual-paradigm composition
L3 (Strategic)All paradigmsFull multi-paradigm orchestration
L4 (Specialist)Domain-specific subsetDeep single-paradigm expertise

L3 agents serve as orchestrators, decomposing complex problems into paradigm-specific sub-tasks and delegating to L1/L2 agents with the appropriate specialization. This ensures that multi-paradigm operations maintain coherent coordination while leveraging specialized execution at each step.

Quality Enforcement

Every paradigm application passes through the platform's quality infrastructure.

Quality LayerParadigm ValidationEnforcement
Quality GatesCompilation, Credo, Dialyzer, test coverageBLOCKING
Trinity GateStructural, logical, formal verificationBLOCKING for epistemic output
NO MERCYZero tolerance for incomplete paradigm applicationBLOCKING
NO DOUBTSEvidence-based paradigm selection with documented rationaleBLOCKING
NABLA AxiomsEpistemic paradigm axiom complianceBLOCKING for epistemic operations

Performance and Metrics

MetricCurrent ValueTarget
Paradigms supported66
Multi-paradigm operations/day500+Growing
Paradigm selection accuracy94%+97%
Cross-paradigm integration latency< 100ms< 50ms
Single-paradigm fallback rate< 5%< 2%
Formal verification coverageL1-L4 completeL5 in progress

Configuration

Paradigm selection behavior and availability can be configured per agent tier and per domain context.

# config/config.exs
config :prismatic_agents, PrismaticAgents.ParadigmSelector,
  default_paradigm: :functional,
  max_paradigms_per_operation: 4,
  formal_verification_enabled: true,
  heuristic_confidence_floor: 0.7,
  paradigm_timeout_ms: 30_000,
  selection_strategy: :evidence_based

config :prismatic_agents, PrismaticAgents.ParadigmMonitor,
  track_selection_accuracy: true,
  report_interval: :timer.minutes(15),
  alert_on_fallback: true,
  performance_baseline_window: :timer.hours(24)
Configuration KeyDefaultDescription
default_paradigm:functionalFallback paradigm when selection is ambiguous
max_paradigms_per_operation4Maximum concurrent paradigms in single operation
formal_verification_enabledtrueWhether Lean4 formal proofs are available
heuristic_confidence_floor0.7Minimum confidence for heuristic pattern matches
paradigm_timeout_ms30,000Maximum execution time per paradigm phase
selection_strategy:evidence_basedStrategy for paradigm selection (:evidence_based, :tier_default)

Integration


Connect & Contribute

Created by Tomáš Korcak (korczis) | Open Source under GHL