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

Defog Sqlcoder LLM - Cookbook for schema definitions #696

Open
1 task
irthomasthomas opened this issue Mar 5, 2024 · 1 comment
Open
1 task

Defog Sqlcoder LLM - Cookbook for schema definitions #696

irthomasthomas opened this issue Mar 5, 2024 · 1 comment
Labels
AI-Agents Autonomous AI agents using LLMs Algorithms Sorting, Learning or Classifying. All algorithms go here. Automation Automate the things New-Label Choose this option if the existing labels are insufficient to describe the content accurately prompt-engineering Developing and optimizing prompts to efficiently use language models for various applications and re

Comments

@irthomasthomas
Copy link
Owner

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 irthomasthomas added Algorithms Sorting, Learning or Classifying. All algorithms go here. New-Label Choose this option if the existing labels are insufficient to describe the content accurately labels Mar 5, 2024
@irthomasthomas
Copy link
Owner Author

irthomasthomas commented Mar 5, 2024

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

@irthomasthomas irthomasthomas changed the title πŸ‘¨πŸΌβ€πŸ³ Cookbook for schema definitions Defog SQL LLM - Cookbook for schema definitions Mar 5, 2024
@irthomasthomas irthomasthomas changed the title Defog SQL LLM - Cookbook for schema definitions Defog Sqlcoder LLM - Cookbook for schema definitions Mar 5, 2024
@irthomasthomas irthomasthomas added Automation Automate the things AI-Agents Autonomous AI agents using LLMs prompt-engineering Developing and optimizing prompts to efficiently use language models for various applications and re labels Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AI-Agents Autonomous AI agents using LLMs Algorithms Sorting, Learning or Classifying. All algorithms go here. Automation Automate the things New-Label Choose this option if the existing labels are insufficient to describe the content accurately prompt-engineering Developing and optimizing prompts to efficiently use language models for various applications and re
Projects
None yet
Development

No branches or pull requests

1 participant