Urgent.News

What's breaking now, across thousands of outlets.

AI

AI answers are easy to get but expensive to read — a CLI that filters them down

You ask an AI assistant a question and an answer comes back. Reading it is the expensive part. I find the long round-trips tiring. Ask it how to remove duplicates from a CSV in Python and you get 800 characters covering BOMs, encodings, and pandas design philosophy. What you actually need is twelve lines of code and one way to check it works. Telling the assistant "be concise" ahead of time…

An AI assistant provides an answer to a question, but the process of reading the lengthy response can be costly. The author found it frustrating to ask for a simple solution, like removing duplicates from a CSV in Python, and receive hundreds of characters detailing BOMs, encodings, and pandas design philosophy. The author then created a command-line interface (CLI) to filter the AI's response, making it more manageable.

The CLI takes a Markdown-formatted answer and produces three sections: a conclusion, minimal code, and verification instructions. It processes the input via stdin, allowing users to pipe the answer directly into it. The tool is available at https://github.com/sunnydachs/concise-md. The implementation is straightforward Markdown parsing, splitting the input into sections, detaching code fences from prose, and reorganizing the text.

The conclusion is determined automatically, based on specific markers like "tl;dr" or "the standard approach." Code blocks are preserved exactly as they appear in the original answer. For verification, the CLI looks for headings like "Verification" or "How to verify," or sentences containing the words "verify" or "check." If the answer is short and contains only one code block, the CLI passes the input through unchanged.

The tool is tested on twelve different commits across Python versions 3.11-3.13. The author acknowledges the limitations of the Markdown parser, which is based on regexes rather than a full CommonMark implementation, potentially causing odd results when parsing tables-heavy answers. Additionally, the tool cannot determine the correctness of the content, so any wrong answer will be shortened, but still incorrect.

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

Building Zyg0s: An Autonomous, Explainable Fraud Investigation Agent Powered by TigerGraph Savanna Cloud & MCP

TigerGraph Agentic Fraud Investigation Hackathon (Hacker House Goa / HHGOA Track) Author: Vansh Deo Team Name: QueryCrew GitHub Repository: https://github.com/VanshDeo/Zyg0s Video Demo (3–5 min)…

  • Zyg0s is an autonomous, explainable fraud investigation platform
  • Powered by TigerGraph Savanna Cloud, MCP, and Groq
  • Combines 7 specialized neuro-symbolic agents to combat financial crimes

Claude Discovers a CRISPR-Like Enzyme System Called ART

Anthropic says Claude autonomously spotted a novel enzyme system in bacteriophage DNA, which its biology lab named array-associated reverse transcriptases, or ART About 950 Claude agents processed 210…

  • Anthropic's biology lab discovered enzyme system ART in bacteriophage DNA.
  • Claude, a large language model, identified ART from 210 million tokens.
  • ART's function remains unknown despite structural similarity to CRISPR.

More from Friday 25 September →