SShortSingh.
Back to feed

Queue-Based Retry Design for OpenAI Moderation API Rate Limits

0
·2 views

A 429 rate-limit response should be treated as scheduling input rather than a reason for every layer to retry at once. The article recommends a bounded retry inside a queue worker that carries the candidate and rubric revisions through each attempt. Operators should log HTTP status, Retry-After, rate-limit headers, request IDs, and attempt numbers, and alert on queue age and retry exhaustion. Retries should use exponential backoff with jitter, honoring Retry-After where provided, under capped delays and attempt counts, while reusing the same decision ID to prevent duplicate scores. Transport failures, malformed output, and rate limits should be handled as distinct states, ending in a visible delayed state or terminal review rather than unbounded retries.

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 ·

ShortSingh: Browser Tool Sorts Lines Numerically or Case-Sensitively, Keeping Text Local

OnePassApps has described its Text Studio's Sort lines tab, which runs entirely in the browser tab so files are not uploaded. The tool offers A-to-Z or Z-to-A ordering, a case-sensitive option, and natural number ordering, which is enabled by default. With natural ordering on, numbers sort by numeric value, so 9 comes before 10, whereas plain text sorting places 10 first. The article notes that case-sensitivity only changes results when two lines differ solely in capitalization, and that natural ordering suits IDs but may be better turned off for version strings.

0
ProgrammingDEV Community ·

High-accuracy classifier can still miss every useful research candidate

A synthetic teaching example shows that a screening classifier scoring 95% accuracy on 100 records can find none of the five positive candidates. The article explains why accuracy alone hides which cases were missed. Precision and recall are compared across two constructed prediction sets, showing that catching more positives can come with more false positives. The author stresses that the labels and predictions are invented for illustration and are not measurements from a real model or laboratory. A short Python audit script is provided that computes confusion-matrix counts, accuracy, precision and recall without external data or dependencies.

0
ProgrammingDEV Community ·

How JEE Main converts marks to percentiles and ranks across 19 shifts

About 15 lakh students take JEE Main across 19 shifts, each with a different paper, so raw marks cannot be compared directly. The testing agency NTA converts marks to a percentile calculated within each shift, meaning the same score can yield a higher percentile in a tougher shift. Because NTA does not publish a marks-to-percentile table, predictors must build one from published (marks, percentile) pairs and interpolate between them. Rank is then estimated by applying the share of candidates above a given percentile to the total number of candidates across all shifts. The author notes that such predictions are estimates and recommends displaying a range rather than a single figure.

0
ProgrammingHacker News ·

Median net worth of U.S. households under 35 fell 23% from 2022 to 2025

A Hacker News post highlights a reported 23% drop in the median net worth of American households headed by people under 35 between 2022 and 2025, with figures adjusted for inflation. The item links to a benchmarks page from KeepingUp that tracks net worth by age. The source text offers little beyond the headline and link, so the underlying data and methodology are not described in detail. The post drew modest attention, with 59 points and one comment at the time of capture. Readers would need to consult the linked page for the specific figures and their origin.