Skip to content

Commit bf1ae59

Browse files
author
Arena AI Agent
committed
feat(l2): 🌍 introduce Semitic NLP expert for native Arabic dialectic reasoning
1 parent 0510a5c commit bf1ae59

2 files changed

Lines changed: 28 additions & 0 deletions

File tree

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
"""L2 Epistemic Synthesis Engine: Semitic NLP & Arabic Logic Expert."""
2+
from epistemic_forge.models import ProjectSpec, HegelianDialecticOutput
3+
from epistemic_forge.llm import generate_structured
4+
from typing import Dict, Any
5+
6+
def run_semitic_dialectic(spec: ProjectSpec, claims_bundle: Dict[str, Any]) -> Dict[str, Any]:
7+
"""Execute dialectic reasoning specifically optimized for Arabic/Semitic morphological logic."""
8+
thesis = spec.question
9+
10+
messages = [
11+
{"role": "system", "content": "You are a master of Semitic NLP, Arabic logic, and the Scattering Law. Your goal is to analyze the premise in its native Arabic/Semitic context, find morphological or logical blind spots, and synthesize a culturally and logically grounded truth."},
12+
{"role": "user", "content": f"الفرضية الأساسية (Thesis): {thesis}\n\nقم بنسف هذه الفرضية بالمنطق السامي/العربي، ثم استخرج الحقيقة المركبة."}
13+
]
14+
15+
# Using Claude 3.5 Sonnet or GPT-4o which are great at Arabic logic
16+
result: HegelianDialecticOutput = generate_structured(
17+
messages=messages,
18+
response_model=HegelianDialecticOutput,
19+
model="gpt-4o"
20+
)
21+
22+
return {
23+
"thesis": thesis,
24+
"antithesis_arabic": result.steelmanned_antithesis,
25+
"synthesis_arabic": result.synthesis_resolution,
26+
"open_questions": result.remaining_uncertainties,
27+
}

epistemic_forge/pipeline/l2_conductor.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
from epistemic_forge.experts import (
99
claim_expert,
10+
semitic_expert,
1011
dialectic_expert,
1112
freelance_expert,
1213
kaggle_expert,

0 commit comments

Comments
 (0)