Urgent.News

What's breaking now, across thousands of outlets.

AI

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 AI

Built a customer-support AI agent that actually remembers customers

Built a customer-support AI agent that actually remembers customers One problem I noticed with AI support agents is that they often make customers repeat the same information in every new…

  • SupportMemory AI agent retains customer information
  • Utilizes Hindsight persistent memory for recall and retention
  • Demonstrates improved customer support through context awareness

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.

Your AI coding agent hit a limit? Keep working with MateMCP

A frustrating thing kept happening during real coding work: I would be deep into a task, the built-in coding/agent mode would hit its usage limit, and the agent would stop — while the conversation…

  • MateMCP offers alternative execution path for AI conversations.
  • Provides shell commands, file access, and project workspaces.
  • Maintains conversation usefulness despite AI provider's usage limits.

Building an AI-Powered Incident Response Agent with Hindsight

Hack With Hyderabad 3.0 | AI Agents | DevOps | Hindsight Memory 🚨 When Production Breaks, What If Your AI Agent Could Remember? Imagine this. It's 2 AM.

  • AI-powered Incident Response Agent with memory called Hindsight
  • Agent recalls past incidents to provide context during investigations
  • Agent recommends actions and learns from incident experiences

More from Tuesday 29 September →