Urgent.News

What's breaking now, across thousands of outlets.

Tech

Why My Reorder Model Now Asks Hindsight Before Ordering

Last quarter my forecasting model told a shopkeeper to order 50 cartons of noodles from a supplier whose minimum order quantity was 50. The owner had told my system, weeks earlier, that he never wanted more than 35 units of that product on the shelf. The model was right about demand and wrong about the shop. That gap between what the numbers say and what the owner has already decided is the…

My forecasting system made a mistake for a retailer who strictly limited stock. The owner never wanted more than 35 cartons of noodles, but the model suggested ordering 50. That discrepancy between the numbers and the owner's decision is what I aimed to resolve with a new system called Hindsight. Hindsight is an open-source agent memory system that adds long-term business memory to the forecasting model.

The system is designed for small Indian retail shops, providing a dashboard with sales, profit, order count, and low-stock items. The system also includes billing options, a khata ledger for customer credit, an expenses ledger, and an advisor that can answer questions in Hinglish. The backend is a FastAPI service that acts as an orchestration layer, handling various stores of knowledge, including structured facts, machine learning forecasts, long-term business memory, and reasoning and conversation.

The key principle is that a forecast is a number, while a reorder decision is a number filtered through constraints that are not present in the sales table. These constraints include the owner's shelf limits, supplier relationships, and patterns in the owner's behavior. Instead of trying to anticipate these constraints in advance, I treated the owner's conversation as a valuable source of memory.

Every owner conversation and event that Hindsight detects is retained in a specialized "bank" for each store. When the system needs to make a reorder recommendation, it first gathers relevant data from the Postgres database and the forecast, then asks Hindsight what it knows that is relevant to the specific product. This allows the system to incorporate the owner's constraints and preferences into the decision-making process, leading to more accurate and context-specific reorder suggestions.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

I Gave My SRE Agent a Memory With Hindsight

Most incident-response agents can analyze an outage. The harder question is: what happened the last time we tried that fix?

  • IncidentIQ provides SRE agents with historical context via Hindsight memory layer.
  • System retrieves past incidents, actions, and outcomes to inform recommendations.
  • Architecture includes React frontend, FastAPI backend, Hindsight memory, and Groq AI reasoning.

Google's Custom Search API shuts down Jan 1. Migrate by changing one URL.

If you have code that calls https://www.googleapis.com/customsearch/v1 , it stops working on January 1, 2027 . Google has already closed the API to new customers, and existing ones are being moved off…

  • Google Custom Search JSON API shutting down Jan 1, 2027
  • Developers must migrate by changing URL, three options available
  • cse-compat tool provides same API shape, forwards to Serper

learning c:

currently im learning c programming language .pointers are universal rite of passage for anyone learning c. i made a number guessing game using c language.

More from Tuesday 29 September →