SShortSingh.
Back to feed

Why agent logs fail to explain decisions, and what to record instead

0
·2 views

A common support scenario, an AI agent approving a refund it shouldn't have, exposes a gap in standard logging: request logs show only input, output, and a status code. Agent behavior depends on intermediate steps such as the model and prompt version in use, the retrieved documents, each tool call with its arguments and results, and the order of those steps. The author recommends recording run metadata, inputs, retrieval queries and chunk IDs, model calls, tool calls, and outcomes for each run, with version fields to spot changes. A sample Python tracing wrapper illustrates structured trace records. The piece also advises redacting personal data and storing full content only where permitted.

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 ·

Solana version 1 transactions are sent by few wallets, mostly bots, with some everyday users affected

A developer sampled 1,000 finalized Solana mainnet blocks from November 12 to 16, 2026, to see who sends version 1 transactions. Version 1 accounted for 42% of non-vote transactions, but only about 1 in 7 wallets sent any. The busiest 100 version 1 wallets sent roughly three quarters of that volume, with heavy activity on trading platforms like Scorch, BisonFi and Pump.fun. Still, thousands of low-volume wallets also sent version 1 transactions, and apps that cannot read them silently drop those transactions, causing missing deposits or gaps in history. The author notes the sample is approximate and recommends updating the maxSupportedTransactionVersion setting, along with checking library versions.

0
ProgrammingDEV Community ·

Self-hosting an LLM beats frontier APIs at about 16M tokens a day, but needs far more traffic to beat cheap open-model APIs

Running an open-weight model on one NVIDIA H100 costs less than a frontier API such as Claude Sonnet 5.5 once usage reaches roughly 16 million tokens daily. Beating the low-cost per-token APIs serving the same open models requires about 240 to 400 million tokens per day. The analysis converts each API price into a blended rate using a 3:1 input-to-output token mix, with the H100 priced at $2.60 per hour. Because frontier models cost 15 to 26 times more per token than open models on per-token APIs, nearly any busy GPU beats them, while the cheaper APIs are harder to undercut. The comparison also notes that swapping a frontier model for an open one changes the model itself and only saves money if the open model passes the user's evaluations, and that idle GPU hours still incur cost, so utilization largely determines the outcome.

0
ProgrammingDEV Community ·

Small 1.7B model fine-tuned with QLoRA rivals a larger 8B LLM at triaging Brazilian Portuguese reviews

A study tested whether a compact language model could sort thousands of free-text customer reviews into problem category, sentiment, and urgency as well as a much larger one. The researchers fine-tuned a Qwen3-1.7B model with QLoRA and compared it against a few-shot Qwen3-8B and a simple TF-IDF baseline, using real Brazilian Portuguese reviews from the Olist dataset. Performance was judged against 200 test reviews labeled by hand, with gold and silver labels kept separate to avoid misleading results. The fine-tuned small model matched the larger model on two of three fields, trailed it by about 4 accuracy points on sentiment, and ran 3.7 times faster in batch. The entire experiment was run on free Kaggle T4 GPUs, which the authors estimate would have cost roughly $1.30 at on-demand cloud prices.

0
ProgrammingDEV Community ·

Developer Builds ByteNews, a Hacker News-Style Site Running Entirely on Cloudflare

A developer going by QuantumTechCoder has shared ByteNews, a high-density Hacker News clone, on DEV Community. The project is built with Next.js 14 and uses Cloudflare D1 as its database. The post was published on November 16 and is tagged as a Show DEV project. It has drawn two reactions from readers so far. The article is a brief introduction to the project rather than a detailed technical walkthrough.