Hacker News new | past | comments | ask | show | jobs | submit login
Chat with your database using AI
58 points by dan_lupashku on April 9, 2023 | hide | past | favorite | 60 comments
https://insightbase.ai allows you to chat to your database and build analytics using the answers.

You can ask for anything and it will answer with a number a text or a graph.

You can build dashboards with widgets that auto-refresh at specified intervals.

This saves a lot of time and has the advantage that anyone can use it without knowing the database structure & coding.

What do you think about this?




Great idea. Looks like a terrific implementation.

Here are things I think and wonder having watched your video and browsed your website...

It makes a very big claim but offers little information. I suppose it's early days but I would need to know things about the interaction with my database.

You give it a connection string only. Is it your claim that it will figure out my database, as if an embedded training set? With no further guidance on my part?

Considering that most of the world uses SQL, your choice to use Mongo in the video demonstration makes me wonder. Is SQL query generation a future thing? That makes me wonder about the status of the project?

You show nice graphs in the demo. Are there limits to what kinds of graphs it can make? Is it some kind of AI generator tech that would allow me to ask it to make anything?

I think this is a really nice looking and potentially wonderful app. I wish you all the luck.


Hi, thank you for your comment, I'll try to address all your points, and I believe that we should add more info on our website. Indeed, it's early and we just launched.

1. Yes, it will figure out your database structure and reply without any further guidance from your part, you don't have to do anything else.

2. We have MySQL and PostgreSQL support (we will add this info on our website, thanks for the feedback).

3. We support a few basic graphs like pie, bar, line and area graphs. You can also get numbers as replies (like totals, averages, etc.), or a table view (you can ask to see a specific entry from your database).

4. You can ask anything, and almost always you will get a good reply.

