Skip to main content Accueil Créateurs adu2021 skillxiv governed-autonomy-drug-discovery
governed-autonomy-drug-discovery Balance LLM flexibility with domain rigor in scientific agents through dual-layer architecture. Enforce role-based access control and artifact-centric state management to prevent hallucinations, while preserving free-form reasoning for lower-risk tasks.
Aller à l'installation Skills Marketplace Découvrez et explorez les compétences IA créées par la communauté.
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Copier le promptAfficher les détails du prompt Une commande directe contourne le prompt de vérification. Examinez la source avant de l'exécuter.
npx skills add https://github.com/ADu2021/skillXiv --skill governed-autonomy-drug-discoveryLa commande reste sur une seule ligne. Faites défiler horizontalement pour la vérifier avant de la copier.
Vous préférez une copie locale ? Téléchargez les fichiers actuellement disponibles dans SkillsMP.
Télécharger Zip Téléchargement... Plus depuis ce dépôt meaningful-kebab-case-name Convert arXiv papers into ready-to-use agent skills using category-aware extraction. First classifies the paper into one or more of 11 research categories, then applies a specialized extraction pipeline for each category — because different types of papers produce different types of usable knowledge. A single paper can yield multiple skills if it spans categories. Use this skill whenever the user wants to turn a paper into a skill, extract practical techniques from research, build a skill library from papers, convert arXiv papers into reusable agent instructions, or batch-process multiple papers into skills. Also trigger when someone asks about extracting actionable knowledge from papers, making research practical for LLM agents, or systematically converting academic contributions into structured agent capabilities.
action-quantization-behavior-cloning Establish regret bounds for behavior cloning with discretized actions combining statistical error and quantization error terms. Prove smoothness requirements for safe quantizer design, show that learning-based quantizers fail these requirements, and propose model-based augmentation to reduce error dependence from H² to H.
adaptive-lora-personalized-ranks Dynamically allocate LoRA ranks per-layer during fine-tuning instead of using fixed uniform ranks. Learn optimal rank for each layer and subject via variational framework with discretized exponential distribution, reducing memory footprint while maintaining fidelity and text-alignment.
Métiers associés SOC
Basé sur la classification professionnelle SOC
name governed-autonomy-drug-discovery title Mozi: Governed Autonomy for Drug Discovery LLM Agents version 0.0.2 engine skillxiv-v0.0.2-claude-opus-4.6 license MIT url https://arxiv.org/abs/2603.03655 keywords ["Agentic Systems","Governed Autonomy","Drug Discovery","Scientific Reasoning","Workflow Management"] description Balance LLM flexibility with domain rigor in scientific agents through dual-layer architecture. Enforce role-based access control and artifact-centric state management to prevent hallucinations, while preserving free-form reasoning for lower-risk tasks.
Mozi: Governed Autonomy for Drug Discovery Agents
Fully autonomous LLM agents make costly errors in scientific workflows like drug discovery: they hallucinate about non-existent data, waste expensive computational resources, and propagate early mistakes through multi-stage pipelines. Mozi introduces governed autonomy : a dual-layer architecture separating reasoning (flexible) from execution (controlled). The system constrains agent behavior through role-based tool access, explicit state artifacts, and human-in-the-loop checkpoints at high-uncertainty decision boundaries.
The core insight is that scientific agents need dual modes: free-form reasoning for interpretation and planning, but strictly controlled execution for expensive or irreversible actions. This enables faster iteration on safe tasks while maintaining safety guardrails on risky ones.
Core Concept
Mozi implements three coordinated mechanisms:
Dual-Layer Architecture :
Control Plane (Layer A) : Hierarchical supervisor-worker system with role-based access control
Workflow Plane (Layer B) : Stateful skill graphs encoding canonical domain workflows
Hard-Coded Constraints : Role-based tool filtering prevents unauthorized access to expensive resources (computational, chemical reagents)
Artifact-Centric State : Synchronize unstructured reasoning with structured scientific artifacts to detect hallucinations
Architecture Overview
Input : Scientific task specification (drug discovery objective, constraints)
Control Plane : Supervisor agent assigns roles, monitors execution, enforces constraints
Workflow Plane : Skill graph with defined stages, data contracts, checkpoints
State Manager : Maintains both reasoning traces (flexible) and validated artifacts (strict)
Output : Executed workflow with decision audit trail and human checkpoints
Implementation Steps
Step 1: Design workflow with explicit stages and data contracts
Define scientific workflow as a DAG with strict data validation at each stage.
class WorkflowStage :
"""
Represents a single stage in a scientific workflow.
Enforces input/output contracts and checkpoints.
"""
def ( ):
.name = name
.description = description
.required_inputs = required_inputs
.output_schema = output_schema
.cost_estimate = cost_estimate
.requires_human_approval = requires_human_approval
( ):
input_name .required_inputs:
input_name artifacts:
ValueError( )
artifact = artifacts[input_name]
._validate_schema(artifact):
ValueError( )
( ):
(artifact, ) (artifact, )
( ):
.validate_inputs(artifacts)
reasoning_prompt =
action = agent.generate(reasoning_prompt)
output = ._apply_action(action, artifacts)
._validate_output(output):
ValueError( )
output
( ):
( ):
action
workflow_stages = [
WorkflowStage(
name= ,
description= ,
required_inputs=[ ],
output_schema={ : , : { : { : }}},
cost_estimate= ,
requires_human_approval=
),
WorkflowStage(
name= ,
description= ,
required_inputs=[ , ],
output_schema={ : , : { : }},
cost_estimate= ,
requires_human_approval=
),
WorkflowStage(
name= ,
description= ,
required_inputs=[ ],
output_schema={ : },
cost_estimate= ,
requires_human_approval=
),
WorkflowStage(
name= ,
description= ,
required_inputs=[ ],
output_schema={ : },
cost_estimate= ,
requires_human_approval=
)
]
__init__
self, name, description, required_inputs, output_schema,
cost_estimate, requires_human_approval=False
"""
name: stage identifier
required_inputs: list of required input artifact names
output_schema: JSON schema for output validation
cost_estimate: computational cost (for role-based filtering)
requires_human_approval: flag for high-risk stages
"""
self
self
self
self
self
self
def
validate_inputs
self, artifacts
"""Verify required inputs exist and conform to schema."""
for
in
self
if
not
in
raise
f"Missing required input: {input_name} "
if
not
self
raise
f"Input {input_name} violates schema"
return
True
def
_validate_schema
self, artifact
"""Validate artifact against expected schema."""
return
isinstance
dict
or
isinstance
str
def
execute
self, agent, artifacts
"""Execute stage with agent reasoning + constraint enforcement."""
self
f"""
Stage: {self.name}
Description: {self.description}
Available artifacts:
{' ' .join(self.required_inputs)}
Generate next action:
"""
self
if
not
self
raise
f"Output violates schema for {self.name} "
return
def
_validate_output
self, output
"""Validate execution output against output_schema."""
return
True
def
_apply_action
self, action, artifacts
"""Apply agent action and return output."""
return
'target_identification'
'Identify biological targets for drug'
'disease_context'
'type'
'object'
'properties'
'target_id'
'type'
'string'
1.0
False
'molecular_design'
'Design candidate molecules'
'target_id'
'design_constraints'
'type'
'array'
'items'
'type'
'string'
10.0
False
'property_prediction'
'Predict ADMET properties (expensive)'
'candidate_molecules'
'type'
'object'
100.0
True
'synthesis_planning'
'Plan synthesis routes'
'top_candidates'
'type'
'object'
50.0
False
Step 2: Implement role-based access control
Define agent roles and restrict tool access based on role permissions.
class AgentRole :
"""Role definition with tool permissions."""
def __init__ (self, role_name, allowed_tools, cost_budget ):
"""
role_name: 'planner', 'designer', 'analyst'
allowed_tools: list of tool names this role can call
cost_budget: max computational cost allowed
"""
self .role_name = role_name
self .allowed_tools = set (allowed_tools)
self .cost_budget = cost_budget
self .cost_used = 0.0
def can_execute_stage (self, stage ):
"""Check if role has permission to execute this stage."""
stage_cost = stage.cost_estimate
if self .cost_used + stage_cost > self .cost_budget:
return False , f"Exceeds cost budget: {stage_cost} > {self.cost_budget - self.cost_used} "
required_tools = self ._extract_tools_from_stage(stage)
for tool in required_tools:
if tool not in self .allowed_tools:
return False , f"Tool not allowed for {self.role_name} : {tool} "
return True , "Permission granted"
def _extract_tools_from_stage (self, stage ):
"""Extract required tools from stage description."""
return ['search' , 'compute' ]
def charge_cost (self, stage ):
"""Track cumulative cost."""
self .cost_used += stage.cost_estimate
ROLES = {
'planner' : AgentRole(
'planner' ,
allowed_tools=['search' , 'reasoning' , 'literature_search' ],
cost_budget=100.0
),
'designer' : AgentRole(
'designer' ,
allowed_tools=['molecular_design' , 'property_prediction' , 'optimization' ],
cost_budget=500.0
),
'analyst' : AgentRole(
'analyst' ,
allowed_tools=['data_analysis' , 'visualization' , 'reporting' ],
cost_budget=50.0
)
}
Step 3: Implement artifact-centric state management
Maintain synchronized reasoning traces and validated artifacts to detect hallucinations.
class ArtifactStore :
"""
Manages both reasoning traces (unstructured, flexible)
and artifacts (structured, validated).
"""
def __init__ (self ):
self .reasoning_traces = []
self .artifacts = {}
self .artifact_history = {}
def add_reasoning_trace (self, trace_text ):
"""Log agent reasoning (flexible, unstructured)."""
self .reasoning_traces.append({
'timestamp' : time.time(),
'content' : trace_text
})
def add_artifact (self, artifact_name, artifact_data, validation_schema ):
"""
Create validated artifact (structured).
Raises error if data doesn't conform to schema.
"""
if not self ._validate_against_schema(artifact_data, validation_schema):
raise ValueError(f"Artifact {artifact_name} violates schema" )
if artifact_name not in self .artifact_history:
self .artifact_history[artifact_name] = []
self .artifacts[artifact_name] = artifact_data
self .artifact_history[artifact_name].append({
'timestamp' : time.time(),
'value' : artifact_data,
'trace_reference' : len (self .reasoning_traces) - 1
})
def detect_hallucination (self ):
"""
Detect hallucinations by checking for reasoning about
non-existent artifacts.
"""
artifacts_mentioned = self ._extract_artifact_refs_from_traces()
for mentioned_artifact in artifacts_mentioned:
if mentioned_artifact not in self .artifacts:
return True , f"Hallucination detected: {mentioned_artifact} not in store"
return False , "No hallucinations detected"
def _extract_artifact_refs_from_traces (self ):
"""Extract artifact references from reasoning traces."""
mentioned = set ()
for trace in self .reasoning_traces[-10 :]:
matches = re.findall(r'\[([a-z_]+)\]' , trace['content' ].lower())
mentioned.update(matches)
return mentioned
def _validate_against_schema (self, data, schema ):
"""Validate data against JSON schema."""
try :
jsonschema.validate(instance=data, schema=schema)
return True
except jsonschema.exceptions.ValidationError:
return False
def get_synchronized_state (self ):
"""Return state consistent between reasoning and artifacts."""
return {
'reasoning_trace_length' : len (self .reasoning_traces),
'artifact_count' : len (self .artifacts),
'artifacts' : self .artifacts,
'hallucination_check' : self .detect_hallucination()
}
Step 4: Implement supervisor agent with approval checkpoints
Create supervisor that monitors execution and decides when to escalate for human approval.
class SupervisorAgent :
"""
Supervisor that orchestrates worker agents and enforces governance.
"""
def __init__ (self, workflow_stages, roles, artifact_store ):
self .workflow = workflow_stages
self .roles = roles
self .artifacts = artifact_store
self .approvals = []
def execute_workflow (self, task_spec, worker_agent, human_handler ):
"""
Execute workflow with governance:
1. Assign worker role based on task
2. Check permissions before each stage
3. Request human approval for risky stages
4. Execute and validate
"""
worker_role = self ._assign_role(task_spec)
for stage in self .workflow:
can_execute, reason = worker_role.can_execute_stage(stage)
if not can_execute:
print (f"Permission denied: {reason} " )
continue
if stage.requires_human_approval:
artifacts_state = self .artifacts.get_synchronized_state()
approval = human_handler.request_approval(
stage=stage,
artifacts=artifacts_state,
reasoning_log=self .artifacts.reasoning_traces[-5 :]
)
if not approval['approved' ]:
print (f"Stage {stage.name} rejected by human reviewer" )
continue
self .approvals.append(approval)
try :
output = stage.execute(worker_agent, self .artifacts.artifacts)
self .artifacts.add_artifact(
f"{stage.name} _output" ,
output,
stage.output_schema
)
worker_role.charge_cost(stage)
except Exception as e:
print (f"Stage {stage.name} failed: {e} " )
return False
return True
def _assign_role (self, task_spec ):
"""Assign worker role based on task requirements."""
if 'molecule' in task_spec.lower() or 'design' in task_spec.lower():
return self .roles['designer' ]
elif 'plan' in task_spec.lower():
return self .roles['planner' ]
else :
return self .roles['analyst' ]
Step 5: Integration with LLM agents
Connect governance components to LLM-based agent execution.
def run_drug_discovery_agent (task_spec, human_handler=None ):
"""
Execute drug discovery workflow with governed autonomy.
"""
artifact_store = ArtifactStore()
supervisor = SupervisorAgent(
workflow_stages=workflow_stages,
roles=ROLES,
artifact_store=artifact_store
)
worker_agent = LLMAgent()
success = supervisor.execute_workflow(
task_spec,
worker_agent,
human_handler or DummyHumanHandler()
)
return {
'success' : success,
'artifacts' : artifact_store.artifacts,
'reasoning_trace' : artifact_store.reasoning_traces,
'approvals' : supervisor.approvals,
'hallucination_check' : artifact_store.detect_hallucination()
}
Practical Guidance Hyperparameter Selection:
Cost budgets : Scale with agent capability (advanced agents: 10x budget)
Human approval threshold : Trigger on cost > 50, or novel molecule types
Hallucination detection threshold : Flag any mention of non-existent artifact
Stage timeout : 5-10 minutes per stage; escalate on timeout
High-stakes scientific workflows (drug discovery, materials science)
Multi-stage pipelines where early errors compound
Settings with expensive computational resources
Scenarios requiring audit trails and human oversight
Low-risk tasks (question answering, text generation)
Real-time systems where human approval latency is unacceptable
Single-stage workflows
Domains where all reasoning can be safely automated
Over-restrictive permissions : Too many approval barriers slow iteration. Calibrate thresholds based on error rates.
Artifact validation too strict : False rejections block valid workflows. Validate schema pragmatically.
Hallucination detection false positives : Filter mentions that are clearly hypothetical. Use allowlist of known hallucination patterns.
Role exhaustion : If agents quickly deplete cost budget, re-allocate or add higher-capacity roles.
Reference