Prompt Engineering Engine for Accurate LLM Code Generation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing systems struggle to efficiently generate prompts for large language models (LLMs) that elicit accurate and desired responses specific to a computing environment, often resulting in incorrect or incomplete code generation.

Innovation Solution

The implementation of a prompt engineering engine that processes user prompts, augments them with necessary context and configuration details, and submits these pre-processed prompts to LLMs to ensure accurate and relevant responses, tailored to the specific computing environment.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Manufacturing precision

If a developer manually crafts prompts for LLMs, then the prompt can be optimized for specific computing environments, but the process is time-consuming and inefficient

Engineering Contradiction:
Improvecode accuracyVSAvoidprompt engineering time
Core Design Contradiction:
Manufacturing precisionVSLoss of time

Solution Approach 1:

The system performs preliminary actions by automatically generating and pre-processing prompts before they are submitted to the LLM. The prompt engineering engine incorporates computing environment details, configuration parameters, and best practices into the prompt in advance, eliminating the need for manual optimization while ensuring accuracy for the specific target environment.

Inventive Principle:
Principle #10Preliminary action

2Productivity

If generic prompts are used for LLMs, then the process is simple and fast, but the code generated is incorrect or incomplete for specific computing environments

Engineering Contradiction:
Improvecode generation speedVSAvoidcode accuracy
Core Design Contradiction:
ProductivityVSManufacturing precision

Solution Approach 1:

The system applies local quality by tailoring the prompt to specific computing environments and requirements. The prompt engineering engine incorporates environment-specific details, configuration parameters, and best practices into the generated prompt, ensuring that the code produced is both fast and accurate for the particular target environment rather than using a one-size-fits-all approach.

Inventive Principle:
Principle #3Local quality

3Manufacturing precision

If the prompt includes detailed computing environment context, then the LLM response is more accurate, but the prompt becomes more complex and harder to manage

Engineering Contradiction:
Improvecode accuracyVSAvoidprompt complexity
Core Design Contradiction:
Manufacturing precisionVSDevice complexity

Solution Approach 1:

The prompt engineering engine acts as an intermediary between the developer's high-level requirements and the LLM. It automatically incorporates computing environment details, configuration parameters, and best practices into the prompt, managing the complexity of environment-specific context while keeping the developer's interface simple and the overall system maintainable.

Inventive Principle:
Principle #24Intermediary (Mediator)

4Productivity

If the system automatically generates prompts without environment context, then the process is efficient, but the code does not match the target computing environment requirements

Engineering Contradiction:
Improveprompt generation efficiencyVSAvoidenvironment adaptability
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

The system implements dynamics by automatically adapting the prompt to the specific computing environment being targeted. The prompt engineering engine incorporates environment-specific details, configuration parameters, and best practices dynamically based on the target environment, enabling efficient automated prompt generation that remains highly adaptable to different computing environments without manual intervention.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentEP4553646A1Prompt engineering engine
Publication Date: 2025.05.14 SAP SE
  • EP4553646A1 patent drawingFigure 1
  • EP4553646A1 patent drawingFigure 2
  • EP4553646A1 patent drawingFigure 3

AI summary

A system and method including receiving a prompt specifying at least one task type; determining a system prompt based on the received prompt, the system prompt including artificial intelligence (Al) system configuration details corresponding to the at least one task type; pre-processing the system prompt to generate a pre-processed prompt including code referenced in the system prompt; transmitting, as an input prompt, the pre-processed prompt to an Al system; receiving, in response to the Al system executing the pre-processed prompt, a result from the AI system; and storing a record of the result from the AI system in a data repository.