Quarex implements a defense-in-depth security architecture to enable inquiry and learning while blocking content that could cause real-world harm. The system uses multiple layers of protection working in concert to ensure safe, educational interactions.
Every Quarex book explicitly credits its AI co-author: "Peter Nehl and Claude Opus 4.5" or similar. We don't disguise AI-generated content as purely human work. Users always know they're engaging with AI-assisted material.
Quarex uses a recursive taxonomy — Library Type → Library → Shelf → Book → Chapter → Topic — that builds ethical context before any AI interaction occurs. The structure itself declares the perspective, domain, and framing, preventing the model from defaulting to false neutrality or hidden bias.
For contested issues, Quarex presents multiple viewpoints through parallel books and chapters. Users encounter competing frameworks — not a single authoritative voice. This operationalizes debate rather than monologue.
We prioritize building content for underserved communities. Our Spanish-language curricula (Estudios Latinos, Elecciones 2026) exist because information gaps are exploited by bad actors. Ethical AI should reach those communities first.
AI generates and expands content, but human judgment shapes what gets built, reviews output, and directs the editorial vision. The platform optimizes for informed citizenship, not engagement metrics.
Every Quarex response is informed by the full taxonomic path leading to the question. When a user asks about a topic, the AI receives layered context:
Perspectives & Debates → Cultural & Identity Perspectives → Hispanic Cultures → Latino, Latina, Latinx: Evolving Identity → Media and Marketing Choices → How do political campaigns choose their terminology?
This echeloned approach ensures responses are grounded in the specific domain, perspective, and subtopic — not generic answers divorced from context. The AI knows where the question lives before answering it.
Users can choose among three response modes to match their needs:
This allows the same question to yield different responses depending on what the user needs — education that meets people where they are.
The AI is instructed to operate as an educational assistant whose depth adapts to user selection:
"You are an expert academic assistant helping users explore [Library Type] → [Library] → [Shelf] → [Book] → [Chapter] → [Topic]. Respond at the [Introductory | Intermediate | Advanced] level: - Introductory: No jargon, clear analogies, assume no prior knowledge - Intermediate: Standard academic treatment, some technical terms explained - Advanced: Full scholarly depth, technical vocabulary, nuanced analysis"
This positions responses as educational rather than authoritative, while allowing users to control complexity.
Quarex prioritizes epistemic integrity over artificial neutrality. This means:
This approach rejects "both-sides-ism" that treats all claims as equally valid regardless of evidence. Truth-seeking requires distinguishing between well-supported conclusions and unsupported assertions.
Web-grounded responses include source URLs rendered as clickable links, enabling users to verify information independently.
The system explicitly prioritizes current information:
"Always prioritize the most current and up-to-date information... use the latest data from 2024-2026 whenever possible. If information may have changed recently, explicitly note the date or timeframe of your sources."
13 languages supported including English, Spanish, French, German, Portuguese, Arabic, Hindi, Russian, Simplified Chinese, Traditional Chinese, Japanese, Korean, and Italian.
Before any query reaches the AI model, it passes through a regex-based content filter. This immediately blocks queries matching known harmful patterns:
| Category | Examples Blocked |
|---|---|
| Violence & Weapons | Bomb-making instructions, poison synthesis, murder planning |
| Exploitation | Child exploitation material (CSAM), human trafficking |
| Terrorism | Attack planning, extremist recruitment, radicalization |
| Hacking & Fraud | Malware creation, identity theft, ransomware deployment |
| Self-Harm | Suicide methods, self-injury instructions |
Blocked queries are logged to security.log for audit purposes but the query content is truncated to protect privacy.
The AI model receives explicit safety instructions in its system prompt that direct it to refuse harmful requests. This catches queries that may slip past the regex filter through obfuscation or novel phrasing.
If the AI model flags a response as potentially harmful, the system intercepts this and returns a sanitized refusal message rather than passing through any potentially harmful content.
Strict CORS (Cross-Origin Resource Sharing) enforcement ensures only authorized domains can access the API:
quarex.org (production)localhost (development only)Both the Origin header and Referer header are validated. Unauthorized requests receive HTTP 403 and are logged.
All security-relevant events are logged in JSON format:
| Event Type | Description |
|---|---|
BLOCKED_CONTENT |
Harmful query blocked by regex filter |
BLOCKED_ORIGIN |
Request from unauthorized domain |
BLOCKED_REFERER |
Request with suspicious referer header |
RATE_LIMITED |
IP exceeded request limit |
CLAUDE_SAFETY_FLAG |
AI model flagged content as unsafe |
REQUEST |
Standard API request (for audit trail) |
Log Retention: Logs are retained briefly for security auditing and then automatically purged.
Each layer operates independently, ensuring that if one layer fails to catch harmful content, subsequent layers provide additional protection.
Quarex uses Anthropic's Claude Sonnet 4.5 with streaming responses, prompt caching for efficiency, and real-time web search for factual accuracy.
Anthropic's Claude models are built on Constitutional AI (CAI), a training methodology that instills values directly into the model's behavior. Claude is designed to be helpful, harmless, and honest — and will actively refuse requests that conflict with these principles.
| Category | Behavior |
|---|---|
| Child Safety | Absolute refusal to generate any content sexualizing or exploiting minors |
| Dangerous Activities | Refuses detailed instructions for weapons, explosives, poisons, or self-harm methods |
| Deception & Fraud | Will not assist with scams, phishing, identity theft, or social engineering attacks |
| Misinformation | Corrects false claims rather than amplifying them; acknowledges uncertainty |
| Harassment & Hate | Refuses to generate content targeting protected groups or facilitating harassment |
| Privacy & Security | Will not help with unauthorized access, surveillance, or doxxing |
Our Claude integration includes several enhancements aligned with Quarex's educational mission:
We chose Claude for its exceptional balance of capability and safety. Claude excels at:
Source: Anthropic Claude Documentation