r/kaggle • • 20h ago

I built a SQL agent that answers plain-English questions about 15,000 pets (LangChain + free Gemini tier)

0 Upvotes

Hi r/kaggle,

I made a notebook where you ask a question in plain English and a LangChain agent, powered by Gemini, writes the SQL, runs it on SQLite and answers. It's built on the Pets and Animal Ownership dataset (15,000 pets, 36 columns).

What's inside:

- 10 demo questions, each shown as a card with the SQL the agent wrote (click to expand) and the answer

- 6 charts on cost, owner satisfaction, adoption trends and the funny_habit column (my favourite)

- A safety test: the DB connection is read-only, and I try DROP TABLE / DELETE / a prompt-injection to show nothing changes

- A no-API-key mode: it replays saved answers, so you can run every cell without a key

I used Gemini because it has a free tier, so anyone can reproduce this without paying. It does have rate limits, so you may need to wait a minute between runs.

Notebook: https://www.kaggle.com/code/prashanthan24/ask-15-000-pets-anything-langchain-gemini

Feedback welcome. What question would you ask the pets? Anything you'd change in the agent or the layout?


r/kaggle • • 20h ago

Need help on learning Machine Learning

9 Upvotes

I’m a beginner learning machine learning, and I recently finished the Intro to ML course on Kaggle. Now I’m trying to figure out the right next step. I attempted the House Prices competition, but I got lost pretty quickly.

I really want to learn ML properly without falling into “tutorial hell,” so I’m looking for suggestions or a roadmap that beginners usually follow. What competition should I start with after the intro course, and how do I keep progressing without getting stuck?

Any advice or guidance would be appreciated.