NLI with multiple databases, any ideas?
Intro
NLI with multiple databases, any ideas?
Intro
A natural language interface allows a user to access a database via natural language.
What if the answer to a question can only be found by accessing the results of more than one database?
Example
DB 1 contains these facts:
name(18911, “Ma Doe”) birth_date(18911, “1891–11–24”)
DB 2 contains these facts:
name(673, “John Doe”) name(698, “Ma Doe”) mother(673, 698)
Suppose you want to answer this question:
When was John Doe’s mother born?
The answer can only be found by combining data from two databases. DB 1 knows who is “John Doe’s mother”: it’s Ma Doe. DB 2 knows the age of Ma Doe. But is this the same “Ma Doe”? And what if Ma Doe is called “Madonna Doe”, her Christian name in DB 1?
A related problem is that a single database may contain multiple persons (entities) with the same name. Keep that in mind as we continue.
Sense and Reference
The two databases contain information about the same person, Ma Doe. Gottlob Frege called this the reference of this entity. This is the real person Ma Doe. Since the two databases hold different representations of Ma, these can be called the two senses of Ma Doe. The question is then: how do we know that these senses have the same reference?
Ask the user
We can ask the user. If we specify some extra information, we can just ask the user if s?he thinks this is the same person:
DB 1) Ma Doe (1891–11–24, Colorado) DB 2) Ma Doe (2 children: John and Jane)
Note that in the case with two persons called “Ma Doe” in the same database, we have to ask the user. One of the persons may be be more “obvious” than the other, but still it is possible that the user means the less obvious one.
When the person is called differently in the two databases, it is a lot harder for an nli system to suggest persons that might match.
Create a mapping!
We can create a mapping by hand!
This would result in long lists of these identities
DB1:18911 == DB2:698 DB1:18912 == DB2:12768 DB1:18913 == DB2:18
But this is a lot of work, of course, and a maintenance nightmare.
We can create a mapping rule!
DB1:name == DB2:name && DB1:birth_date == DB2.birth_date => DB1.id == DB2.id
Which you must read as: if the name and birth dates match, this is the same person.
But there are many problems. DB 2 does not have birth dates. The name alone is not enough of course. The names can differ (“Ma Doe”, “Madonna Doe”).
We can create universal identifiers!
What if every database used the url http://thedoes.name/person#ma to refer to Ma Doe?
That would solve it, but it is just not the case, and it never will be.
Any ideas?
I think this issue is important, if we want to integrate the open data that is available on the internet. But I have the feeling that there must be better ideas out there, than the ones I mentioned. Do you have any ideas?
메타데이터
- post_id
- 1ccb9727ce98
- slug
- nli-with-multiple-databases-any-ideas-1ccb9727ce98
- url
- https://medium.com/@garfix/nli-with-multiple-databases-any-ideas-1ccb9727ce98
- canonical_url
- https://medium.com/@garfix/nli-with-multiple-databases-any-ideas-1ccb9727ce98
- author_url
- https://medium.com/@garfix
- status
- ok
- fetched_at
- 2026-06-12 18:14:10