News for hackers. Stuff that matters.

nicola_alessi

Ask HN: Opus 4.7 – is anyone measuring the real token cost on agentic tasks?

Shipped today. The benchmarks are real: 87.6% SWE-bench (from 80.8%), +13% on coding tasks, 3x more resolved production tasks on Rakuten-SWE-Bench. But there are a few changes that compound on each other for token consumption: a new tokenizer (1.0–1.35x more tokens for the same input depending on content type), xhigh effort mode that reasons longer per turn, and /ultrareview which spins up...

( Read More... | no comments | on HN )
Fair point, appreciate the callout. I'll dial it back.
Interesting framing — hadn't thought about it from the inference routing angle but it maps well to what the data shows. On latency variance: yes, significantly. Cost standard deviation across runs dropped 6-24x depending on task type. The most extreme case was a refactoring task: baseline sigma $0.312 vs $0.013 with pre-indexed context. Duration variance also dropped in 6 out of 7 tasks. I didn't measure TTFT specifically but the overall duration went from 170s → 132s with much tighter clustering around the mean. The stabilization effect is probably the most underrated finding. Everyone focuses on the average cost reduction, but the predictability improvement matters more for production workloads — you can actually forecast spend instead of hoping the agent doesn't go on an exploration tangent. What's SDAG? Curious about your setup.

More tokens, less cost: why optimizing for token count is wrong

I ran a controlled benchmark on AI coding agents (42 runs, FastAPI, Claude Sonnet 4.6) and found something that broke my mental model of LLM costs. The setup: I built an MCP server that pre-indexes a codebase into a dependency graph and serves pre-ranked context to the agent in a single call, instead of letting the agent explore files on its own. The expected result: less input context → lower...

( Read More... | 10 comments | on HN )

Show HN: Focused input cuts LLM output tokens by 63% bench on CC with FastAPI

I built an MCP server (vexp) that pre-indexes a codebase into a dependency graph and serves only relevant code to AI coding agents. While benchmarking it, I found something I wasn't looking for. The expected results were straightforward: less input context → lower cost, fewer tool calls → faster. But the output token reduction was the surprise.Benchmark: 7 tasks on FastAPI (the OSS repo, ~800...

( Read More... | no comments | on HN )
vexp works regardless of how you organize files. The graph is at the symbol level (functions, classes, types) not the file level, so whether you have one function per file or 50, it resolves the same dependency chain and serves the same capsule.

The savings actually increase with larger files because that's where the baseline wastes the most, Claude reads a 500-line file to use 20 lines of it.

Show HN: 58% cost by replacing file reads with a dependency graph on AI Coding

I got tired of watching Claude Code read entire files when it needed one function. Built an MCP server that pre-computes a dependency graph with tree-sitter and serves only the relevant code nodes to the agent.Ran a proper benchmark to see if it actually matters.Setup: FastAPI codebase (800 Python files), Claude Sonnet 4.6, 7 tasks (bug fixes, features, refactors, code understanding), 3 runs...

