Live data from Hacker News

Average is all you need

rawquery.dev

101–110 of 111 posts

Re: Average is all you need

#101
post #66

Earlier quoted context omitted.

I'm interested in how one would prove that one way or another. It seems to me that in the past there probably was lots of shoddy workmanship and just no-one paid attention to it. But I have no proof of that.

Fortunately, there are millions of buildings that remain standing as evidence of what was done in the past. So at least there's that!

Buildings don't get taken down because 'they were built poorly', it's cheaper to rebuild than refurbish.

And we can accommodate for 'selection bias'.

We have all of the historical evidence we could ever want for 'how things were built', basically 'infinity examples'.

I think some things were more robust, particularly some of the old framing, like in Europe, with non load-bearing walls etc. Those will stand for 1K years, but arguably unnecessary.

Re: Average is all you need

#102
post #30

Earlier quoted context omitted.

That isn't a sane starting point; if a corporation's strategy is to only hire above average employees they're going to fail. Enron springs to mind. Corporations generally take average people and give them a reasonably well defined scopes of simple work to complete that adds value. The bigger the corporation the more difficulty they have handling even the standard deviation above average differently to the one below;…

> The people who need to be above average and exceptionally are senior management and maybe a few bright sparks in middle management. Most of the value-add happens there that builds social machines that then do the work. That is the dream. Upper management can get software made without talent. But is seems to be the greatest ideas in the last 30 years didn’t start in board rooms. They started with a couple coders cre…

> No boardroom could have invented Google. It was so fundamentally different than what other search engines were doing.

You might want to try a different example, that one rather undermines the point you're trying to make. PageRank [0] was developed by Page & Brin as original research/based on the work of other people who weren't employees.

[0] https://en.wikipedia.org/wiki/PageRank#History

Re: Average is all you need

#103

Earlier quoted context omitted.

Yes. The correct answer is to ask an SQL expert to write the query. An LLM will make the expert much faster at writing the script, maybe.

SQL is not hard enough to require an LLM to think about for you I will never understand Engineers who struggle with SQL lookups. The vast majority of queries are extremely basic set theory

> SQL is not hard enough to require an LLM to think about for you

As someone who's seen queries that are hundreds of lines long, involve a bunch of CTEs, nested SELECTs as well, upwards of a dozen joined tables with OTLT and EAV patterns all over the place (especially the kind of polymorphic links where you get "type" not "table_name" so you also need to look at the app code to understand it), I'd say that SQL can be too hard for people to reason about well.

Bonus points for having to manually keep like 5 Oracle package contents in your working memory cause that's where the other devs on the 10 year old project stored some of the logic, while the remainder is sort-of-dynamic codegen in the app.

Same as with most app code, it shouldn't be like that, but you sometimes get stuff that is really badly developed and the cognitive load (both to inherent and accidental complexity) will increase until people will just miss things and not have the full picture.

Re: Average is all you need

#104

Earlier quoted context omitted.

Yes. The correct answer is to ask an SQL expert to write the query. An LLM will make the expert much faster at writing the script, maybe.

It doesn't. I can write that script faster than I can write the text asking the AI to write the script as SQL is concise and my IDE has auto-complete.

In fact auto-complete in VS code with copilot works surprisingly well. Let’s say there are patterns in how classes in a framework are constructed, and I already added changes to the schema, it will often emit the correct implementation code when going there. That is really speeding me up even if I know the code base very well.

Re: Average is all you need

#106

Earlier quoted context omitted.

If you think a language model can't check their work, then you are using the tools wrong. Plain and simple. Modern models are quite capable at surfacing and validating their assumptions and checking correctness of solutions. Oversight helps you build confidence in the solutions. Is it perfect, no.. but way better then most engineers I also ask to check things.

No they don't. To be able to "check one's work", implies that they can be held accountable, that they can tell apart right from wrong, when in reality they're merely text predictors. If you think an LLMs can check their work, then you are doing a terrible job at writing software. Plain and simple. They even go as far as "cheating", so tests fail, writing incorrect tests, or straight out leaking code (lol) like the la…

you can have it write test cases though.

