Aligning Defog to your usecase
You can give Defog more context about your metadata and align its behaviour to your organization. This helps Defog generate accurate results for you and your team, even when specialized knowledge is required.
There are three ways to align Defog to your usecase:
Add Instructions
Instructions are a way to guide Defog on business rules or internal logic that is not captured in your schema. You can add instructions on specific terminilogy, calculations, or any other business logic that is not captured in your schema.
Go to the Align Model page from the navbar. Add your instructions as bullet points or paragraphs. You can also add examples to help Defog understand your instructions better. Click on Update Instructions once you have added your instructions.
Add Golden Queries
Golden queries are pairs of user questions and SQL queries that you know are correct and want Defog to learn from.
You can view, add and edit golden queries in the Align Model page from the navbar. To add a new golden query, click on Add new Question and Query and fill in the user question. Defog will generate a SQL query, which you can edit if you'd like to make any changes. Below the query, you can also see the column names that would be displayed once the query is executed.
Click on OK to save it as a golden query. You can come back and edit or delete the golden queries anytime.
Collect User Feedback
You can collect user feedback on the results generated by Defog. This feedback helps Defog learn from its mistakes and improve its results.
Give feedback via the UI
After running a query, you can give feedback on the results by clicking on the thumbs up or thumbs down icon. This feedback is used to improve the model.
If you have positive feedback, click on the thumbs up icon. If you have negative feedback, click on the thumbs down icon and add a comment to explain your feedback.
Add queries marked as good to golden queries
On the View Feedback page, you can see all the feedback given by users. Queries that have been marked as correct can be added to the golden queries. This helps Defog learn from the correct queries and generate better results in the future.
Get recommendations for creating instructions that address negative feedback
You can also get recommendations for creating instructions that address the negative feedback. Click on the Improve using Feedback button to get suggestions on what instructions you can add to improve the model.