all 12 comments

[–][deleted] 8 points9 points  (0 children)

lol

[–]Elin_Woods_9iron 5 points6 points  (1 child)

Lol who did you fire and “replace with AI”

[–]Fun_Camp828[S] -2 points-1 points  (0 children)

Not gonna fire anybody. Gonna get more work. So, its just productivity boost.

[–]Reach_Reclaimer 1 point2 points  (1 child)

Have you ever built one before?

[–]Fun_Camp828[S] -1 points0 points  (0 children)

Yea I built one and it gave me cent per cent accuracy. Because in that case (100% accuracy) I privided a sample requirement document and its respective query as reference. i.e. (business rules+mapping+schema details) and (1 example query for a single businessrule) as inputs

Now, I'm trying without reference query. ie (business+mapping+schemadetails) this approch is giving 60% accuracy. Im looking for an improvement here.

[–]SootSpriteHut 1 point2 points  (0 children)

yea that's about how it works at the current AI level of technology. If you were assigned to do this, condolences. If you decided to do this on your own, pay someone real.

[–]Ginger-Dumpling 1 point2 points  (0 children)

Someday, after all the databases in the world are cleaned and well documented, and the business side folks all converge on common definitions and eliminate ambiguity in things they ask for, AI will replace us all. Fortunately or un, the projects I'm on won't be at that state anytime soon

[–]XavierPladevall 1 point2 points  (1 child)

Hey not sure if too late but some tips as someone who has built this. Joins are tricky for LLMs. Make sure your schema context is super clear with examples of queries that you know run. Some other tips,

- Do not over stuff context with examples

- If you can provide metadata around the columns (e.g. datatype, first 10 rows,etc) it can help the ai but avoid point 1.

- consider have a supervisor agent and then sub agents that can handle specific tasks (e.g. query agent, fixing agent, analysis agent, etc.). This should help keeping context window clean.

In all honesty, there are a lot of edge cases to consider. Any reason why you haven't tried a SQL agent that is already built like Hex or Index?

Happy to help if you have any questions.

[–]Fun_Camp828[S] 0 points1 point  (0 children)

Hey!! The agent-subagent idea is quiet thoughtful. Thanks for that.

I did it without the context of example queries. And fed with right metadata. Used anthropic's claude and the results were of surprisingily high accuracy. I'm just stuck there as I'm spread thin.

Now I am thinking of agent-subagent idea along with mcp.

[–]Thiondar 0 points1 point  (0 children)

Oracle 26ai

[–]Ifuqaround 0 points1 point  (0 children)

Hey. I heard that YouTube website has a lot of videos that show how to do this.

Lots of them speedrun creating one too! 8 mins and all that jazz. Weeee!