in this case to make a local copy of the db, fill it with a set of records with an expected output of the query, then check to see of the query produces what you want.

you could then have it make queries that check the various assumptions that went into that artificial set of data. if it can find the assumptions broken, add records like that to the test set.

same old agentic programming techniques as ever. use your engineering skill to set up feedback loops. stuff that was painful to do as an engineer for checking your work is now straightforward

Re: Average is all you need

#107

If average is all we need, then anyone can do it. What value do I add? How does an employee differentiate themselves? Why didn’t the boss ask the AI for the charts to begin with? Everyone’s income is going to be below average, because they got fired.

For that matter, how does a business differentiate themselves, if people can write their own software? While we're busy trying to replace our employees with AI, our customers are trying to replace our products with AI.

support quality is an obvious one,

the other being how well the ai can use it, and how ai SEO-ed you are.

vercel and next.js for isntance are absolutely loved by claude

Re: Average is all you need

#108
post #106

Earlier quoted context omitted.

No they don't. To be able to "check one's work", implies that they can be held accountable, that they can tell apart right from wrong, when in reality they're merely text predictors. If you think an LLMs can check their work, then you are doing a terrible job at writing software. Plain and simple. They even go as far as "cheating", so tests fail, writing incorrect tests, or straight out leaking code (lol) like the la…

you can have it write test cases though. in this case to make a local copy of the db, fill it with a set of records with an expected output of the query, then check to see of the query produces what you want. you could then have it make queries that check the various assumptions that went into that artificial set of data. if it can find the assumptions broken, add records like that to the test set. same old agentic p…

The point is that you have verify it yourself. Like you wrote: "check to see of the query produces what you want"

Otherwise the LLM can just write tests against whatever it wrote and not what is expected. This happens often with the top models too.

Someone needs to check the tests work, review they cover edge cases etc.

Re: Average is all you need

#109
post #106

Earlier quoted context omitted.

No they don't. To be able to "check one's work", implies that they can be held accountable, that they can tell apart right from wrong, when in reality they're merely text predictors. If you think an LLMs can check their work, then you are doing a terrible job at writing software. Plain and simple. They even go as far as "cheating", so tests fail, writing incorrect tests, or straight out leaking code (lol) like the la…

you can have it write test cases though. in this case to make a local copy of the db, fill it with a set of records with an expected output of the query, then check to see of the query produces what you want. you could then have it make queries that check the various assumptions that went into that artificial set of data. if it can find the assumptions broken, add records like that to the test set. same old agentic p…

Feedback loops require a deterministic metric for success. You are doing the equivalent of using a slot machine to decide whether something is right or wrong.

Re: Average is all you need

#110
analytics/data engineer here. The approach described here falls apart on most datasets I've seen, because the source data has folds that are almost always out of context of the data itself. Even for a typical simple question a founder might have, like "what's the revenue for product X last month". Perhaps some orders don't have a Stripe record associated, and we receive money through a separate invoicing process. Perhaps there's a high revenue breakage rate between when a purchase is originally placed and when the payment goes through, and so a naive query for point-in-time revenue will almost certainly over-count revenue. The SQL the agent generate might not even yield directionally correct answers.

And that's when the agent even manages to construct a reasonable naive query. I've seen even Opus 4.6 ignore a `is_demo` column in the schema it was given when asked to construct a query for the number of active users.

Where I've seen text-to-SQL work well enough is when you're pointing it at data that's already been well-modeled for analytics such that the naive query a LLM will construct is correct by default. The data is either structured as a wide table such that no joins are necessary, or all the joins are 1:1 fact dimension joins. All metrics are additive and so can be aggregated without asterisks. Columns follow a consistent naming convention, using the business domain terms a user would use in their prompt to the agent.

But that's a much thinner niche that what rawquery is proposing. You can't get around the analytics engineering effort involved in constructing a quality analytics dataset; the LLM will be a best a fuzzy fronted to your data warehouse, coextent with your BI tool.

Note: I do see value in value in rawquery's CLI-first approach to accessing data. In the right hands agents are very helpful at rapidly exploring datasets and validating assumptions on source data; but all the cloud data warehouse products I've interacted are all somewhat fiddly to access locally.

Post reply on HN