Setting up Context for Natural Language Queries
This documentation is for Kyvos 2026.6.x. To view documentation for other Kyvos versions, click here. |
|---|
Overview
You can define contextual information that helps the AI better understand your business data and generate more accurate, relevant, and consistent responses. You can configure both Global Context and Personal Context to guide the AI's interpretation of user queries and its generation of summaries in chat sessions.
Global Context provides shared instructions and metadata that apply to all users of an AI Space. It includes AI Space-level instructions and semantic model context, enabling the AI to understand business terminology, query behavior, and data semantics.
Personal Context allows individual users to customize AI behavior by defining their own instructions and managing verified queries. These settings apply only to the current user for the AI Space, enabling a more personalized conversational experience.
Unlike Personal Context, which applies only to an individual user, Global Context is shared across all users and serves as the default context for the AI Space.
Setting up global context
The Global Context allows users and AI Space owners to define shared instructions that apply to all users of an AI Space. These instructions provide business-specific context and query guidance, helping the AI generate more accurate and consistent responses for everyone using the AI Space.
Note
Changes made under Global Context apply to all users of the selected AI Space. Users can further customize AI behavior for themselves using Personal Context, but the global instructions continue to serve as the default context for the AI Space.
To configure Global AI Space context, perform the following steps.
Click the Context tab.
Under Global Context, select AI Space Instructions.
In the AI Space Instructions section, provide the following details:
In the Business Context field, provide information about the business domain, purpose, and usage of the AI Space. This helps the AI understand the business context when interpreting user queries.
In the Querying Instructions field, enter guidelines that the AI should follow while generating queries, such as business rules, preferred calculations, or query behavior.
In the Summary Instructions field, specify how AI-generated summaries should be formatted or what information they should emphasize.
(Optional) Refer to the Instruction Tips pane for guidance and sample instructions while defining the context. The Instruction Tips panel provides guidance and examples for writing effective instructions. It includes best practices and sample content to help you create meaningful business context, querying instructions, and summary instructions.
Click Save Context to save the instructions. You can also click Discard to restore the previously saved instructions.
Updating semantic model context instructions
The semantic models associated with the selected AI Space are displayed in this section. For each semantic model, you can also define business context and provide column-level metadata to describe the business purpose and meaning of the data. This information helps the AI better understand your data, interpret user queries more accurately, and generate relevant responses.
Note
The context configured for a semantic model is shared across all users of the AI Space and supplements the AI Space instructions. It helps the AI interpret business terminology and generate more accurate responses based on the selected semantic model.
To update semantic model context instructions, perform the following steps.
To open this page, navigate to Context and select the required semantic model under Global Context.
Provide the business context section allows you to describe the purpose, scope, and business usage of the semantic model. Providing clear business context helps the AI understand the data represented by the semantic model and generate more accurate and meaningful responses.
Define metadata for individual columns in the semantic model. Providing descriptive metadata helps the AI correctly interpret column meanings, business terminology, and relationships when generating queries and responses.
(Optional) Refer to the Instruction Tips pane for guidance and sample instructions while defining the context. The Instruction Tips panel provides guidance and examples for writing effective instructions. It includes best practices and sample content to help you create meaningful business context. For column-level metadata, tips are being updated on defining business context and tags for each column.
Setting up personal context
The Personal Context feature allows users to define personalized instructions and preferences for an AI Space. Users with feedback preservation privileges can define personalized instructions. These instructions help the AI agent generate responses that align with the user's specific role, business requirements, terminology, and reporting preferences. Unlike AI Space-level instructions, Personal Context settings apply only to the current user and do not affect other users' experience.
Users can configure querying rules, response formatting preferences, value-to-column mappings, phrase definitions, and verified queries to create a customized conversational analytics experience.
Key Benefits
Personalized AI responses based on individual preferences.
User-specific query generation rules and summary formats.
Improved query accuracy through value-to-column mappings.
Consistent business terminology using phrase definitions.
No impact on the experience of other users within the same AI Space.
Adding AI Space instructions
Important
AI instructions are applied at the AI Space level, not at the individual chat session level. If you create multiple chat sessions using the same AI Space, any updates to the AI instructions are automatically applied to all chat sessions associated with that AI Space.
To set up personal context, perform the following steps.
Navigate to the Context tab.
In the left navigation pane, under Personal Context, click:
AI Space Instructions to define personal instructions.
Provide details for the following supported instruction types:
Querying Instructions: Use Querying Instructions to define rules that guide query generation. For examples:
Always apply a specific region filter.
Assume a default value when a parameter is not specified.
Apply organization-specific business logic.
Summary Instructions: Use Summary Instructions to customize how the AI agent summarizes query results. For examples:
Generate concise executive summaries.
Include key takeaways as bullet points.
Limit summaries to a specific word count.
Value-to-Column Mapping: Use Value-to-Column Mapping to help the AI resolve values to the correct dataset columns. For examples:
Resolve city names using the City column.
Resolve product names using the Product column.
Map business-specific terms to designated attributes.
Phrase Definition: Use Phrase Definitions to define the meaning of commonly used business terms and phrases. For examples:
Define organization-specific KPIs.
Standardize business terminology.
Clarify abbreviations and domain-specific language.
After entering or updating instructions, Click Save Context. The settings are saved for the current user only. Future queries within the AI Space use these instructions to generate more personalized responses. To discard unsaved changes, click Discard.
Verified Queries to manage user-specific verified queries.
Managing Verified Queries
Note
Upgrading to a version that includes the personalization feature automatically deletes all existing column and value feedback. Ensure that you back up your existing feedback before upgrading.
The Verified Queries page allows users to view and manage previously verified Natural Language Queries (NLQs). Verified queries act as trusted examples that help improve SQL generation and response accuracy for similar questions in future interactions. These queries are stored as part of the user's personal context and are available only to the user who verified them. You can also delete them at any point in time.
Verified queries are user-specific and do not affect other users of the AI Space.
Verified queries help improve the consistency and accuracy of responses for similar analytical questions.
Deleting a verified query removes it from your personal context but does not affect the underlying data or AI Space configuration.
You can review the generated SQL associated with a verified query before deciding whether to retain or delete it.
To view verified queries, perform the following steps.
Open the required AI Space.
Navigate to the Context tab.
Under Personal Context, click Verified Queries. The Verified Queries page displays all queries that have been verified by the current user within the selected AI Space.
The Verified Queries section shows the following information:
Verified Query – The natural language query that was verified.
Updated On – The date and time when the query was last verified or updated.
SQL Query – View the SQL generated for the verified query by clicking Show SQL Query.
For verified queries, you can also perform the following:
Search – Search for a specific verified query.
Filter – Filter verified queries based on available criteria.
Refresh – Refresh the list to display the latest verified queries.
Deleting Verified Queries
To delete one or more verified queries, perform the following steps.
Open the Verified Queries section.
Select the checkbox corresponding to the query you want to remove.
Click Delete.
Confirm the deletion when prompted.
The selected verified query is removed from your personal context and is no longer used as a trusted example for future query generation.