Feel free to create an account and play around (you don't have to connect your database, we have a demo database that you can use).


Created an account to play with it. Great work! Some suggestions:

1. Accuracy needs to be worked upon. I asked "How many total movies are there" in the demo project, it gave me "You are trying to run an unsafe operation" (!!).

2. It asks for database access if you want to run on your database. Until the trust in the tool is developed and value proposition is clear, will be hard to give any database access.


Thanks for the feedback.

1. Agreed, we're working on this, but for now we just went on the safe side. We don't want people to break things right now and this is why we have tight rules that flag potential dangerous operations.

2. Agreed as well, but you can provide a read-only user, and we store the credentials in an encrypted form. Also, you can whitelist the ips to our ips only.


If you have some really complex queries that you want to test to see if AI (GPT-4) can generate you are welcome to try: https://aihelperbot.com. After upgrading to GPT-4 I haven't had a single miss so far (when adding database for context).


> Inferences drawn from any of the collected personal information listed above to create a profile or summary about, for example, an individual’s preferences and characteristics [0]

I think it's a brilliant use-case of AI, but I really don't like this especially considering how much personal info is in that list. Kudos for being transparent about it, though.

[0] https://insightbase.ai/privacy


Thank you. We will review our privacy policy because we don't actually collect so much data.


Developing a similar tool with 1-click connection setup and GPT-4 streaming (really improves the generated SQL). I think business analytics tool will have to change their pricing significantly soon due to AI (my pricing starts at $5 per month). I mean, have AI generate SQL and setup a proxy to run the SQL queries directly and display the results in a table. That is a really powerful and accessible tool for a lot of people and it is hard to justify spending upwards to $50 for Tableau and the likes.

[0] https://aihelperbot.com/


Good luck with your project as well!!


I like these projects (recently tried https://databerry.ai and pick any random other two from https://custombot.ai) and where they are going but they don't yet fit what I'm looking for, I've played around the sql agent using langchain etc and it's still a miss most of the time. I don't want charts for basic queries about my users or growth etc as I can write much more detailed queries that can be run anytime and if this is geared towards managers something like https://trevor.io is a tab bit better as it will always give you explicit results.

What I want from an ai tool is strong "inferences" or some "understanding" of the data. Say I have a table with stock data and for this example it just has the following columns, ticker, close, volume_traded, eps_from_last_report, shares_outstanding. Some questions I should be able to ask are

1. What is the market cap of ticker X?

2. What is the 52 week high of ticker Y?

3. Which week had the most growth for ticker Y compared to the least growth for ticker X?

4. What is the pe ratio for ticker Z end of last quarter?

I hope you get my point, if it's a case where I have to fill in some data/formulas to guide it on what I expect that's fine as well but a pass thru to gpt with a subset of the data in the prompt won't hold up outside of toy cases or limited data. If you can solve that use case reliably then you're miles ahead of the pack.


I think that I made the demo too simple. It can handle more complicated use cases and it it's definitely able to answer to most of your questions.

We'd be happy to run those queries for you if you have a sample database and show you that it's possible.

We'll work on a new demo showing more advanced use cases, not just totals and bar charts.


Thanks for the reply, I will definitely follow up with this. Will prepare a subset of a table and play around with this tonight and if need be contact someone via the chat widget, if it can handle these and a couple more I use as a benchmark won't hesitate to jump on your highest tier.


Thanks for your feedback.

If you find something that's not working, we'd be happy to take a look at your dataset and questions and figure out how to make it work.

Just contact us through the chat or send an email at dan at insightbase.ai .


Nice job! We're building something similar for SQLite databases at https://www.airsequel.com. It's not mentioned on the landing page yet, but in our SQL workbench you can already use an AI prompt to generate SQL queries. We think it's important to also show the SQL query and make it editable so that the user can immediately fix simple errors, which is often faster than re-prompting.

We're also working on AI assisted initial database generation (aka dump any data and let the AI figure out how to build up a database from it) and AI assisted Charts / Dashboard generation, which will both be released soon!


Thank you, and good luck with your project as well


Since AI's main achilles heal is that it can make up responses, isn't a database widget view the worst use case? Wouldn't you want to be sure the displayed data was exactly correct?


Seems like the trick is to use the LLM to produce a query - then the data you get back is simply the result of the query, and you can examine the query to check that it's appropriate.


In my own experiments I've caught ChatGPT running the correct query but then hallucinating the results, because the response was too long for the token context window and got truncated!

I have an open issue about that here: https://github.com/simonw/datasette-chatgpt-plugin/issues/2

More about my explorations: https://simonwillison.net/2023/Mar/24/datasette-chatgpt-plug...


This is essentially how we are using ChatGPT to access our database of 3,335 cybersecurity vendors and provide responses.


I found myself wanting something like this the other day trying to query some BigQuery tables I was unfamiliar with.

With that being said, from my vantage, the value of a tool like this is writing the SQL query for me that I can understand, verify, and reuse.

Since it doesn't look you do that, and only return charts or "answers", you're locking users into an analytics solution rather than a tool that provides flexibility to any traditional BI solution.

Perhaps this is explained by a difference in target audience.


Yes, we're locking users into analytics because you can easily ask chatgpt to write an SQL query for you and there's no need for us to replicate the same functionality.


Perhaps I haven't figured out the best way to query ChatGPT, but isn't the magic here that your approach implicitly already understands all the tables/ relationships that exist within database?


Yes, it is, you're right, maybe we'll add this as a feature as well


I mean, as they are already running the query i think it would be easy to just show it together with the charts and answers.


We were thinking about this. We have the query and we might show it to our users, but we're not going to do that at the moment.

However this could be an option and we might add this feature if it would be valuable to our users.


It's good that you can get some information using natural language, but can you get to something like "does metacritic give lower scores to some genres more than others" ?

I work in health and I'd be asking something like "how strongly is condition x associated with demographic y". In practice I think I'd still need to give a very detailed 'prompt' listing all the clinical terms or codes to use.


It is very flexible actually. It could answer a query like "does metacritic give lower scores to some genres more than others".

It can filter the results based on some flags, values, dates, etc., and show you your results using specific constraints, you just have to ask.

We might have to do a demo where we show more advanced use cases.


Definitely do that demo - I think it would be more compelling than the kind of things that are in every intro BI tutorial.


Yes, we'll do the demo soon


Good job! Databend has a AI_TO_SQL function to do it: https://databend.rs/doc/sql-functions/ai-functions/ai-to-sql


Thank you, but we do much more than just generate SQL queries


Super interesting. Could you elaborate? Would love to hear more about what was easy/difficult in the process!


I won't describe how we're doing what we do, but I have to say that we work with a lot of unknown variables, and we have to structure the query and data, clean it, and return it to the user in the right format.

It's a lot of data processing and manipulation.


Really great use case to be fair and congratulations on the launch. Wanted to ask: 1. how well does it handle joins among multiple tables to find an answer 2. what happens if your tables and fields to not make a lot of sense in English? Thanks!


Developing a similar product and to my surprise switching languages isn't a problem at all. It also uses the correct tables when the user inputs "movies" instead "films" as the table is actually called. Writing this[0] here in German will produce the same result[1]. Now of course GPT version makes a big difference.

[0] https://aihelperbot.com/snippets/clg9n8zgi0000l60fx0yu8cbo

[1] https://aihelperbot.com/snippets/clg9nce140002l60fyf5r5bt0


1. It handles joins pretty well

2. It can make sense sometimes, but you always have the option to specify the table name


How do you prevent question misinterpretation, with possible non-evident bad results?

(E.g. a complex question would have '42' as correct return value, but misinterpretation has the engine return '345'.)


We're not doing this yet, but we're working on finding a solution.

Any ideas/suggestions?


I would need more time for an analysis,

but the standard idea would be to make the path-to-solution explicit, verifiable ("also tell us how you got to that"). In other terms, "avoid the black box". Maybe have the generated SQL query output... But this will not impede abuse from lazy users, and errors "may have consequences".

Databases (just think of the testing infrastructure for SQLite) are made to be fully reliable; if the interface were not so, you would have broken the model.


Yes, that was what we were thinking about when starting but we didn't want users to abuse our service.

However, I'm sure that we'll find a solution soon enough.


Issue is, you need not mitigation but certainty (for normal database operation).

The quickest path could be having a testing environment set to determine a tentative value for your failure rate, declaring it to the public and declaring in your disclaimer the scope of the your product.


Yes, we'll do this


I'm getting a "Could not detect database schema" error when I try to connect to a MySQL database. The DB user has select privileges so it should work, I think... any ideas?


Hi, please send us a message through the chat or send me an email to dan at insightbase.ai and I'll try to help.


Thank you for the quick support! Working great now


You're welcome, would love some feedback, thank you!!


I'm ready to pay for a service like this that can let me use my own openai key, can maintain privacy and work with OAuth.


1. Yes, we will allow users to use their own OpenAI API keys

2. Privacy is one of our main concerns, we obviously understand that privacy is extremely important when working with data.

3. What exactly do you mean by work with OAuth?


Would love to chat with you more about this — want to send me an email at jamesjoethomas at gmail?


I'll email you thanks.


is this reply for me?


I'd like something like this for exploration of graph databases such as Neo4j.


we plan to add support for more databases in the future


ping gpt@graphistry.com for early access :)


You are at least 23 days late: https://news.ycombinator.com/item?id=35186160

Also: https://news.ycombinator.com/item?id=35210093

Go faster of you want to succeed on such an obvious idea.

Do you have cofounders? Are you in SV? What about fund raising? Are the questions i would ask myself. And also you need to hire one of the bests.

Edit: not about microsoft 360, it's just about my comment.


Ridiculous! If this is useful, people will be using it for years. Making it work is 20%, the other 80% is keeping it alive.


But your comment is just an idea, right?

What we did is to implement the idea and make it a reality.

I thought you're going to show us a product that already exists and does what we do.


So there is that one type of ideas, the obvious ones, that comes with massive competition very quickly. All Im saying is that I believe this is one of those.

It's not impossible for you to succeed, you just got to have the right strategy, which is, hit hard extremely fast. Using VCs money and strategical hiring.


Yes, totally agree


Is this about Microsoft Copilot? I think you didn't fully understand what our product is about.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: