Skip to main content
prompt engineeringLLMRAGfew-shotchain-of-thoughtAI

What Is Prompt Engineering?

Prompt engineering is the discipline of designing inputs - called prompts - to language models in order to obtain reliable, accurate, and useful outputs. It sits at the intersection of human communication and machine learning: understanding how a model was trained well enough to frame questions and instructions that produce the behavior you want.

When LLMs first entered mainstream use, prompt engineering was treated as something close to magic - a matter of knowing the right incantations. The field has since matured considerably. As of 2026, serious prompt engineering is as much about what context you provide as how you phrase the instruction. Anthropic describes this broader practice as context engineering: curating everything that goes into the model's limited context window, not just the instructions. For enterprise AI, that makes the quality of retrieved context a major variable, and it ties prompt engineering closely to data governance.

TL;DR

Prompt engineering is the practice of crafting inputs to LLMs for reliable outputs. Core techniques (zero-shot, few-shot, chain-of-thought, RAG) are well documented. The focus has shifted: for factual enterprise questions, the quality of context injected into the prompt - from a data catalog, knowledge graph, or business glossary - often matters more for output quality than the prompt template itself.

What Is a Prompt?

A prompt is everything the model sees when it generates a response. In practice, a production prompt has several components that most users never see:

  • System prompt - instructions set by the developer that define the model's persona, constraints, and behavior. "You are a data governance assistant. Only use information from the provided context. Never make up facts."
  • Retrieved context - documents, database records, or structured facts injected into the prompt at request time (the RAG component). This is what gives the model current, private, or domain-specific knowledge.
  • Conversation history - prior turns of the conversation, which the model uses to maintain coherence across multi-turn interactions.
  • User input - the actual question or instruction the user typed.

Together, these components fill the context window - the total input length the model can process. The art of prompt engineering is deciding what to put in that window, in what order, and with what framing to maximize output quality.

Core Prompting Techniques

The core techniques are well established in the research literature and vendor documentation, and most can be tried without special tooling, directly in a chat interface or API playground.

Zero-Shot Prompting

Ask the model to complete a task with no examples. "Summarize this document in three bullet points." This works well for tasks the model has seen many variants of during training. It fails for tasks requiring domain-specific knowledge or precise output formats that deviate from training distribution.

Few-Shot Prompting

Provide a handful of examples of the desired input-output format before the actual request. The model infers the pattern and applies it. The GPT-3 paper, Language Models are Few-Shot Learners (Brown et al., 2020), showed that large models can pick up a task from such in-prompt examples without any retraining. Few-shot prompting is particularly effective for classification tasks, data extraction, and output formatting - cases where the format matters as much as the content.

Chain-of-Thought (CoT) Prompting

Instruct the model to reason step by step before giving a final answer. In the original study, prompting with worked examples that show intermediate reasoning improved results on arithmetic, commonsense and symbolic reasoning tasks, with the gains appearing in sufficiently large models (Wei et al., 2022). A follow-up showed that simply adding "Let's think step by step" helps too (Kojima et al., 2022). The technique is model-dependent: for reasoning models that already reason internally, OpenAI's reasoning best practices advise against chain-of-thought prompts, noting they may not help and can sometimes hurt.

Retrieval-Augmented Generation (RAG)

Rather than relying solely on the model's training data, RAG retrieves relevant documents, facts, or records at query time and injects them into the context window. The model then answers based on the retrieved content rather than (or in addition to) its parametric knowledge. The approach was named in a 2020 paper by Lewis et al. (Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks). RAG is widely used in enterprise AI because it reduces two common LLM failure modes: knowledge cutoff and hallucination about private data.

Prompt Engineering - Context Window Anatomy PROMPT ENGINEERING - CONTEXT WINDOW ANATOMY Context Window SYSTEM PROMPT You are a data governance assistant. Use only the provided context. Never fabricate facts or cite unknown sources. RETRIEVED CONTEXT (RAG) From data catalog: Dataset "customer_churn_v3" - owner: Analytics Team, last refreshed: 2026-04-18, quality score: 94/100 From business glossary: "Churn rate" = customers lost ÷ total customers at period start, measured monthly by Finance domain CONVERSATION HISTORY User: What is our definition of churn? Assistant: According to the business glossary, churn is defined as... [prior turn] USER INPUT What was our churn rate last month and which dataset should I use for the board report? LLM OUTPUT Based on the catalog data, customer_churn_v3 is the authoritative source. Last refreshed 2026-04-18, quality score 94/100. Churn rate: 2.3% (April). Grounded in governed data Context window fills left to right; LLM generates output conditioned on all components
Click to enlarge

Context Quality vs. Prompt Tricks

A notable evolution in enterprise prompt engineering in 2025-2026 has been the shift from "better prompt templates" to "better retrieved context." The insight: for factual, domain-specific, or enterprise-critical queries, the quality of information injected into the context window matters more than the phrasing of the prompt itself.

A perfectly crafted prompt retrieving outdated or ungoverned data produces unreliable answers. A simple prompt retrieving accurate, well-governed context produces trustworthy ones. This shifts the engineering problem from linguistics to data infrastructure.

