close
Skip to content

NeuralBlitz/epa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EPA: Ethical Prompt Architecture (Python Scaffold)

Overview

EPA is a composable, auditable meta-layer for integrating language models, designed to ensure ethical, context-rich, and traceable operations.
It embodies the Universal Flourishing Objective (ϕ₁) and supports modular extension for future ethical, technical, or operational requirements.

Core Modules

  • Contextualization Module: Injects roles, time, user input, constraints, memory state, and custom context into all prompts.
  • Ethical Gating Module: Prunes or allows actions based on ethical score (F) relative to threshold (θ₀).
  • Audit & Trace Module: Generates GoldenDAG, Trace ID, and Codex ID for every EPA invocation.
  • Qualia & PII Redaction Module: (Stub) Redacts or flags qualia-sensitive and PII content (extend as needed).
  • Memory & State Management: Allows dynamic updates to memory/context.
  • Extensibility Hooks: Supports adding constraints and custom context.

Example Usage

from epa.core import EPA

epa = EPA(system_role="Code Ethics Advisor")
prompt, ids = epa.build_epa("Refactor the code for efficiency.", {"project": "EPA Scaffold"})
print(prompt)
print(ids)

# Ethical gating example
F = 1.0  # Calculated ethical score
if not epa.ethical_gate(F, θ=0.5):
    raise PermissionError("Action pruned: does not meet Universal Flourishing Objective (ϕ₁).")

Extending EPA

  • Implement custom logic in redact_qualia_pii for advanced redaction.
  • Override/add modules for domain-specific constraints, memory, or ethics.

License


from setuptools import setup, find_packages

setup(
    name="epa",
    version="0.1.0",
    description="Ethical Prompt Architecture (EPA) Scaffold",
    author="NeuralBlitz",
    packages=find_packages(),
    install_requires=[],
    python_requires=">=3.7",
)

MIT License (or as specified by project owner)

Releases

No releases published

Packages

 
 
 

Contributors

Languages