Live data from Hacker News

Ask HN: If you could talk to a database in plain English, would you?

news.ycombinator.com

21–27 of 27 posts

Re: Ask HN: If you could talk to a database in plain English, would you?

#21
post #18

Having used various things that claim to be natural language, I find that to use them effectively, I end up needing to learn their particular structured language. These are often poorly documented and may have pretty weird/difficult edge cases (one often seen and easy to explain case is selecting lists with plural nouns and individual records with singular nouns... But many english nouns have the same spelling and pr…

> Having used various things that claim to be natural language, I find that to use them effectively, I end up needing to learn their particular structured language. This makes sense. Are there any specific examples of products that you have used that you had to do this? > ...selecting lists with plural nouns and individual records with singular nouns... Yes, this is for sure a failure case. I believe I have some mean…

I'm thinking of applescript in particular, but voice assistants in abstract.

Applescript is sold as a natural english like language, but it's really not. At least it's well documented.

Voice assistants are more like your product. Ask it a question, get something. But you have to ask them to do things in very particular ways or you don't get what you want. And there's usually zero documentation.

As an interface to SQL, your product is going to have to let me specify pretty specific relations, and that's going to take pretty specific words, IMHO. Think about how a user would ask for an inner join vs a left join vs a cross join.

Some ORMs have a pretty similar issue, where you learn an entirely different way to formulate queries, that ultimately get turned into SQL, but I'd rather work to understand SQL than to understand an abstraction over SQL (unless it gives a singificant benefit).

Re: Ask HN: If you could talk to a database in plain English, would you?

#22

No. Absolutely not. I want to say precisely what I mean and have the database do precisely what I say, no more, no less. But maybe you're asking the wrong question in your headline. If you could have other people in your organization able to talk to a database in plain English, would you? This isn't something that most of the HN crowd would want for their own work. There might be a lot of people here who have, say, t…

I guess certain kinds of edits could be safe, such as inserting a row and then asking for confirmation.

Re: Ask HN: If you could talk to a database in plain English, would you?

#23
The more detailed you have to get explaining things, the less I would want to use it. If I can say something like "get the employee's pay-related data" and not have to delineate exactly what fields to get and what to call them, that would be useful. If I could say "make sure they are not also a student" (I work for a university) and have it figure that out, that would also be useful. If I have to tell it what joins to make I'd rather just type it in in sql or whatever it's underlying language is. Typing is much more casual of an activity for me than speaking is, and I can type for hours at a time and I can't talk for that long without my throat running dry. If I can say in a few words what I want and save a lot of typing, then that's great. If I end up saying as much a I would type anyway, then I'd rather just type it.

I think this is definitely something that should be looked at, but it's not a product I'm really interested in unless it wows me with it's intelligence. It has to start somewhere, though. I'm probably an outlier in the sense that I think a lot of people would rather talk to their computer than type on a keyboard. I'm just not one of them. I also don't want to work in cubicle hell with everyone speaking to their computer 24/7.

Re: Ask HN: If you could talk to a database in plain English, would you?

#24

The more detailed you have to get explaining things, the less I would want to use it. If I can say something like "get the employee's pay-related data" and not have to delineate exactly what fields to get and what to call them, that would be useful. If I could say "make sure they are not also a student" (I work for a university) and have it figure that out, that would also be useful. If I have to tell it what joins t…

Ah, sorry, I should clarify that when I say "talk", I didn't mean it in the literal sense. I've only worked on text as a source, though Speech-to-text shouldn't be too hard to integrate if it was needed.

I like your insight about using... let's call them "key phrases"...to help guide the query. Perhaps having a way to map a key phrase with a specific query, maybe one that is parameterized, would be useful. thank you.

Re: Ask HN: If you could talk to a database in plain English, would you?

#25

There is something in this space that I think would have value... maybe translation from English -> SQL, maybe suggest commonly used WHERE clause filters, etc. At the end of the day, SQL is very expressive for most of these queries, but it's not particularly discoverable and does take some knowledge. Lowering that barrier to entry is a great idea, but otherwise I'm not sure if an analyst can be certain their query wi…

English->SQL is very much a thing, and has a good amount of research going into it. It does have a few weaknesses though: 1. It is ML based, and the best results I have seen put it at about 90% accurate. This might be "good enough", but not perfect. Verification and error correction is needed. 2. Knowledge of the schema needs to be passed in as part of the feature, or have the model explicitly trained to the target s…

I wonder, does it help if the user understands which relationships are 1-to-N and which are N-to-N. In order to state commands fairly clearly, and respond to requests from the system for clarification and disambiguation. I would think that this kind of info (1-to-N, N-to-N) could be grokked in a straightforward way by a user with domain knowledge.

Re: Ask HN: If you could talk to a database in plain English, would you?

#26
Here's a related offering that Amazon launched a service for: https://aws.amazon.com/quicksight/q/ . Google Analytics has the same technology in their dashboard, found it kind of cool, works well sometimes It lets you ask questions about your data and get answers.

Re: Ask HN: If you could talk to a database in plain English, would you?

#27
This is an area that has been researched for decades and there is a wealth of prior art. If you want to pursue this idea you should narrow it down a bit. For example, creating a usable natural language interface for databases for GIS data for land surveying would in itself be a massive project. It should also be said that "plain English" is far from "plain" even for native speakers. It's not just about parsing it is also about making it usable.
Post reply on HN