Generative AI (GenAI) is reshaping how businesses innovate, from automating workflows to creating new products. But it’s not full service driving . Without careful navigation, it can lead to costly missteps. In my talk at a Tecpoint.dkseminar on May 22, 2025, hosted by Linak, a Danish actuator company, I shared how companies can make use of GenAI’s potential while avoiding pitfalls like hallucinations, where models generate false information, and compliance traps. This article digs into how to unlock GenAI-powered innovation responsibly across industries, with a practical example from the real world.

Why GenAI matters for innovation

GenAI, powered by large language models (LLMs) or smaller, tailored models, can transform operations in retail, finance, healthcare, and beyond. McKinsey’s “The State of AI” report from March 2025 notes that 78% of organizations now use AI in at least one business function, with GenAI driving productivity gains worth DKK ~16.6-28.1 trillion ($2.6–$4.4 trillion) annually. Yet, GenAI’s power comes with challenges: hallucinations, inaccurate outputs, and compliance risks. Getting it right means balancing innovation with responsibility.

Common pitfalls and how to avoid them

The challenges of GenAI can derail projects. Hallucinations stem from noisy training data or vague prompts. Compliance issues, especially under GDPR and the EU AI Act, arise when sensitive data is mishandled. For GenAI’s general challenges three mitigation strategies comes in handy:

  1. Prompt Engineering: Clear, context-rich prompts reduce errors. For example, specifying “generate a technical specification based on verified Linak user manuals” ensures accurate outputs. Resources like promptingguide.ai offer practical tips for mastering this craft.
  2. Retrieval-Augmented Generation (RAG): RAG pulls real-time data from trusted sources, minimizing hallucinations. It’s ideal for compliance-sensitive applications, as it can keep data local.
  3. Fine-Tuning: Tailoring models to specific tasks improves tone and accuracy but requires curated datasets (50–100 inputs minimum).

A real-world example: Linak’s Small Language Model

At Linak, I implemented a small language model (SLM) to streamline technical documentation. The goal was to retrieve user manuals and generate technical specifications, like user stories, for their actuator products. Using RAG, the SLM accessed a Linak product manual locally, avoiding cloud-based processing to ensure compliance. This was achieved by a rather simple Python script (see the Appendix) that loaded manual content, tokenized user queries, and generated outputs, such as user stories in the format "As a [role], I want [action], so [purpose]". The script makes it possible for Linak to use old product manuals to create new specifications while keeping sensitive data secure. It also showed how an even small-scale GenAI can drive efficiency without risking compliance. This is a model any industry can adopt.

Staying compliant in a regulated world

Compliance is non-negotiable, especially in Europe’s heavily regulated landscape. As I stressed at the Tecpoint seminar, local language models are a game-changer for compliance-conscious firms, offering control over data without sacrificing innovation. To come around the compliance burden, ISO 42001 is created as a framework for implementing ethical and compliant AI, emphasizing data integrity, transparency, and regular audits. Practical steps include anonymizing data, documenting model decisions, and conducting risk assessments. In EU the overall regulations and compliance rules to consider are the well-known GDPR and EU AI Act. The EU AI act was initiated in 2024 and is set for full enforcement in 2026, where it will impose fines up to DKK ~261 million (€35 million) for non-compliance, making proactive governance critical.

Your next steps

GenAI isn’t plug-and-play it’s a tool that demands strategy and oversight. Start by experimenting with prompt engineering, explore RAG for secure data handling, and consider fine-tuning for specialized tasks. Most importantly, embed compliance from day one: map data flows, prioritize security, and train teams on AI ethics. The companies that thrive with GenAI don’t just chase innovation, they build trust.

References:

Appendix:

import os
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig 
import torch

# Load document text from file
document_text_file = "document_text.txt"
if not os.path.exists(document_text_file):
    raise FileNotFoundError(f"{document_text_file} not found.")
with open(document_text_file, "r", encoding="utf-8") as f:
    context_text = f.read()

# Load Gemma-2-2b-it model and tokenizer
# The tokenizer converts text into a format that the model can understand
model_checkpoint = "google/gemma-2-2b-it"
tokenizer = AutoTokenizer.from_pretrained(model_checkpoint, token="[Register for Huggingface and get free token]", use_fast=True)

# Define quantization configuration
quantization_config = BitsAndBytesConfig(
    load_in_8bit=True
)

# Load the model with quantization
model = AutoModelForCausalLM.from_pretrained(
    model_checkpoint,
    token="[Register for Huggingface and get free token]",
    device_map="auto",
    quantization_config=quantization_config
)

# Interactive loop for user queries
print("Gemma-2-2b-it is ready. Ask your questions (type 'exit' to quit).")
print("Example: 'How do you secure the mechanical construction?' or 'Generate a user story for software development.'")
while True:
    user_question = input("> ")
    if user_question.lower() == "exit":
        break

    # Construct the prompt using the specified format
    input_text = (
        f"[INST] You are a product owner working with a user manual for an actuator product. "
        f"Here is the content from the manual:\n\n{context_text}\n\n"
        f"User's input: {user_question}\n\n"
        f"Answer precisely and use the manual as a basis. If you generate requirements (e.g., user stories), "
        f"use the format: 'As [role], I want [action], so [purpose].' [/INST]"
    )

    # Tokenize the input by adding the input text and converting it to PyTorch tensors (multi-dimensional arrays)
    # model.device moves the tensors to the same device as the model (CPU or GPU)
    inputs = tokenizer(input_text, return_tensors="pt").to(model.device)
    input_tokens = inputs.input_ids.shape[1]

    # Set max_new_tokens to min(200, 8192 - input_tokens)
    # 8192 tokens is approximately 32,768 characters (assuming 4 characters per token)
    # 32,768 characters is about 13 pages of text (assuming 2,500 characters per page)
    # ChatGPT-4.1 can handle around 1 million tokens (~1600 pages)
    max_new_tokens = min(200, 8192 - input_tokens)
    if max_new_tokens <= 0:
        print("Input is too long, cannot generate output.")
        continue

    # Generate response
    # torch.no_grad() is a context manager that disables gradient calculation, which reduces memory consumption
    with torch.no_grad():
        output_ids = model.generate(**inputs, max_new_tokens=max_new_tokens)

    # Decode the generated tokens back to text and print the answer
    generated_ids = output_ids[0, input_tokens:]
    answer = tokenizer.decode(generated_ids, skip_special_tokens=True).strip()
    print(f"Answer: {answer}")

Leave a Reply

Your email address will not be published. Required fields are marked *

en_GB