Getting structured input and output from Ollama ollama

Getting structured input and output from Ollama

Structured output from Ollama takes more than JSON mode. Learn the reliable pattern for a Rails app: shape the input, constrain output with JSON Schema, parse defensively, and retry with feedback so a local LLM survives production instead of just a demo.

May 14, 2026

AI Agents System Architecture - Possible strategies ai

AI Agents System Architecture - Possible strategies

AI agent architecture comes down to three strategies: single agent, sequential, and parallel. When one big prompt loses the plot, how sequential chains buy reliability, where parallel agents crush latency, and the pitfalls of each before you commit.

Mar 23, 2026

Structured logging in Rails 8.1 with Rails.event

Structured logging in Rails 8.1 with Rails.event

Structured logging lands in Rails 8.1 with the Rails.event API. How the Structured Event Reporter replaces regex-parsed log lines with JSON events, plus tags, context, schemas, debug mode, and how to subscribe and test events in your own app.

When to use Module over Class in Ruby?

When to use Module over Class in Ruby?

Ruby modules often beat classes for service objects: why a shell class like PasswordResetInitiator is procedural code in disguise, using a module as a toolbox, mixins instead of artificial inheritance, and Data objects for tidy parameters.

Ruby 4.0 - a big update for its 30th birthday

Ruby 4.0 - a big update for its 30th birthday

Ruby 4.0 marks the language's 30th birthday with maturity instead of revolution: saner syntax for multiline conditions, faster boot with fewer requires, a maturing Ractor story, hidden performance gems, and protection against command injection.

Your system is not unique - The power of business archetypes

Your system is not unique - The power of business archetypes

Business archetypes prove your 'unique' domain is usually a store selling something unusual. Map complex requirements onto universal building blocks: product catalogue, orders, entitlements, inventory for services, party and billing, and stop reinventing the wheel.

How to control queues and concurrency in Sidekiq?

How to control queues and concurrency in Sidekiq?

Sidekiq capsules let you give each queue its own concurrency, so photo processing stops clogging urgent jobs and API calls stay under rate limits. A three-step setup: configure the capsule, assign the job, and call it, with configuration examples.

How to track and log slow queries in Ruby on Rails applications?

How to track and log slow queries in Ruby on Rails applications?

Slow SQL queries in Rails can be caught in development, before they become production fires. Using ActiveSupport::Notifications and the sql.active_record event, you build a small performance guard that logs every query above a time threshold straight to your console.

Deprecation in Rails: How to gracefully remove old code

Deprecation in Rails: How to gracefully remove old code

Deprecation lets you remove old Rails code without breaking teammates' apps overnight. A practical look at ActiveSupport::Deprecation: why sudden deletes hurt, how to warn about methods scheduled for removal, and how to phase out code in a civilized way.

How to create a custom rubocop rule to improve code quality?

How to create a custom rubocop rule to improve code quality?

Custom RuboCop cops let you enforce your project's own conventions. Step by step: how cops inspect the abstract syntax tree, writing a cop that bans hardcoded phone numbers, wiring it into your RuboCop config, and watching it flag offenses in action.