Urgent.News

What's breaking now, across thousands of outlets.

AI

How AI can investigate a 12 GB export without reading it into a prompt

Imagine asking an AI assistant for the average order value in a 12 GB sales export. It finds an amount column and suggests AVG(line_amount) . The query runs. The number looks reasonable. It answers the wrong business question. The file has one row per order line, not one row per order. The difficult part was deciding what a row meant before choosing the calculation. This is a useful place to…

A 12 GB sales export is used as an example to illustrate how artificial intelligence can investigate data without reading the entire file line by line. The key point is that the AI model must first understand the "grain" or the level of detail for each row in the data set. For instance, if the export contains one row per order line, the AI needs to know whether it should calculate an average order value based on individual line amounts or the total amount for each order.

The article provides a concrete example where the engineer defines the metric as summing sales lines belonging to each order and then averaging those order totals. By specifying the grain, the AI model can accurately compute the business metric. The process involves using SQL to define the desired grain and filter the data accordingly.

The example query demonstrates how to calculate the average order value for orders placed in October 2026, with timestamps in UTC and sales lines in USD currency. The query groups the data by order ID, counts the number of lines per order, sums the line amounts per order, and finally averages the order totals. The result shows the number of orders, total lines, total sales amount, and the average order value.

The article emphasizes that while the query result may require scanning the entire file, the computational cost is different from the size of the result. It also highlights the importance of file layout and column selection for optimizing the query performance. By pushing down column selection to the file reader and leveraging row group statistics, the system can skip irrelevant data and reduce the amount of work needed.

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

How AI Rap Duo Video Generators Work Under the Hood (and How to Pick One)

The "Hotel Lobby AI" trend is everywhere right now: two photos in, a twelve-second rap performance out, with two familiar faces sharing an orange stage and a hanging microphone.

  • AI rap duo video generators create short raps from two photos and optional topic
  • Detect and align faces in uploaded photos for consistent input
  • Generate motion and scene elements via pre-built templates

The Four Components of an AI Agent, in One Small TypeScript File

Most explanations of AI agents stop at “a model with tools”. That is true, but it doesn't help when your agent forgets a preference, calls the wrong function or loops forever.

  • The brain is the language model deciding the next step in an AI agent
  • Memory holds conversation history and stored facts in two layers
  • Tools are ordinary functions with descriptions for outside world interaction

Weekend Challenge: Model Substitution Governance & Audit Platform for Dynamic LLM Gateways

This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend : https://dev.to/challenges/hacktoberfest-weekend-2026-10-01 What I Built I built the Model Substitution Governance &…

  • Python Interceptor SDK monitors model substitutions without adding latency
  • FastAPI cloud tracker computes capability downgrade percentages
  • Web dashboard provides real-time risk scoring and compliance reports

More from Monday 5 October →