Glossary/AI, LLMs & Data Integration

Model Context

Model Context is the information provided to an LLM in its prompt to guide generation, including system instructions, relevant data, schemas, examples, and constraints that shape the model's output.

LLMs generate responses token-by-token, each decision influenced by the prompt context. Model Context encompasses everything the model "sees" before generating a response: the system prompt (role and behavior instructions), the user query, relevant retrieved data, schema descriptions, examples of correct outputs, and constraints. Effective Model Context is concise yet complete, providing necessary information without overwhelming the model with irrelevant details.

In data analytics systems, Model Context typically includes the database schema (table and column names with descriptions), relationships between tables, sample data showing value ranges and distributions, and the user's question. The order and framing of this context matters significantly. Well-organized schema descriptions with business context ("revenue_2024" vs. generic "column_1") dramatically improve SQL generation accuracy. Examples showing correct translation patterns (question to SQL) improve outputs through in-context learning.

Model Context is distinct from training data: context is information provided per request, while training data shapes the model's knowledge. Context is also distinct from semantic grounding, which refers to the practice of ensuring information is accurate and complete. Effective context engineering is an emerging discipline in analytics: organizations are discovering that spending effort on schema descriptions and context structuring dramatically improves AI analytics accuracy.

Key Characteristics

  • Includes system instructions defining the model's role and behavioral constraints
  • Contains the user's query or goal that the model should respond to
  • Incorporates relevant retrieved data, schemas, and examples from RAG
  • Organized logically to highlight most important information
  • May include constraints (avoid certain operations, limit result sizes) the model should respect
  • Subject to token limits requiring careful selection of what to include

Why It Matters

  • Directly determines accuracy of AI-generated queries and analyses: better context produces better outputs
  • Enables in-context learning where examples train the model for the current task without retraining
  • Allows incorporation of domain knowledge and business rules without model retraining
  • Provides a mechanism to inject current data and schema information into AI systems
  • Reduces hallucination by grounding the model in real information and constraints
  • Scales AI analytics capabilities to new schemas and domains by providing appropriate context

Example

For Text-to-SQL, Model Context includes: system instruction ("You are a SQL expert. Generate valid SQL."), the schema (table definitions with column types and descriptions), example query translations, the user's question, and constraints (no DELETE operations, max 1M rows returned). The model generates SQL informed by all this context.

Coginiti Perspective

Coginiti provides rich Model Context for AI systems through SMDL semantic definitions (dimensions, measures, relationships with descriptions), documentation and metadata describing business logic, and explicit schema information. The semantic layer enables AI systems to understand data at a business level rather than just raw tables, dramatically improving AI analytics accuracy. CoginitiScript's structured block definitions with parameter types and return types provide precise syntax context. Query tags and testing documentation enable AI systems to understand data quality and lineage. Organizations can leverage Coginiti's semantic intelligence as Model Context for building accurate AI analytics systems.

Related Concepts

See Semantic Intelligence in Action

Coginiti operationalizes business meaning across your entire data estate.