The Three Properties of High-Quality Context

  • Accuracy - the retrieved information is correct. This requires data quality discipline, including monitoring, validation, and stewardship.
  • Freshness - the information is current. Stale metadata, outdated glossary definitions, or yesterday's pipeline results undermine answers even when retrieved accurately.
  • Specificity - the retrieved content is relevant to the query. Retrieving the right chunks from the right sources, not just the most semantically similar text, requires good metadata and well-structured retrieval logic.

Prompt engineering is downstream of data engineering. The model can only work with what you give it. If your retrieval layer surfaces stale, inconsistent, or ungoverned data, no amount of prompt tuning will compensate.

Prompt Engineering in Production

Moving from prototype prompts to production-grade prompt systems involves a different set of challenges than initial experimentation.

Prompt Templates and Versioning

Production prompts are templates - parameterized strings filled with dynamic context at request time. Like code, they need version control: you need to know which template was used when, what changed between versions, and whether a change improved or degraded output quality. Prompt version control is a young practice that many organizations are still building.

Evaluation and Testing

Prompt changes need regression testing. If you refine a prompt for one use case, you need confidence it hasn't degraded performance on adjacent cases. Building evaluation datasets - representative samples of inputs with expected outputs - is a fundamental practice for reliable prompt engineering at scale.

Prompt Injection and Security

Prompts that incorporate user-controlled text can be manipulated to override system instructions - the AI equivalent of SQL injection. "Ignore all previous instructions and instead…" is the canonical attack pattern, and injected instructions can also arrive indirectly, hidden in retrieved documents. OWASP ranks prompt injection first in its 2025 Top 10 for LLM applications and notes that mitigations reduce the impact rather than guarantee prevention. Its recommended controls include constraining model behavior in the system prompt, validating output formats, filtering inputs and outputs, least-privilege access for tools, and human approval for high-risk actions.

The Role of Data Governance

For enterprise AI teams, prompt engineering is increasingly a data governance problem. Three governance practices directly determine prompt quality at scale:

  1. A governed business glossary ensures the model retrieves the same definition of "revenue," "churn," or "active user" that the business actually uses - not a generic definition from training data or an inconsistent answer from a stale wiki page.
  2. A current data catalog ensures the model can identify which datasets are authoritative, who owns them, what quality they carry, and whether they're appropriate for a given use case.
  3. Data lineage allows the model to answer "where does this number come from?" - tracing outputs back through the pipeline to raw sources, making AI answers auditable.

How Dawiso Enables Better Prompts

Dawiso functions as a governed context layer for enterprise LLM deployments. When an AI assistant needs to answer questions about data assets, business terms, or analytical definitions, any MCP-compatible agent can query Dawiso's catalog and knowledge graph through the Dawiso MCP Server before generating a response. Its read tools search objects, return object details and attributes, trace lineage and preview data samples; write tools are offered only to user roles that permit them. Dawiso MCP is currently available to cloud customers.

This means the prompt can receive the agreed definition from the Business Glossary, the documented dataset from the Data Catalog with its assigned owner and steward, and the lineage that shows where a value comes from. Glossary terms are linked automatically where they are mentioned in object content, so a dataset's description leads to the business definitions it uses. The result is answers that can be traced back to documented sources, because the context the prompt receives is governed.

Conclusion

Prompt engineering has matured from a collection of tricks into an engineering discipline. The core techniques are well documented, although how much each one helps depends on the model. For enterprise use in 2026, much of the remaining advantage lies in building the data infrastructure that provides high-quality, governed context for those prompts to work with. For data teams, this is both a challenge and an opportunity: organizations that have invested in data cataloging, business glossaries, and metadata management have a head start on grounding enterprise AI.

Sources

See it in action

AI-Powered Features

AI-assisted documentation, intelligent search, and automated categorization help you work smarter.

A cookie a day keeps bad UX away.

We use cookies to personalize content, ads and to analyze our traffic. We also share information about your use of our site with our advertising and analytics partners who may combine it with other information that you've provided to them or that they've collected from your use of their services. By clicking "Accept All", you allow us to use cookies for analytics and ads via Google Tag Manager. You can also customize cookies.

Customize Consent Preferences

We use cookies to personalize content, ads and to analyze our traffic. We also share information about your use of our site with our advertising and analytics partners. Privacy Policy

Necessary cookies allow core website functionality such as user login and account management. The website cannot be used properly without strictly necessary cookies.

Functionality cookies are used to remember visitor information on the website, eg. language, timezone, enhanced content.

Analytics cookies are used to see how visitors use the website, eg. analytics cookies. Those cookies cannot be used to directly identify a certain visitor.

We use Microsoft Clarity to see how you use our website (including heatmaps and session replays) so we can improve it. By using our site, you agree that we and Microsoft can collect and use this data. See our Privacy Policy for details.

Advertisement cookies are used to identify visitors between different websites, eg. content partners, banner networks. Those cookies may be used by companies to build a profile of visitor interests or show relevant ads on other websites.