irthomasthomas / undecidability

2 stars 2 forks source link

Defog Sqlcoder LLM - Cookbook for schema definitions #696

Open irthomasthomas opened 4 months ago

irthomasthomas commented 4 months ago

Cookbook for schema definitions

DESCRIPTION:
Hello! This is a cookbook that helps you define schemas in a way that the Defog model can understand them better. Our auto-generated schemas work well for most cases, but they can fail if you have complex or domain-specific databases. If this happens, manually editing the schema definitions to give Defog more context will help generate better queries. We have seen a 90+% reduction in query errors when customers define their schemas well!

Column definitions:
When you write down what, exactly, is inside a column and how it is calculated - query quality improves significantly.

Defining terms better:
Giving Defog more context for ambiguous terms helps improve query quality. Case in point here. Without the additional context in the pricepaid column, our model would be unsure about whether pricepaid is the price paid per ticket, or the total price paid for the listing. Similarly, without details about whether commission is a part of the price paid or not, we would have no idea about whether it is included in the pricepaid, or whether it is paid over and beyond the pricepaid.

When you give us more context about what your columns mean, query quality goes up significantly.

URL: Cookbook for schema definitions

Suggested labels

{'label-name': 'data_schema_definition', 'label-description': 'Guidance on defining data schema for improved query quality', 'confidence': 51.56}

irthomasthomas commented 4 months ago

Related content

696 - Similarity score: 0.98

640 - Similarity score: 0.89

649 - Similarity score: 0.87

546 - Similarity score: 0.87

702 - Similarity score: 0.86

545 - Similarity score: 0.86