Setting Context for Natural Language Queries

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 natural language queries, perform the following steps.

  1. From the Toolbox, click Semantic Models.

  2. Select a semantic model from the list. 

  3. Click the AI Settings tab and then select the Context tab.

  4. For the Business Context, describe the business purpose and usage of this semantic model. Business Context offers insight into the semantic model, helping the AI to produce more accurate responses. Adding this context enables Kyvos Copilot to create more precise and relevant metadata.

    image-20260320-135756.png

     

    • Querying Instructions: Provide context to be included with user input for generating queries. This helps guide query generation, refine results, and improve response accuracy.

      image-20260320-120835.png

       

    • Summary Instructions: Provide context to be included with user input for generating natural language summaries. This helps tailor the summaries to better align with business needs and improve relevance.

      image-20260320-120848.png

       

    • To generate relevant follow-up questions, specify the instructions that guide Kyvos Dialogs in producing such questions. Add these instructions to the summary instructions box. Write your summary instructions between, as described in sample below:
      <FOLLOW_UP_QUES_RULES>
      Summary instructions
      </FOLLOW_UP_QUES_RULES>
      Sample instructions to create follow up questions

      <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>

       

      image-20260127-112651.png
  5. Click Save. The AI context for the semantic model is set.

 

Generating Business Context Using Kyvos Copilot

Kyvos Copilot enables users to automatically generate business context for a semantic model, including the business purpose and sample questions, using AI assistance.

To generate the business context, open the Ask Copilot dialog and provide optional input prompts to guide the generation process. Kyvos Copilot then creates the business context, which you can review, edit if required, and apply to the semantic model.

To generate Business Context Using Kyvos Copilot, perform the following steps.

  1. Click Ask Copilot. The Ask Kyvos Copilot dialog is displayed.

    image-20260119-072228.png

     

  2. On the dialog, complete the following information:

    1. 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).

    2. Click Generate to allow Kyvos Copilot to create the Semantic Model Business Context.

    3. Review the generated content, including the Business Purpose and Sample Questions.

    4. (Optional) Click Clear to remove the input prompt and enter new instructions.

    5. Make any necessary edits to the generated business context directly in the editor.

    6. Review the information.

    7. 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.

Copyright Kyvos, Inc. 2025. All rights reserved.