( Read More... | 2 comments | 3 points | on HN )
Re: on Monday March 02, 2026 @06:49AM (#47216798)
vexp is an MCP server that gives AI coding agents structural awareness of your codebase. Instead of letting the agent read entire files, it pre-computes a dependency graph with tree-sitter and serves only the relevant code nodes — full source for what matters, signatures for everything else.

Benchmarked on FastAPI (800 files, 42 runs, Claude Sonnet 4.6): 58% cheaper, 22% faster, 63% fewer output tokens per task.

Also does cross-session memory — observations are linked to code graph nodes. When the code changes, stale context is auto-flagged.

Single Rust binary + SQLite. Zero cloud, zero telemetry. Works with any MCP agent (Claude Code, Cursor, Copilot, Windsurf, aider, etc).

Free tier, no account needed.

Gating completion on the observation write is smart — you're turning the model's task-completion drive against itself. Have you run into the problem where forced observations degrade to "completed task successfully, no issues noted" though? Technically passes the schema, zero actual information.

That's what killed the approach for me. I spent weeks tuning schemas and rejection criteria and the models just got better at producing plausible-sounding observations that said nothing. Passive extraction ended up more reliable — watch the AST diffs, infer what the agent learned from what it actually changed, skip the self-report entirely.

Curious what your checker validates against. If it's structural completeness of the fields you'll hit the gaming problem fast. If it's semantic quality... how? That's basically asking another model to judge whether an observation is useful, which is its own rabbit hole.

Ask HN: Why do AI coding agents refuse to save their own observations?

I've spent months building tooling for AI coding agents and hit something I can't fully explain.If you give an agent (Claude Code, Cursor, Codex) a tool to save observations — "save_observation: persist this insight for future sessions" — and explicitly instruct it to use the tool in system prompts, config files, everywhere you can, it calls it maybe 30% of the time.The agent will happily use...

( Read More... | 2 comments | 2 points | on HN )

Show HN: Vexp – Your AI coding agent forgets everything. Mine doesn't

https://vexp.dev

I built vexp because AI coding agents have two expensive problems: they waste tokens reading irrelevant code, and they forget everything between sessions.The token problem: agents read entire files linearly to build context. On a medium TypeScript project, a single query was consuming ~18k tokens — most of it irrelevant. vexp builds a dependency graph from the AST (who calls what, who imports...

( Read More... | no comments | on HN )

Show HN: Vexp – Local-first context engine for AI coding agents

I built vexp to solve two problems I kept hitting with AI coding agents (Claude Code, Cursor, etc.):1. Token waste: agents read entire files linearly to understand a codebase. On a medium TypeScript project, a single query was consuming ~18k tokens of context when only ~2.4k were relevant.2. Session amnesia: every new session starts from zero. The agent re-reads the same files, re-discovers the...

( Read More... | no comments | on HN )

Show HN: Vexp – graph-RAG context engine, 65-70% fewer tokens for AI agents

I've been building vexp for the past months to solve a problem that kept bugging me: AI coding agents waste most of their context window reading code they don't need.The problemWhen you ask Claude Code or Cursor to fix a bug, they typically grep around, cat a bunch of files, and dump thousands of lines into the context. Most of it is irrelevant. You burn tokens, hit context limits, and the...

( Read More... | no comments | on HN )
Re:Is Entertainment Discovery Fundamentally Broken? on Saturday December 13, 2025 @04:43AM (#46253335)
You are 100% correct, and this is the central limitation. An LLM like ChatGPT, trained on general web text, is a terrible movie recommendation engine for exactly the reasons you state. Its knowledge is broad but shallow, skewed toward popular discourse, and it will happily confabulate titles.

Our approach with lumigo.tv is different by necessity, and it's a direct response to the problem you've nailed. We don't use an LLM for knowledge.

Here's the technical split:

The LLM is strictly a query translator. Its only job is to take your messy, natural language prompt ("a gloomy noir set in a rainy city") and convert it into a structured set of searchable tags, genres, and metadata filters. It is forbidden from generating or hallucinating movie titles, actors, or plots. The recommendations come from a structured database. Those translated filters are executed against a traditional database of movies/shows (we've integrated with TMDB and similar sources). The results are ranked by existing metrics like popularity, rating, and release date. The LLM never invents a result; it can only return what exists in the connected data. You're right that pure collaborative filtering (like Netflix's) has a massive data advantage for mainstream tastes. Where it falls short is for edge cases and specific intent. If you want "movies like the third act of Parasite," a collaborative filter has no vector for that. Our hypothesis is that a human can describe that intent, an LLM can map it to tags (e.g., "class tension," "thriller," "dark comedy"), and a database can find matches.

So, it's not AI vs. collaborative filtering. It's AI as a natural-language front-end to a traditional database. The AI handles the "what I want" translation; the database handles the "what exists" retrieval. This avoids the hallucination problem but still allows for queries that a "Because you watched..." algorithm could never process.

Does that distinction make sense? It's an attempt to use each tool for what it's best at.

Re:Is Entertainment Discovery Fundamentally Broken? on Friday December 12, 2025 @01:05PM (#46246772)
This is a fantastic point, and you've hit on something fundamental that's been lost in the shift to on-demand: the joy of discovery through serendipity and low commitment.

You're describing the exploration/exploitation trade-off in a very concrete way. Algorithmic recommendations are pure exploitation (based on your known likes). Endless scrolling is a frustrating middle ground. But "channel surfing" or "flipping" was a form of low-stakes exploration. You weren't making a choice to invest 90 minutes; you were dipping in for 30 seconds. If it didn't grab you, there was zero cost to leaving, which is psychologically liberating and led to finding unexpected gems.

Netflix's "Play Something" button and "Shuffle Play" for shows like The Office are direct, if clumsy, acknowledgments of this need. But you're right, why not a live "80s Action" channel or an "A24 Indie" channel? The technical barrier is near-zero.

Our take at lumigo.tv is that the modern equivalent shouldn't be tied to a linear broadcast schedule. The core experience to replicate is the low-friction, zero-commitment sampling.

One experiment we're considering is a "Mood Stream": you pick a vibe ("Cult Classic," "Mind-Bending Sci-Fi," "90s Comfort"), and it starts a never-ending, autoplaying stream of trailers or key 2-minute scenes from films in that category. You lean back and "flip" with a pause button. If a clip hooks you, you click to see the full title and where to stream it. It’s on-demand channel surfing.

The UI challenge is huge—how do you make it feel effortless, not just another menu? But your comment validates that solving this might be more valuable than another slightly-better recommendation algorithm. Thanks for this; it’s a much clearer design goal than “better search.”

Re:Is Entertainment Discovery Fundamentally Broken? on Friday December 12, 2025 @01:01PM (#46246716)
Your point is excellent and cuts to the core of what we're trying to explore. You're right, ‘mood' can be a fuzzy, high-friction starting point.

The hypothesis behind the prompt isn't that everyone consciously identifies a mood. It's more that "mood" is a useful shorthand for a complex set of preferences at a given moment. When you think, "I want something mindless and funny after that long meeting," that's a mood proxy. The goal of the open-ended prompt is to capture that full sentence, not just the one-word label.

You've identified the three major discovery engines that dominate today:

Social Proof ("What are folks talking about?") Direct Recommendation ("What was recommended to me?") Access & Friction ("What's on my services?"). These are powerful because they require zero cognitive effort from the user. You're reacting to signals. Our experiment is asking: what if you reversed the flow? What if you started with your own internal state—even if vaguely defined as "kinda sad" or "need distraction" and used a model to map that to a title? It's inherently more work, which is its biggest hurdle.

The interesting technical challenge is whether an LLM can act as a translator between your messy, human input ("just finished a complex project, brain fried, want visual spectacle not dialogue") and the structured metadata of a database (genres, pacing, tone, plot keywords). It's not about mood detection; it's about intent parsing. A future iteration might not ask for a mood at all, but simply: "Tell me about your day." The model's job would then be to infer the desired escapism, catharsis, or reinforcement from the narrative. Would that feel more natural, or just more invasive?

We're early, and you've nailed the key tension. Does discovery work best when it's passive (social/algorithmic feeds) or active (intent-driven search)? The former is easy; the latter might be more satisfying if we can reduce the friction enough. Thanks for giving me a much better way to frame this.

Is Entertainment Discovery Fundamentally Broken?

For the last year, I've been obsessed with a problem: finding something to watch is a chore. The interfaces of Netflix, Prime, and others feel like slot machines designed for maximum engagement, not for matching my mood. The "Because you watched..." algorithms create boring feedback loops, and browsing endless rows of posters is inefficient.This feels like a discovery problem. These platforms...

( Read More... | 9 comments | 2 points | on HN )
Re:An experiment in mood-based movie discovery: Lumigo.tv on Tuesday November 25, 2025 @06:20AM (#46044753)
I’ve been testing a platform called Lumigo.tv, and it made me rethink how recommendation systems could work if they started from human emotion instead of metadata.

The core idea is simple: instead of browsing genres or relying on collaborative filtering, you tell the system what kind of feeling you want from a movie or series — “calm but not boring,” “dark but with humor,” “nostalgic in a warm way,” etc. The AI tries to interpret the emotional structure of the request and map it to titles in its catalog. It’s surprisingly different from typing keywords into a traditional recommender; some of the results feel uncannily aligned with the vibe rather than the category.

The platform itself is a mix of a mood-based search engine, a personal tracking tool, and a place to build curated lists. It’s not trying to be a streaming service but more like an interface layer on top of the chaos of modern content libraries. The database seems broad enough to avoid the usual “small pool” problem, and the UI encourages exploration without overwhelming you.

What caught my attention wasn’t the AI gimmick, but the design philosophy behind it. Most discovery tools assume that past behavior predicts future taste. Lumigo leans into something more fluid: people watch according to context, mood, time of day, emotional bandwidth, even weather. Traditional systems don’t capture those signals well, and mood-driven search is an interesting attempt to fill that gap.

There are areas where the cracks show. Mood parsing is not an exact science. Some prompts land perfectly, others feel like they’re interpreted too literally. The quality of recommendations clearly depends on how rich the metadata is behind the scenes, and that’s a massive ongoing effort. It also raises the question of whether mood-labeling at scale becomes noisy or inconsistent over time.

Still, as a product experiment, it’s refreshing. It feels closer to how people actually talk about movies in real life (“I want something cozy tonight”) rather than how platforms expect us to search (“Comedy → Subgenre → Runtime”). Whether systems like this become a serious alternative to more conventional recommenders is unclear, but it’s one of the first attempts I’ve seen that treats discovery as something emotional rather than purely statistical.

If nothing else, it’s an intriguing example of how a simple shift in the input paradigm can completely change the feeling of interacting with a huge content database.

A Scalable Standard for Clean ECommerce Data in LLMs (Fork of Llms.txt)

The Problem: LLMs are terrible at understanding eCommerce sites. They: Hallucinate prices/specs from messy HTML Waste tokens on UI boilerplate (headers, popups, ads) Struggle with real-time inventory/pricing updatesOur solution: A fork of Answer.AI’s llms.txt that introduces site-llms.xml, an XML sitemap protocol for product data.Stores expose: /site-llms.xml: Index of all product...

( Read More... | no comments | 2 points | on HN )
You're absolutely right that existing standards like sitemap.xml + Accept headers could work in theory, but here's why we built this for eCommerce specifically:

The HTML-to-Markdown Problem Even with Accept: text/markdown, most eCommerce sites will return HTML (then converted server-side). This means:

Scripts/popups in <div> hell ("Subscribe to newsletter!" embedded in product specs)

Ad fragments ("Customers also bought...") polluting context windows

Layout cruft (header/footer markup in every response)

llms.txt files are handcrafted Markdown – no noise, just atomic product data.

Control Over Exposure Retailers want to:

Expose only approved fields (e.g., hide "Compare at $X" prices)

Sanitize dynamically (e.g., remove out-of-stock variants)

Avoid scrapers misusing their HTML endpoints

/site-llms.xml lets them curate what LLMs see, separate from human-facing HTML.

Performance at Scale For catalogs with 100K+ products:

Generating Markdown per-request via Accept headers is expensive

Pre-rendered llms.txt files can be CDN-cached

Sitemap indexes (>50K URLs) are already battle-tested

We’re not replacing sitemap.xml – we’re extending it for a specific use case where clean, pre-processed data matters more than flexibility.

The Case for Site-Llms.xml – A Standard to Fix AI's ECommerce Data Problem

LLMs struggle with eCommerce sites because: 1⃣ Product pages are HTML-heavy and noisy 2⃣ Catalogs change faster than LLMs can re-crawl 3⃣ Context windows can’t handle full category dumpsOur solution: A fork of Answer.AI’s llms.txt that introduces site-llms.xml – an XML sitemap protocol for product data. Stores expose:/site-llms.xml: Index of all product URLs/product/123/llms.txt: Clean Markdown...

( Read More... | no comments | 2 points | on HN )

Site-Llms.xml – An XML Sitemap Standard for AI-Friendly ECommerce Data

https://github.com/Lumigo-AI/site-llms

We've forked Answer.AI's llms.txt to solve a specific problem: how eCommerce sites with 10K+ products can expose clean product data to LLMs without inefficient scraping.What it does:site-llms.xml is a machine-readable sitemap pointing to product-specific llms.txt files (Markdown)Solves LLM context window issues by splitting catalog data into atomic unitsWorks alongside robots.txt and...

( Read More... | 3 comments | on HN )

Ask HN: Why hasn't anyone fixed product search yet?

Every solution I've seen either:1. Replicates Google's ad-driven model (but worse)2. Claims 'AI' but acts as a black boxYet we all waste hours daily on:- Decoding fake reviews - Reverse-engineering SEO-optimized 'best of' lists - Cross-referencing Reddit threads from 2018Serious question: What would it take to build a truly user-aligned product search engine?Technical constraints? Business...

( Read More... | no comments | 2 points | on HN )
Re: on Monday March 31, 2025 @02:36PM (#43538210)
A year ago, I bought a ‘top-rated’ DSLR camera based on Google’s first-page results. It turned out to be a refurbished model sold as new. That frustration led to Lumigo (https://lumigo.ai), an AI search engine that:

Bans all ads/sponsored results Explains every recommendation (sources: blogs, Reddit, expert reviews) Flags price gouging with historical data

We’re launching on Product Hunt tomorrow, but HN gets the first look because:

The ranking algorithm is open for critique (hybrid AI) We need brutal feedback on the ‘why we recommend’ UI

I’ll share failed approaches in the comments (like our disastrous first crawl of Amazon reviews)

Question for HN: What’s your ‘never again’ product search horror story?

BONUS: If you like the product, join the product waiting list to upvote tomorrow

Re: on Tuesday March 25, 2025 @02:17PM (#43474221)
I'm frustrated with:

First-page Google results being 80% ads Amazon reviews gaming the system No transparency in recommendations

So I built Lumigo Lumigo that:

Only shows merit-based results Cites all sources (blogs/forums/reviews) Never takes ad money for products results

Questions for HN:

Would you actually switch from Google for product search? What killer feature would make it indispensable? How much do you care about seeing 'why' something is recommended?

Bonus Q: What's your worst product search horror story?

we want to move in this direction: - offer subscriptions for merchants and earn percentages on sales by implementing a direct checkout (but the fact that lumigo forms a partnership with brand X is not an indicator that the algorithm will be calibrated to suggest that product first..we want to maintain the absence of bias of any kind) - sell some advertising space only around the search results that will not affect the user experience in any way or at most the related products suggested after a search - create pro subscriptions for much more advanced features on products search - offer a small part of our functionality via API to implement some aspects of this technology outside our ecosystem as well

and these are just some of the ideas we have in mind, but they make it clear that if I search for X the algorithm will return exactly X without any influence whether today, tomorrow, the day after tomorrow...

Re: on Tuesday March 18, 2025 @01:38PM (#43402254)
Hi HN, I’ve been working on Lumigo, an AI-powered search engine designed to fix the mess of online product search. No ads, no fake reviews—just honest, transparent recommendations based on real data.

We’re launching soon on Product Hunt, and I’d love your support! If you’re tired of sponsored results and endless scrolling on google and others search engines, join the waiting list.

Your feedback and support mean a lot. Let’s make product search better, together!

yes, of course, I recognise that it is quite tricky to distinguish reliable products from those that can be defined as ‘junk’... that's precisely why I thought of giving each search a large amount of data referring to the product you are looking for at the ai in order to make a sensible ranking of the products and thus suggest only those most suitable for your needs. At the moment it is only an alpha, but the goal is to make it something that objectively can save a lot of time, avoiding returns and making users more aware of what they are buying.
it depends on the sources that are used and above all on how much data is imagined before making an average ranking of the products... so in that case it is very useful rather than reading N sources and then deciding what to focus on

Older »