Setting Context for Natural Language Queries
This section details how to set context for Natural Language Queries (NLQ) in Kyvos to improve query interpretation and generate more accurate insights based on the user’s business terminology and data context.
To set context for NLQ, perform the following steps.
Navigate to Define Semantics > AI Settings.
Select the Context tab.
For the Business Context, describe the business purpose and usage of this semantic model. Adding this context enables Copilot to create more precise and relevant metadata.
Click Ask Copilot. The dialog is displayed.
On the dialog, complete the following information:
In the Additional Input Prompt field, enter any specific instructions or guidance to help generate the business context (for example, business purpose, domain details, or intended usage).
Click Generate to allow Kyvos Copilot to create the Semantic Model Business Context.
Review the generated content, including the Business Purpose and Sample Questions.
(Optional) Click Clear to remove the input prompt and enter new instructions.
Make any necessary edits to the generated business context directly in the editor.
Review the information.
Click Accept to apply the generated business context to the semantic model. You can also click Cancel to discard the changes and exit without saving.
For the Querying Instructions, define an additional prompt to be included with user input for generating queries. This prompt provides extra context or guidance to refine query results and improve the accuracy of responses.
For the Summary Instructions, specify key insights instructions for generating natural language summaries. This helps tailor the summaries to align with business needs and improve relevance.
To generate relevant follow-up questions, you must add the summary instructions box. Write your summary instructions between:
<FOLLOW_UP_QUES_RULES>
</FOLLOW_UP_QUES_RULES>
Sample query instructions.<FOLLOW_UP_QUES_RULES> Below are the columns and their dependent columns for generating follow-up questions: For Sales column, dependent columns are: Profit, Discount, Product Category For Product Category column, dependent columns are: Product Sub-Category, Product Names For Product Sub-Category column, dependent columns are: Country, State, Shipping Modes, Discount For Shipping Modes column, dependent columns are: Discount, Segment Follow-up Question Generation Rules: Generate only 3 follow-up questions. Each follow-up question must include only one dependent column. Follow-up questions should be context-aware and based on the previous response. Questions should help users drill down into patterns and move toward root cause analysis. Keep questions simple, clear, and easy to understand for end users. Do not generate generic or unrelated questions. Follow-up questions must align with the visualization and data shown. </FOLLOW_UP_QUES_RULES> between <follow up questions> to </follow up questions>. <image>
Click Save. The AI context for the semantic model is set.