SShortSingh.
Back to feed

Keeping a Course Tutor's Retrieval Cache Fresh Under Latency Pressure

0
·4 views

Caching in a course tutor that answers from PDFs should be treated as a retrieval design choice rather than an afterthought. The author recommends caching stable work such as parsed pages, chunks, and embeddings, while keeping final answer caches short-lived and linked to document versions. A common failure described is a tutor citing a replaced PDF, which dashboards miss because latency and index health look normal. The proposed fix is to attach document fingerprints and parser versions to cached data, expose cache age as a metric, and bypass answer caches when citation fingerprints no longer match the current course manifest. The article also notes that cache expiry thresholds must balance extra processing cost against stale material and may need to vary across subject areas.

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 ·

Grid bot backtests often overstate returns by ignoring fees, funding and liquidation

Many grid bot backtests simply count how often price crosses a grid line and multiply by profit per grid, which tends to produce overly optimistic results. The author notes that taker fees consume a growing share of each step as grids get tighter. Outside the grid's price range, the bot holds a one-sided inventory whose open loss can far exceed the profit collected inside the range. Funding payments on held positions and liquidation risk, which shifts as the grid fills, also need to be modeled, and the author checks liquidation on every price update. The author's simulator walks through the price path within each candle, filling crossed lines in order with slippage, and is offered as a tool running on live public data without requiring exchange keys.

0
ProgrammingDEV Community ·

Check Point CVE-2026-123039 patch does not remove attacker footholds on compromised appliances

Installing a fixed Check Point build closes CVE-2026-123039, a root privilege escalation flaw in the Gaia OS DynamicCLI daemon, but it does not clean up files, accounts or trust changes an attacker created while holding root. The flaw has a CVSS 3.1 score of 7.8, and Check Point confirmed exploitation, with CISA adding it to its KEV catalog on November 13. In a documented PHP2Shell campaign, attackers used a foothold on Mobile Access portals to escalate to root, then planted webshells, backdoors and boot persistence. Responders are advised to preserve logs and volatile state before cleanup, check against known-good baselines, and rotate credentials exposed to the compromised environment. Affected releases include several R81.x, R82.x and related versions, with fixed builds listed in the advisory.

0
ProgrammingDEV Community ·

How to scrape App Store reviews across countries without proxies, using Apple's public JSON endpoints

A developer walkthrough explains how to collect App Store reviews from multiple country storefronts using two simple public JSON endpoints that need no API key or login. The RSS customer-reviews feed provides up to 500 reviews per app per country, while the iTunes Lookup API supplies app metadata such as average rating and rating count. The guide flags quirks of the older feed, including single-entry responses that are not wrapped in an array, non-review entries that must be filtered out, and nested label-wrapped values. It also recommends modest request rates with exponential backoff to handle rate-limit responses. The example uses Duolingo to build a sentiment-labelled dataset and identify words that appear far more often in negative reviews than positive ones.

0
ProgrammingDEV Community ·

Databricks SQL's ai_forecast Runs Time Series Forecasts in a Single Query

Forecasting typically requires exporting data, training a model, and writing results back, which leads many teams to skip it. Databricks SQL's ai_forecast function performs the forecast within one query, and version 2 adds holiday support, covariates, and non-negative outputs on top of a time series foundation model. A step-by-step guide builds a daily sales forecast, moving from a basic run to version 2, then adding holidays, a covariate, and non-negative constraints. Testing showed the largest accuracy gain came from informing the model about planned promotions rather than from the newer model itself. The function suits regular-interval data already in a table, while custom models remain the option when more control is needed.