Live data from Hacker News

Show HN: Natural-SQL-7B, a strong text-to-SQL model

github.com

61–70 of 171 posts

Re: Show HN: Natural-SQL-7B, a strong text-to-SQL model

#61

So I need to ask my lawyer to review a custom license before I can consider using this? No thanks.

Sorry, it seems complicated. Since it is a finetune of Deepseek-Coder, I had to include their license.

Deepseek is pretty open, just says not to use it for: - military purposes - exploiting vulnerabilities etc.

Just trying to include as much information as possible from the initial base model.

Re: Show HN: Natural-SQL-7B, a strong text-to-SQL model

#63

Earlier quoted context omitted.

1) OpenAI has consistently gone back on commitments it has made 2) Sam Altman has a shady track record publicly, and if you believe the things people say privately he has consistently done business very dishonestly throughout his career. He is the CEO, and virtually the entire executive team are people he brought in from his network. It’s his company. 3) To give one example of many, OpenAI recently changed the terms…

If you don't trust OpenAI, you can choose to trust Microsoft. Azure OpenAI is 3-months behind OpenAI that costs 3x as much, but you get more 'security' and better performance.

I don't see how anyone could trust Microsoft or openai given their track records.

Re: Show HN: Natural-SQL-7B, a strong text-to-SQL model

#64
post #58

Earlier quoted context omitted.

They're incredibly useful -- any time that you want to both: - Reference data from the previous part of the query (the "left-hand side") - Return multiple columns The only way you can achieve it is with LATERAL/CROSS APPLY. Regular correlated subqueries can only return a single column, so something like this doesn't work: SELECT loop.val, (SELECT loop.val * loop.val, 'second column') AS squared FROM (SELECT loop.val…

I love LATERALs, but this still fits within set theory and a bulk application rather than an iterative for-loop. It may even be implemented as a for-loop within the engine, but SQL being declarative abstracts that away from the query interface. It's sets all the way down. A set of f(x) is still a set.

Lets get even more cursed then:

    CREATE TEMP TABLE temp_results(value int, value_squared int);

    DO $$
    DECLARE
        r int;
    BEGIN
        FOR r IN SELECT generate_series FROM generate_series(1,5)
        LOOP
            INSERT INTO temp_results VALUES (r, r * r);
        END LOOP;
    END$$;

    SELECT * FROM temp_results;

Re: Show HN: Natural-SQL-7B, a strong text-to-SQL model

#65

Earlier quoted context omitted.

> I disagree that executive level shenanigans translate to real world non-compliance with ________ law Uber Airbnb Facebook The entire financial industry also, every huge corporation that paid a vast (but relative to their market cap, insignificant) settlement, long after incidents in question, without admitting guilt. Corporations have essentially culled vast numbers of humans until forced to stop. What’s a little l…

None of these cases involve unambiguously claiming that you will delete data and then not doing it. Closer would be FTX which unambiguously claimed one thing and did the opposite, but I do not think OAI has FTX level of dysfunction.

Lots of companies have interpreted “deleting data” in creative ways, or just declared “oopsie” when caught. [0][1][2]

[0] Google: lied about deleting data (Google as a verb)

[1] Google: lied about deleting data (Google as a noun) https://arstechnica.com/tech-policy/2023/02/us-says-google-r...

[2] Google: lied about deleting data (Google as a definition in Webster’s dictionary -> Rickroll)

Re: Show HN: Natural-SQL-7B, a strong text-to-SQL model

#66

Earlier quoted context omitted.

If you don't trust OpenAI, you can choose to trust Microsoft. Azure OpenAI is 3-months behind OpenAI that costs 3x as much, but you get more 'security' and better performance.

Yes and I recommend that people interested in GPT-4 use this service as it’s isolated from OpenAI and it is the absolute best model right now. That said, there are 3 quite worrying future possibilities, both stemming from the level of investment and commitment by Microsoft in OpenAI - a huge percentage of Azure’s value is bet on an exclusive partnership with them. That gives OpenAI a lot of leverage. And customer dat…

Good luck to OAI breaking with Microsoft when they have a 49% ownership share in your company and own all of your GPUs.

Re: Show HN: Natural-SQL-7B, a strong text-to-SQL model

#67

Earlier quoted context omitted.

> Azure OpenAI is 3-months behind OpenAI… How is it 3 months behind if you get access to current OpenAI models?

You don't. It took like 2 extra months for Azure OpenAI to get GPT-4 turbo. There's a noticeable time delay between OpenAI deploying their latest model and when Microsoft manages to shove it in Azure.

Great to know, thank you.

Re: Show HN: Natural-SQL-7B, a strong text-to-SQL model

#68
post #21

So it looks like it scores 76.5% on SQL-Eval [0], a bit behind GPT-4 at 83% and sqlcoder-15b at 78%. What kind of applications would this be useful for? What can you build with an AI data science intern that's right 75% of the time? As a programmer who always has to look stuff up when I SQL, I could definitely see asking something like this for a first draft of a query but it seems like I'm slightly better off asking…

1. If you are a a programmer I think you should learn SQL. It will give you a different perspective on programming that I think is invaluable. (I.e. programming without for loops) 2. Combining and slicing data is a craft, and doing it subtly wrong in one step can lead to fatal errors in the outcome. And most importantly, it can be very difficult to notice. Numbers don't smell. That is why I would be very hesitant to…

Honestly I would rather write stuff in code thats inefficient than deal with one more stored procedure. Its like a black box

Re: Show HN: Natural-SQL-7B, a strong text-to-SQL model

#69
post #58

Earlier quoted context omitted.

I love LATERALs, but this still fits within set theory and a bulk application rather than an iterative for-loop. It may even be implemented as a for-loop within the engine, but SQL being declarative abstracts that away from the query interface. It's sets all the way down. A set of f(x) is still a set.

Lets get even more cursed then: CREATE TEMP TABLE temp_results(value int, value_squared int); DO $$ DECLARE r int; BEGIN FOR r IN SELECT generate_series FROM generate_series(1,5) LOOP INSERT INTO temp_results VALUES (r, r * r); END LOOP; END$$; SELECT * FROM temp_results;

Uw you win, I guess. Already started to think what I would write in that code review comment ;)

Re: Show HN: Natural-SQL-7B, a strong text-to-SQL model

#70
post #21

So it looks like it scores 76.5% on SQL-Eval [0], a bit behind GPT-4 at 83% and sqlcoder-15b at 78%. What kind of applications would this be useful for? What can you build with an AI data science intern that's right 75% of the time? As a programmer who always has to look stuff up when I SQL, I could definitely see asking something like this for a first draft of a query but it seems like I'm slightly better off asking…

I can definitely appreciate security concerns but I don't see how providing your schema is of any concern whatsoever.
Post reply on HN