3.1 Setting Test Cases
Bloom의 분류법 계층구조를 기반으로 개발된 여러 프롬프트 기법들의 효과성을 평가하기 위해, 구조적 요소와 MEP 장비를 단순화한 도면을 사용하였다.
이는 경로 설계와 무관하게 작용할 수 있는 불필요한 정보를 최소화하고, LLM이 순수하게 MEP 경로 설계 과제를 얼마나 효과적으로 해결하는지 명확히
분석하기 위한 목적이다. 구체적으로, 본 연구에서는 250개의 테스트 사례를 설계하여 평가를 진행하였다. 각 사례는 주요 장비(메인 노드) 하나와
서브 장비(서브 노드) 여러 개로 구성되었으며, 이들 간의 연결 관계는 Fig. 3과 같이 1:1부터 1:5까지 총 5가지 카테고리로 나누어 분류하였다. 모든 사례는 벽을 나타내는 사각 형태의 레이아웃 내부에서 메인 장비는 빨간색
원으로, 서브 장비는 녹색 원으로 명확하게 구분하여 표현하였다. 각 카테고리에는 구조적으로 유사한 조건을 가진 50개의 사례가 포함되어 있으며, 다음
두 가지 주요 성능 지표를 체계적으로 평가하였다.
(1) 일관성(consistency): 동일한 사례가 여러 번 주어졌을 때 각 LLM의 출력이 얼마나 안정적으로 유지되는가를 평가
(2) 복잡성(complexity): 연결 관계가 단순한 형태(서브 장비 하나)에서 복잡한 형태(서브 장비 다수)로 변화할 때, 각 LLM이 성능을
얼마나 유지하거나 향상시키는지 평가
Fig. 4는 LLM이 과제를 수행할 때 사용된 입력 데이터 형식의 예시를 보여준다.
Fig. 3. Category: 1 (1:1), 2 (1:2), 3 (1:3), 4 (1:4), and 5 (1:5)
Fig. 4. Input data given to the LLMs in this study
3.3 Prompt Engineering: Applying Bloom’s Taxonomy Levels
설비 경로 설계에서 LLM의 성능을 향상시키기 위해, Bloom의 분류학 계층구조 각 레벨에 맞춰 프롬프트 엔지니어링 기법들을 설계 및 개발하였다.
우선 비교군(레벨 0)으로 특별한 프롬프트 엔지니어링 기법이 적용되지 않은 경우, 즉 LLM에게 Prompt 1과 같이 문제만 제시하고 곧바로 답을
요구하는 방식을 시험하였다. 이를 통해 아무 도움 없이 모델이 자체적으로 달성할 수 있는 기본 성능(일종의 LLM의 현재 능력 한계)을 확인하였다.
그 다음, 레벨 1부터 레벨 6에 걸친 단계별 프롬프트를 순차적으로 도입하여 LLM의 성능 변화를 관찰하였다. 각 단계의 구체적인 내용은 다음과 같다.
Prompt 1: “Find the possible connection routes from the green circle(s) to the red
circle while avoiding black lines. Return coordinates for the route. There could be
more than one green circle so be aware”
3.3.1 Level 1: Remembering
우선 레벨 1인 Remembering 단계는 LLM이 문제 해결에 필요한 기본 정보와 맥락을 기억하거나 상기하도록 유도하는 단계이다. 예를 들어,
제시된 설비 경로 설계 문제의 설명에서 주어진 정보를 사용자에게 역으로 설명하도록 한다. 이를 통해 모델이 경로를 찾는 데 필수적인 사실(예: 경로의
시작점 및 끝점, 구조적 제약 사항)을 놓치지 않도록 한다. 본 연구에서는 이를 “Recollection Technique”이라고 부르며, 프롬프트는
Prompt 2와 같이 “주어진 정보를 구체적으로 정리 및 나열하라.”(요약)과 같이 구성되었다.
Prompt 2: “Based on the provided Base64-encoded image and the accompanying text-based
description, explain in detail the contents of the image. Identify the number, relative
positions, and relationships between the circles and lines as described. Include the
coordinates, dimensions, and any significant patterns or intersections. If any inconsistencies
or unclear information arise, specify them. Your response should clearly articulate
all observable features as if describing them to someone without access to the image
or description”.
“{Prompt 1}”
3.3.2 Level 2: Understanding
레벨 2는 LLM이 주어진 정보와 문제를 확실히 이해하도록 돕는 단계이다. 이 단계에서는 하나의 프롬프트보다 여러 가지 보조 프롬프트를 활용하여 모델의
이해력을 향상시켰다. 먼저 역할 부여 기법(role-based technique)을 사용하여 모델에게 Prompt 3의 전문가(예: 설비 엔지니어)
역할을 부여하고, 해당 관점에서 문제를 바라보도록 지시하였다.
“{Prompt 2}”
Prompt 3: “You are now an expert MEP (Mechanical, Electrical, and Plumbing) engineer
specializing in MEP route design. Your task is to create connection lines for MEP
routes on a simplified structural layout. The black lines represent the structure,
while the red and green circles represent MEP machines. Your objective is to design
MEP routes that connect these machines while avoiding intersections with the structure.
Explain what your role is, why ensuring MEP routes do not intersect with the structure
is critical, and how the elements (black lines, red/green circles) guide the routing
process”.
“{Prompt 1}”
또한 단순 회피 경로를 생성케 하는 것이 아닌 Prompt 4“설비 간 연결 경로는 벽체와 같은 구조적 요소에 평행으로 지나야 하며, 관통해서는 안된다.”(요약)과
같이 어떤 식으로 경로를 생성해야 하는지 이해력을 증강시키는 프롬프트 기법(constraint-aware technique)을 적용하였다.
“{Prompt 2}”
“{Prompt 3}”
{Prompt 1} → Prompt 4: “Based on the provided information, determine the connection
route from each green circle to the red circle while avoiding intersection with black
lines.
The connection lines should be either:
Be placed parallel to the black lines at a safe distance to prevent crossing over
them.
Bypass the start and end points of the black lines if parallel placement is not feasible,
ensuring the path circumvents any obstruction.
Return the coordinates of the routes. The routes do not need to be optimal but must
satisfy the condition of avoiding intersection with black lines”.
이후 Prompt 5와 같이 복잡한 경로 설계 문제를 여러 Step으로 나누어 파악하도록 하는 업무 분할 기법(input and task division
technique)을 적용하였다. 이 과정을 통해 LLM은 문제의 조건과 목표를 정확히 이해하고, 해결하고자 하는 문제를 명확히 인식하게 된다.
Prompt 5: You will be given a task in steps to follow. It's about creating a connection
route under given conditions.
Each step will be given to you one by one. However, since there are many steps, do
not create a connection route until you are specifically asked to do so in certain
steps.
Step1: Understanding the given information.
“{Prompt 2}”
Step 2: Understanding the task.
“{Prompt 3}”
Step 3: Make a connection route.
“{Prompt 4}”
3.3.3 Level 3: Applying
레벨 3에서는 모델이 예시를 기반으로 문제를 해결할 수 있도록 한다. 이를 위해 “Few-Shot Technique” 프롬프트 기법을 활용하였다.
LLM에게 현재 해결하고 자 하는 문제와 유사한 조건에서의 성공 사례 여러 개를 제시하고, 해당 예제에서 올바른 경로를 찾은 과정을 학습하게 한다.
본 연구에서는 Fig. 5와 같이 5개의 간단한 경로 사례와 그에 대한 이상적인 해결 경로를 Prompt 6과 같이 제시하여 모델이 패턴을 인식하도록 유도하였다. 이 예시
학습 단계를 통해 LLM은 경로 찾기의 절차와 요령을 간접적으로 습득하고, 이를 바탕으로 주어진 실제 문제에 적용할 준비를 갖추게 된다.
Fig. 5. Five successful examples for routing given by the LLMs in this study
“{Prompt 5}”
Step1: Understanding the given information.
“{Prompt 2}”
Step 2: Understanding the task.
“{Prompt 3}”
Step 3: Studying successful cases.
Prompt 6: Here are some examples of successful routing cases: 1. Text-based description
of the image: Black Line: start = (200, 500), end = (800, 500) Red Circle: center
= (427, 205), radius =10 Green Circle: center = (366, 810), radius =10 Green Circle:
center = (600, 280), radius =10 Green Circle: center = (215, 645), radius =10 Green
Circle: center = (406, 592), radius =10 Correct connection route: [[(366, 810), (150,
810), (150, 205), (427, 205)], [(600, 280), (427, 205)], [(150, 645), (150, 645),
(150, 205), (427, 205)], [(406, 592), (150, 592), (150, 205), (427, 205)]] …etc.
Thoroughly look at examples and understand how routes are made. Step 4: Make a connection
route.
“{Prompt 4}”
3.3.4 Level 4: Analyzing
레벨 4, Analyzing 단계는 모델이 문제를 체계적으로 분석하고 논리적으로 접근하도록 돕는 단계이다. LLM이 경로를 찾기 전에, 주어진 조건을
분석하여 해결 전략을 수립하도록 해주는 Prompt 7, 프롬프트 기법(route analyzation technique)을 적용하였다. 예를 들어,
“경로를 생성하기 전에, 주어진 구조적 제약 조건을 모두 식별하고 이러한 제약이 경로에 어떤 영향을 미칠지 분석하라.”(요약)와 같은 지시를 내린다.
또한 “사용 가능한 설비 경로 옵션들을 몇 가지 생각하고, 각 옵션의 장단점을 검토하라.”(요약)와 같이 문제를 세분화하여 고찰하도록 유도하였다.
이는 LLM이 경로를 구상하기 전에 필요한 고려 사항을 충분히 검토하게 함으로써, 무작정 시도하는 것을 방지하고 체계적인 추론을 이끌어낸다. 분석
단계의 프롬프트를 통해 모델은 문제를 깊이 있게 파악하고, 실제 경로를 생성하기에 앞서 전략을 세울 수 있다.
“{Prompt 5}”
Step1: Understanding the given information.
“{Prompt 2}”
Step 2: Understanding the task.
“{Prompt 3}”
Step 3: Studying successful cases.
“{Prompt 6}”
Step 4: Analyzing restrictions
Prompt 7: Before creating any connection route in Step 5, we need to identify which
coordinate values must not be used. 1. Gather each black line’s coordinates from the
information you’ve been provided (start and end points). 2. For each black line, define
a ‘no-go zone’ by adding and subtracting 10 pixels from its path. 3. List these restricted
coordinate ranges or zones without creating or adjusting any routes yet. 4. Provide
a concise summary of all no-go zones in a single, easy-to-reference format, ensuring
we know exactly which coordinates are disallowed for routing. Do not finalize or propose
any connection routes right now. Focus exclusively on enumerating the coordinate restrictions
to maintain a safe 10-pixel distance from all black lines. Step 5: Make a connection
route.
“{Prompt 4}”
3.3.5 Level 5: Evaluating
Evaluating 단계에서는, 모델이 스스로 자신의 해법을 평가 및 비판하도록 하는 프롬프트를 제시한다. 일단 LLM이 초안 형태의 경로 해결책을
생성하면, “생성된 경로가 모든 조건을 충족하는지 검토하고, 문제가 되는 부분이 있다면 지적하고 해결책을 제시하라”(요약)와 같은 요청을 Prompt
8을 통해 자신이 제시한 답을 되돌아보게 한다. 이 “Validation and Correction Technique” 기법을 통해 LLM은 잠재적인
오류를 인지하고 수정할 기회를 얻는다. 예를 들어 모델이 제시한 경로가 구조적 제약 조건을 위반한다면, 평가 단계에서 스스로 그 문제를 발견하도록
유도하고, 비판한 뒤 해결책 제시를 통해 결과를 개선하게 한다. 이 단계는 인간 학습자가 자신의 답을 검토하고 피드백을 반영하는 과정과 유사하며,
LLM의 응답 정확도를 한층 향상시키는 역할을 한다.
“{Prompt 5}”
Step1: Understanding the given information.
“{Prompt 2}”
Step 2: Understanding the task.
“{Prompt 3}”
Step 3: Studying successful cases.
“{Prompt 6}”
Step 4: Analyzing restrictions
“{Prompt 7}”
Step 5: Make a connection route.
“{Prompt 4}”
Step 6: Evaluate the given route.
Prompt 8: You are provided with a list of tuples representing the coordinates of routes,
along with walls represented as black lines on the plane. Your task is to calculate
and evaluate whether any part of the given route intersects with the walls. If an
intersection is detected, specify how the route should be adjusted to avoid the intersection,
such as shifting the connection line towards the left, right, top, or bottom by a
certain number of pixels. Additionally, generate an alternative route that avoids
intersecting with the walls. If no intersection is detected, confirm that the route
is valid and does not require any changes and create coordinates of the route same
as given route. Ensure the output includes whether intersections exist, suggested
adjustments (if necessary), and the updated or validated route coordinates, with clear
reasoning.
3.3.6 Level 6: Creating
마지막으로, 최고 수준의 인지 레벨 단계인 “Creating”에 해당하는 프롬프트 엔지니어링 기법을 개발 및 적용하였다. 이 단계에서는 LLM이 막히거나
잦은 오류를 보이는 경우, 다른 LLM이 다양한 다른 접근법을 제시하도록 하여, 창의적으로 문제를 해결하도록 유도하는 다중 관점 기법(different
perspectives technique)을 적용하였다. 구체적으로는 Fig. 6과 같이 우선 A 모델은 총괄 관리자 역할을 수행하며 대화 전반을 모니터링한다.
Fig. 6. Different perspectives technique system architecture
대화 주제가 연구 목적에서 벗어날 경우 개입하여 토론을 재조정하고, B 모델과 C 모델 사이에 의견 충돌이 발생하면 사전에 정의된 충돌 회피 기준을
바탕으로 각 경로의 안전성을 평가하여 중재를 수행한다. 이 평가 결과가 설정한 기준을 충족하면 그 결과를 사용자 에게 전달하고, 기준에 미달하면 추가
수정 과정을 위 해 대화 세션을 다시 시작한다.
B 모델은 실제 경로 생성을 담당하며 전통적인 찾기 알고리즘(A* 알고리즘, 다익스트라 알고리즘 등) 또는 직관적 휴리스틱에 기반한 방식을 활용하여
초기 해를 산출한다. 생성된 경로는 C 모델에 전달되어 자동화된 비판 절차를 거치며, C 모델은 각 경로에 대해 장애물 회피 성능, 안전성 검증,
연산 효율성 등을 평가한 뒤 구체적인 개선 방향을 제시한다. 이러한 피드백을 반영하여 B 모델은 대체 알고리즘을 선택하거나 파라미터를 조정하여 경로를
재생성한다. 이처럼 순차적이고 반복적인 대화 구조 안에서 모델들은 서로의 출력을 검증 및 보완하며 고착된 사고 방식에서 벗어나 다양한 해결책을 탐색할
수 있었다.
지금까지 언급한 레벨 1~6에 해당하는 프롬프트 기법들은 개별적으로 LLM에 제시된 것이 아닌, 함께 순차적으로 적용되었다. 예를 들어, 먼저 기억
단계의 질문에 대한 응답을 얻은 후, 이를 바탕으로 이해 단계 질문을 수행하는 식으로 대화형 프롬프트 체인을 적용하였다. 각 레벨에서의 결과는 다음
단계의 입력으로 활용하거나, LLM의 내부 상태에 영향을 주어 최종적인 답안을 생성하게 한다. 이후, 생성된 결과는 Fig. 7과 같이 구조적 제약 조건들을 만족하였는지 알고리즘에 의하여 분석되며, 모델별 그리고 카테고리별 실패 및 성공 개수에 따라 정확도를 산출한다.
Fig. 7. Sample test result