Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Column description #554

Open
priamai opened this issue Jul 14, 2024 · 2 comments
Open

Column description #554

priamai opened this issue Jul 14, 2024 · 2 comments

Comments

@priamai
Copy link

priamai commented Jul 14, 2024

A lot of databases have non verbal or non descriptive column names that will for sure confuse semantically the LLM.

Would it be possible to add a method to describe or alias the column of a table ?

For example let's say I have a table called bsd with a column called cst: I want to alias them or describe them as building system and customer transaction.

Hopefully makes sense.

@andreped
Copy link
Contributor

andreped commented Aug 1, 2024

Hello, @priamai! :]

For our applications, we have chosen to define what these column names mean, when appropriate, as documentations, and train vanna to know what these column names are and what they mean. I would think such an approach would work for you as well.

Just remember to store each column name document chunk in a format that makes sense and preserves the hierarchical nature of your database, for instance like so: {schema, table, columnName, description}.

It is also likely that you might want to store chunks on table-level instead of row-level. Depends on your database and use case, I would think, what makes the most sense.

Let me know if you have further questions :]

@priamai
Copy link
Author

priamai commented Aug 3, 2024

Wait so for example:

image

I will do something like this?

vn.train(documentation="the table=Identity has column=id, the object unique identifier")
vn.train(documentation="the table=Identity has column=created, the date when the object was created")
....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants