Skip to content
All tags

#validation

6 posts
ai guide Ask AI in Practice

When Ask AI May Show Sources: Validation, Critic Review, Degradation, and the Source Gate

Ask AI finding a post does not mean the UI should display it as a source. An answer must pass deterministic Markdown and URL validation, then the Critic's relevance, intent, and grounding checks; if either gate fails, source cards are withheld.

ai guide Ask AI in Practice

How Ask AI Turns Evidence into an Answer: Writer Context and Citation Contracts

Writer sees the first 8 candidates for a factual query or 12 for a recommendation by default. Citations must use an exact `source_url` from that set, and weak or empty retrieval triggers an instruction to abstain rather than fill gaps from model knowledge.

Zod: From Form Validation to TypeScript's Universal Contract

Zod's 224M weekly downloads (checked August 2026) put it far beyond 'form validation library': API boundaries, environment variables, route search params, LLM tool schemas and structured output all run on the same schemas. The core mechanism is one definition, two payoffs — runtime validation and static types derived from a single source. Zod 4 (on npm July 2025) is faster, slimmer, and easier on tsc.

OpenClaw Gateway, Part 1: Strict Validation Will Refuse to Boot — and the Guards That Stop You From Yourself

OpenClaw validates config strictly — one unknown key, a wrong type, or an invalid value and the Gateway refuses to start. It keeps a last-known-good copy, but neither startup nor hot reload restores it automatically; only doctor --fix does.

tech guide

React Hook Form + Zod: The Best Combo for Form Handling

React Hook Form handles form performance, Zod defines the validation schema — together they eliminate nearly all form boilerplate. Share a single Zod schema across a monorepo and you get one source of truth for both frontend and backend validation.

tech guide

Zod: Runtime Type Validation for TypeScript

TypeScript types only exist at compile time — they vanish at runtime. Zod lets you validate external data at runtime while inferring TypeScript types from the same schema. One definition, two jobs done.