SShortSingh.
Back to feed

How to Build Explainable Image Moderation Using Multimodal AI Chat Models

0
·4 views

Developers can moderate uploaded images for NSFW and violent content by combining a vision-capable chat model with a strict JSON schema, rather than relying on a dedicated moderation endpoint. The approach uses a policy prompt, schema validation, and a conservative fallback, with decisions stored as normalized statuses like allow, review, or block for auditability. Content categories such as nudity, graphic violence, and hate symbols should reflect each application's specific rules, since thresholds differ across platforms like medical forums, marketplaces, and social products. A key engineering lesson highlighted is cost management: one evaluation run consumed 18.7 million input tokens — about 3.4 times the estimate — largely due to duplicated policy text across retries and image variants. The recommended fix is to measure prompt tokens upfront, run small batches first, and track cost per accepted decision rather than cost per raw request.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

EU AI Act Rolls Out in Phases: Key Deadlines for AI Vendors Through 2026

The EU AI Act is being implemented in stages rather than all at once, with distinct deadlines affecting AI vendors, developers, and deploying organizations across Europe. The first rules, covering general provisions, AI literacy, and bans on unacceptable-risk AI, took effect on 2 February 2025. A second milestone on 2 August 2025 activated the governance framework and introduced compliance obligations specifically for providers of general-purpose AI models. The next critical deadline is 2 August 2026, when enforcement powers and most high-risk AI requirements are set to become fully applicable. Organizations operating in Europe must assess their role in the AI supply chain, as obligations vary depending on whether a company develops, provides, or deploys AI systems.

0
ProgrammingDEV Community ·

How to Use ScanSearch to Find Exposed Services and Vulnerabilities on Your Network

ScanSearch is an internet-wide search engine that indexes public-facing network devices, servers, and services, functioning similarly to Google but for connected infrastructure. Security and operations teams can use it to identify unintentionally exposed services, outdated software versions, and known vulnerabilities linked to their public IP ranges or domains. The tool supports a structured query syntax, allowing users to filter results by IP range, product name, version, and even associated CVEs. Unlike traditional internal port scanners, ScanSearch provides an external perspective on an organization's attack surface by continuously indexing internet-facing devices. This makes it a practical resource for prioritizing patching efforts and maintaining overall security hygiene.

0
ProgrammingDEV Community ·

How to Build a Reliable PDF Translation Pipeline in TypeScript

A production-grade PDF translation system is far more complex than simply uploading a file and calling a translation model, requiring careful handling of validation, routing, and failure recovery. Before any file reaches an extractor, a strict API contract should reject requests with identical source and target languages, missing uploads, or policy violations. File validation must go beyond filename and MIME type checks, examining byte signatures, encryption status, page count, and account limits to accurately estimate processing load. A document profile — capturing page count, selectable text coverage, and image density — determines whether a file is routed to direct text extraction or OCR, with mixed documents handled page by page. Job state should be tracked through a finite, explicit set of stages rather than a single processing flag, so that failures at any step can be diagnosed and explained.

0
ProgrammingDEV Community ·

KiMap Brings Editable 3D Indoor Mapping to the Browser Using React and Three.js

KiMap is a browser-based indoor mapping editor built with React and Three.js that allows teams to create and edit structured floor plans in both 2D and 3D views. Unlike traditional rendering-focused tools, KiMap preserves spatial relationships between walls, rooms, floors, and objects to support use cases like navigation, digital twins, and facility management. The tool is designed to make early-stage indoor spatial workflows accessible without requiring a full custom pipeline. KiMap is currently available in free early access, with no account needed to try a live example. The development team is actively seeking feedback from professionals working in indoor navigation, GIS, WebGL, and digital-twin workflows.