Skip to content

Results for “validation”

21 prompts

Write a system prompt and code in [language] that makes an LLM extract [fields] from [input type] as valid JSON matching this schema: [schema]. Include validation, a retry if parsing fails, and handling for missing data.

ChatGPT
Coding & Development

Prompt for structured JSON output from an LLM

Reliably gets valid JSON from an AI model in your app.

0

Here's my regex: [regex] meant to match [description]. Generate 15 test strings that should match and 15 that shouldn't, including edge cases. Tell me which ones my regex gets wrong and suggest a fixed version.

ChatGPT
Coding & Development

Regex test cases

Tests a regular expression against tricky inputs.

0

Build validation for a [form type] form in [framework or vanilla JS]. Validate [fields] on blur and submit, show inline accessible error messages, disable submit while sending, and handle server-side errors gracefully.

ChatGPT
Coding & Development

Form validation on the frontend

Accessible form validation with helpful error messages.

0

Build a file upload feature in [stack]. Show a progress bar, validate file type and size on client and server, store files in [storage], generate safe file names, and return a URL. Explain security considerations.

ChatGPT
Coding & Development

File upload with progress

Secure file uploads with progress bars and validation.

0

Write a Python class for [purpose, e.g. a shopping cart]. Include type hints, docstrings, validation, a clean public API, and pytest unit tests covering normal use and edge cases.

ChatGPT
Coding & Development

Write a Python class with tests

A well-designed Python class with type hints and unit tests.

0

Write a FastAPI endpoint for [operation, e.g. creating an order]. Use Pydantic models for request and response, validate [fields], return proper status codes, handle errors, and include an example request with curl and a pytest test.

ChatGPT
Coding & Development

Python FastAPI endpoint

A typed FastAPI endpoint with validation and error handling.

0

You are a machine learning engineer. Problem: [classification / regression] Data: [columns, target, size] Goal: [what decision the model supports] Write a scikit-learn pipeline: data loading, cleaning, feature engineering, train/test split, a baseline model and a stronger model, cross-validation, appropriate metrics,…

Claude
Coding & Development

Machine learning model starter

Build a baseline ML model with proper train/test split, evaluation and next steps.

0

You are a performance-focused backend engineer. App and slow parts: [details] Data freshness requirements: [details] Stack: [details] Recommend what to cache and where (HTTP, application, database query), cache keys, TTLs, invalidation strategy, cache-aside vs write-through, protecting against cache stampedes, and cod…

Claude
Coding & Development

Caching strategy with Redis

Speed up your app with the right caching approach and avoid stale-data bugs.

0

Act as a senior Next.js developer. Next.js version and router: [e.g. 15, App Router] Page: [purpose] Data source: [API/database] Styling: [Tailwind / CSS modules] Write the page using server components where appropriate, a client component for interactivity, loading and error UI, metadata for SEO, caching/revalidation…

ChatGPT
Coding & Development

Next.js page with data fetching

Build a Next.js page or route with data fetching, loading and error states and SEO metadata.

0

You are a Node.js backend engineer focused on security. Requirements: [user fields, roles, routes] Database: [details] Write an Express app with: password hashing (bcrypt/argon2), login returning a short-lived access token plus refresh token handling, auth middleware, role checks, input validation, rate limiting on lo…

Claude
Coding & Development

Express API with JWT authentication

Build a secure Node.js/Express API with sign-up, login, protected routes and token handling.

0

Act as a senior Laravel developer. Laravel version: [version] Resource: [name and fields with types/rules] Relationships: [details] UI: [Blade / Inertia / API only] Generate: migration, model with fillable and casts, form request validation, resource controller, routes, policy for authorisation, views or API resources…

ChatGPT
Coding & Development

Laravel CRUD feature

Generate a complete Laravel CRUD feature: migration, model, controller, routes, validation and views.

0

Act as a senior Django developer. Django version: [version] Feature: [description] Models and fields: [details] Users and permissions: [details] Generate: models with Meta options and __str__, admin with list_display/filters/search, forms with validation, class-based views, URLs, templates outline, and tests. Explain…

ChatGPT
Coding & Development

Django model, admin and views

Create Django models, admin configuration, forms and views for a new feature.

0