The Curated Daily
← Back to the archiveDispatch · 6 min read
Dispatch

Specsmaxxing – On overcoming AI psychosis, and why I write specs in YAML

By the editors·Monday, May 4, 2026·6 min read
A laptop screen showing a code editor with visible programming code in a dimly lit environment.
Photograph by Daniil Komov · Pexels

The financial world is in the throes of an AI revolution. From algorithmic trading to fraud detection and robo-advisors, artificial intelligence is rapidly reshaping the landscape. But alongside the excitement and potential benefits, a creeping anxiety is taking hold – what some are calling “AI psychosis.” It's not a clinical diagnosis, but a very real feeling of losing control, of systems becoming opaque and unpredictable, and of being at the mercy of algorithms we don't fully understand.

This article delves into this growing unease, exploring why it's particularly acute in finance, and presents a practical, surprisingly effective antidote: rigorous specification writing, specifically utilizing YAML as a specification language. It's a technique I’ve adopted, and one I believe is crucial for anyone building or deploying AI systems in a financial context. It's a process I call "Specsmaxxing" - aggressively defining every detail.

The Rise of AI Psychosis in Finance

“AI psychosis” isn’t about fearing sentient robots taking over. It’s a more subtle, insidious fear born from lack of understanding and loss of agency. In finance, this manifests in several ways:

  • Black Box Algorithms: Complex machine learning models, particularly deep neural networks, are often "black boxes." We know what goes in (data) and what comes out (predictions), but the how remains largely hidden. This lack of transparency is a major issue in a heavily regulated industry like finance.
  • Model Drift & Unexpected Behavior: Models trained on historical data can degrade over time as market conditions change (model drift). Unexpected behaviours can emerge, leading to erroneous trades, inaccurate risk assessments, or biased loan approvals.
  • Automation Bias: A tendency to over-rely on AI-driven outputs, even when they are demonstrably wrong. This is particularly dangerous in high-stakes financial decisions.
  • The Speed of Change: AI is evolving at an astonishing pace. Keeping up with the latest advancements and understanding their implications is a constant challenge.
  • Increased System Complexity: Modern financial systems are already incredibly complex. Adding layers of AI amplifies this complexity, making it harder to identify and mitigate potential risks.

These factors contribute to a sense of helplessness. If you can't understand why a system is making a certain decision, how can you trust it? How can you be accountable for its outcomes? This isn’t just a philosophical concern; it's a compliance, regulatory, and ultimately, a business risk. Fines, reputational damage, and systemic instability are all potential consequences.

Why YAML? The Power of Explicit Specifications

The solution, or at least a significant part of it, lies in a return to fundamentals: explicit specification. Before writing a single line of code, before training a model, you need to meticulously define exactly what the system should do, how it should behave, and under what conditions.

This is where YAML (YAML Ain't Markup Language) comes in.

Why YAML, specifically? Several reasons:

  • Human-Readable: YAML is designed to be easily read and understood by humans. Its simple syntax, using indentation instead of brackets or tags, makes it much more accessible than alternatives like XML or JSON. This is critical for collaboration between data scientists, engineers, and business stakeholders.
  • Data-Oriented: YAML excels at representing data structures, making it ideal for defining the inputs, outputs, and logic of financial models and algorithms.
  • Version Control Friendly: YAML files are plain text, making them easily trackable with version control systems like Git. This provides a clear audit trail of changes and allows you to revert to previous versions if necessary.
  • Widely Supported: YAML parsers are available for virtually every programming language, ensuring seamless integration with your existing tech stack.
  • Forces Rigor: The very act of translating a business requirement into a detailed YAML specification forces you to think through all the edge cases and potential pitfalls.

Building Specs with YAML: A Finance Example

Let's illustrate with a simplified example: a rule for flagging potentially fraudulent credit card transactions. Instead of directly coding this logic, let's define it in YAML:

```yaml

rule_name: "High Value Transaction Alert" description: "Flags transactions exceeding a certain amount or occurring in unusual locations." threshold_amount: 500 # USD location_distance_km: 500 # Distance from usual transaction location usual_location: latitude: 34.0522 longitude: -118.2437 alert_level: "High" conditions:

  • type: "amount" operator: ">" value: "$threshold_amount"
  • type: "location" operator: "distance_from" value: "$usual_location" distance: "$location_distance_km" actions:
  • type: "log_alert" message: "Potential fraud: High value transaction detected."
  • type: "send_notification" recipient: "fraud_team@example.com"

This YAML clearly defines:

  • The rule’s purpose and parameters.
  • Specific thresholds (amount, distance).
  • The location to which distance is calculated.
  • The actions to be taken when the rule is triggered.

Notice how using variables ($threshold_amount, $usual_location, etc.) makes the specification more flexible and reusable. A system could then read this YAML file and automatically generate the corresponding code or configuration for a fraud detection engine. https://example.com/ could provide a good text editor for working with YAML files.

Specsmaxxing: Beyond the Basics

Specsmaxxing isn’t just about writing YAML files; it's about a mindset. It's about prioritizing clarity, precision, and control. Here are some key principles:

  • Define Everything: Don’t leave anything to chance. Specify every input, output, calculation, and decision point.
  • Use Version Control: Treat your specifications as code and track all changes.
  • Automate Validation: Develop tools to automatically validate your YAML specifications against a schema. This will help you catch errors early on.
  • Test Thoroughly: Create comprehensive test cases to verify that the system behaves as expected, based on your specifications.
  • Document Extensively: Add detailed comments to your YAML files explaining the rationale behind each parameter and condition.
  • Treat Specs as the Source of Truth: The code implements the specs. The specs are not generated from the code. This is a critical distinction.

The Benefits of Specsmaxxing

The benefits of adopting a Specsmaxxing approach are significant, particularly in finance:

  • Reduced Risk: Explicit specifications minimize ambiguity and reduce the likelihood of errors.
  • Improved Compliance: Clear documentation demonstrates adherence to regulatory requirements.
  • Increased Transparency: YAML specifications provide a human-readable record of the system’s behavior.
  • Faster Development: Well-defined specifications streamline the development process.
  • Easier Maintenance: Understanding the system’s logic is much easier with clear specifications.
  • Greater Control: You regain a sense of agency and reduce the feeling of being at the mercy of algorithms.

Overcoming AI Psychosis: A Path Forward

AI psychosis in finance isn’t inevitable. It’s a symptom of a lack of control, a feeling of being overwhelmed by complexity. Specsmaxxing, with YAML as its preferred language, offers a powerful way to reclaim that control. It’s a return to engineering discipline, a prioritization of clarity and precision.

It's not a magic bullet, but a critical step towards building more robust, transparent, and trustworthy AI systems. By embracing rigorous specification writing, we can navigate the AI revolution in finance with confidence, rather than fear. It’s about building systems we understand and can control, even as they become increasingly sophisticated. Don't just build with AI; build on top of solid, well-defined foundations.

Disclaimer:

I sometimes include affiliate links in my articles. If you click on one of these links and make a purchase, I may receive a small commission at no extra cost to you. This helps support my work and allows me to continue providing valuable content. I only recommend products and services that I believe are genuinely helpful and relevant to my audience.

Pass it onX·LinkedIn·Reddit·Email
The Sunday note

If this was your kind of read.

Sign up for the morning email — short, hand-written, and sent only when there's something worth your time.

Free, sent from a person, not a system. Unsubscribe in one click whenever.

Keep reading

The archive →