DX-AI Contexity

Context Engineering for Manufacturing Domain

What is Context Engineering?

"It is an overall system design method that involves strategically selecting, compressing, storing, and isolating only the necessary information into the context window so that AI, such as large language models (LLMs), can perform a given task more accurately and efficiently."

Providing Context for AI Task Execution

A broad approach that deals with how to provide and design 'context', i.e., 'situational information' such as past conversation history, external knowledge, user information, tool usage history, etc., for AI to perform tasks well

Overall Process Management

Includes the entire conversation process, memory, tool usage, long-term information flow, and overall state management

Information Management Strategy

Strategies for selecting and summarizing necessary information to record in memory or retrieve it again

(Select, Compress)

Topic Isolation Management

Managing different topics or contexts in isolation

(Isolate)

Practical Design

Designed to enable actual tasks

(e.g., report writing, schedule management, etc.)

Context Engineering Examples

"AI helps understand complex situations like humans and solve real problems, so it is being widely applied to various industries and services."

Customer Service Chatbot

Dynamically combines customer's previous inquiry history, product order information, and ongoing request status to provide customized answers and automated tasks (e.g., parcel reservation, refund processing, etc.). RAG (Retrieval-Augmented Generation) can also refer to policies or history for more accurate responses.

In-house AI Assistant/Work Agent

Analyzes member's schedule, history, past meeting content, priorities, etc. to provide customized support such as preparing meeting materials, summarizing tasks, and notifying important emails.

Education (Edutech) AI Tutor

Provides personalized learning content, problem recommendations, and real-time feedback by reflecting the student's previous learning history, incorrect answer types, understanding level, and preferred topics as context.

Smart Home/Car/IoT

It is applied to energy saving, automatic driving, and smart control by considering not only user's commands but also real-time sensor data, past usage patterns, and external environment information as context. For example, the command "It's cold" combines temperature, patterns, and preferred settings to respond intelligently.

Healthcare/Medical AI

Integrating patient's medical records, previous symptoms, medication history, and real-time test data enables more accurate consultation, health monitoring, and customized health management advice.

Financial AI Service

It is used for personalized financial analysis, investment portfolio management, and automated financial consultation by reflecting complex contextual information such as customer's investment tendency, asset status, past transaction history, and risk level.

Real-time support and coding assistant: By analyzing developer's work context, code history, and project files in real time, it is possible to provide situation-specific support such as code writing, refactoring, and error explanation.

Its utilization is increasing in almost all industrial fields where AI needs to actively respond to the actual environment and user's needs, such as news summarization, complex workflow automation, and multi-agent collaboration.

Context Engineering Technical Requirements

“A strategic system design technology that systematically designs, manages, and provides all the information, structure, and tools needed for the model so that AI, especially LLM (Large Language Model) systems, can perform tasks more accurately and reliably."

Information Flow

Design how to place all relevant information, such as system messages, user input, previous conversation summaries, external data, and tool call results, within the LLM's context window.

Dynamic Context Provision

Provide more customized results by reflecting necessary external information (such as RAG) and tool/API results in real time according to user requests and situations.

Persistence and Scale

Optimized design for various user flows, including long-term conversations, sessions, and multi-agent systems, as well as clear answers to single questions.

Selection/Compression/Storage/Isolation

Overcome context limitations by using strategies such as prioritizing information, summarizing (compressing), isolating unnecessary information, and storing separately by topic.

Structuring Responses

Design the results generated by AI to be returned in a structured format (JSON, tables, etc.) to improve post-processing and connectivity.

Context Window

"In the latest LLMs, ultra-large context windows of over 1 million tokens are being commercialized, but actual AI quality and operational efficiency must be considered, and attention should be paid to the occurrence of efficiency and response quality degradation and high costs."

What is Context in Domain Business?

"In Domain Business, context" refers to the collection of information that enables an AI agent to comprehensively understand the situation by simultaneously and synchronously combining structured, semi-structured, and unstructured data sources scattered throughout the manufacturing site, rather than using only a single type of data when making decisions or recommendations."

Structured Context

  • Real-time time-series data: Sensor values (PLC, IoT Prism) such as temperature, pressure, speed, and power for each facility
  • Relational DB tables: Production plan/performance, quality inspection results, inventory/material status (SQL)
  • Batch reports: Summary tables of weekly/monthly reports (production volume, defect rate)

Example:

  • Production volume table by line to be used when calling getProductionTrend(lineId, period)
  • getQualityStats(batchId) for querying quality benchmarks (specs)

Semi-structured Context

  • Logs & Event Streams: Facility alarms/events in JSON/XML format, operator input logs
  • Interface messages: FTP/SMB files, MQTT message payloads
  • History reports: Field/attribute-based data coming from spreadsheets (CSV/XLS) or API calls

Example:

  • Facility alarm log (JSON) → alarm trigger exceeding threshold
  • Operator comments ("Inspection complete", "Replacement needed") → post-processing script input

Unstructured Context

  • Text documents: Work manuals, SOP (Standard Operating Procedures), facility specifications (PDF, DOCX)
  • Natural language conversations: On-site inquiries/emails, operator utterances converted from voice to text
  • Images/Videos: Product appearance defect photos, CCTV line videos, X-ray inspection images

Example:

  • Querying manuals/past defect case documents when requesting "Analysis of the cause of defect A"
  • Identifying specific facility parts in camera footage and calling runWhatIfScenario

Multimodal Context

Combining the above three to link information from different times, spaces, and media

  • Time synchronization: Sensor values ↔ CCTV video frames → anomaly detection
  • Linking place/situation: IoT location information ↔ worker voice recording ↔ facility manual
  • Knowledge graph integration: Process flowcharts (graphs) ↔ experiment/simulation results ↔ natural language queries

Example:

"Find the section where 'sudden temperature increase' and 'increased vibration' occurred simultaneously on line B last week"

  1. Sensor time series → correlation analysis
  1. CCTV video snapshot at that time
  1. Manual/inspection record RAG (Retrieval-Augmented Generation)

Multimodal Context

"Multimodal means that instead of using the previous three (structured, semi-structured, unstructured) in a single mode, multiple modes are simultaneously and synchronously combined to allow the agent to have a richer situational awareness."

Tabular/Time Series (Structured)

PLC sensor readings, ERP production volume table

Logs/Messages (Semi-structured)

JSON alarms, CSV inspection history

Text/Documents (Unstructured)

SOP manual, email/voice transcription

Images/Videos (Unstructured)

Line CCTV, inspection equipment X-ray

Why is it needed?

Supplements context that can be missed with a single mode

Improves the accuracy of anomaly detection and root cause analysis through cross-validation

The agent comprehensively determines "when, where, and what" to make complex decisions

Multimodal Combination Method

01

Time Synchronization

  • Match sensor value ↔ CCTV frame timestamps
  • Snapshot of the site video at the time of event log occurrence
02

Location/Facility Association

  • Temperature increase of a specific equipment ID ↔ Inspection manual for that equipment
  • RFID location information ↔ Worker voice instruction recording
03

Cross-Modal Inquiry

"Abnormal vibration in line A on ○ month ○ day" →

  1. Vibration sensor time series chart,
  1. Alarm log (JSON) search,
  1. Inspection report/manual PDF RAG (document search)
04

Knowledge Graph Integration

Hierarchical relationship between process and equipment (KG) ↔ Simulation results ↔ Natural language query

Multimodal Context Engineering Platform

1

Data Ingestion

2

Data Quality Improvement (Enrichment)

3

Context Packaging

4

Storage & Indexing

5

Retrieval

6

Prompt Assembly

7

Chatbot & Dashboard

Data Integration, DX-AI Contexity Based on LLMOps Platform


Use Case: Non-conformance Analysis Workflow, AI Agent Implementation (Moisture NG)


Use Case 'Non-conformance Analysis Workflow, AI Agent' Core Values

Future Directions in Context Engineering

We provide high-quality AI responses quickly and reliably by combining knowledge and contextual information across the entire domain, going beyond simple data retrieval.

1. Domain Modeling & Context Classification

Define Context Types

  • Real-time Sensor Data: Time-series values such as outlet/inlet humidity, drying temperature, residence time, etc.
  • Batch Metadata: LOT ID, production line, operator, start/end time
  • Past Improvement Cases: Improvement measures taken during previous NG occurrences, effects (Δwt%)
  • Domain Rules/Thresholds: Standard humidity limits (e.g., 0.5%), process standard manual
  • Operating Status: Driver online/offline status, equipment maintenance history

Onto-KG Construction

  • Create a simple ontology linking batch, equipment, sensor, event, and improvement action entities
  • Ex: (ProductionBatch)-[hasSensorReadings]->(SensorData), (QualityEvent)-[handledBy]->(Operator)

2. Context Collection & Preprocessing

Event-Based Trigger

If a sensor value is detected at a critical level (severity=high), the non-conforming context pipeline is automatically activated.

Multiple Connectors

Collect recent sensor records from the time series DB (IoT Prism), batch metadata from the MES API, and past improvement meeting minutes (text) from the document repository.

Preprocessing & Feature Extraction

After missing value imputation and outlier filtering, statistical summaries (mean, variance, trend slope) using a sliding window, correlation analysis between key variables, and anomaly patterns are detected.

3. Context Storage & Search Infrastructure

Vector DB (FAISS)

  • Stores past meeting minutes by paragraph embeddings
  • Keyword similarity-based search for terms like "humidity" and "residence time"

Time Series DB

  • Stores real-time sensor summaries (rolling-window) using InfluxDB, etc.

Ontology Graph

  • Indexes batch, equipment, and event relationships in Neo4j, etc.
  • Supports queries like "past events similar to this batch"

4. Dynamic Assembly

Priority Queue

Prioritize and sort based on context importance, recency, and relevance.

  • Severity: High > Medium > Low
  • Recency: In the order of recent 1 hour, 6 hours, 24 hours
  • Relevance: Correlation coefficient |r| > 0.7, past improvement effect Δwt% ≥ 0.1

Multi-Level Summary

Summarize the context in multiple levels to adjust the depth of required information.

  • Level-1: 1–2 sentence Summary (key indicators and anomalies)
  • Level-2: Key statistics + chart URL
  • Level-3: Excerpted paragraphs from past meeting minutes

Token Budget Management

Dynamically construct the optimal context considering the LLM's token limits.

  • Top priority Context(L1) + L2/L3 merged if necessary
  • Sliding window like "L1 80 tokens + L2 150 tokens"

5. Prompt Design & RAG Injection

System Prompt

You are an AI specializing in MISO manufacturing. Help analyze the causes of non-conforming moisture (NG), suggest improvements, and generate reports.

User Prompt Template

"The exit humidity of LOT {lot\_id} exceeded the standard ({threshold}%) at {exit\_humidity}%. Based on recent 24-hour sensor trends, past similar events, and operating history, please briefly explain the cause of the problem and improvement recommendations."

RAG Keyword Injection

  • Extract 3 similar paragraphs with "exit\_humidity" and "residence\_time" from Vector DB
  • Query 2 past "QualityEvent" cases of the same equipment/line with Onto-KG

Context Block Delivery Order

  1. Batch/Line Metadata
  1. Sensor Summary (Level-1)
  1. Past Improvement Summary (L2)
  1. Operation/Ontology Reference (L3, if needed)

Expected Effects of Future Context Engineering

Systematic Use of Domain Knowledge

By clearly defining key entities such as batch, equipment, sensors, events, and improvement measures, and their relationships through ontology-based knowledge graphs (Onto-KG), we construct context with "meaningful information" rather than fragmented data.

Efficiency in Selecting Only Necessary Information

By collecting real-time sensor data, batch metadata, past improvement cases, domain rules, and operation history through multi-channels at the time of event triggering, and injecting only the core context into the LLM through priority queue, multi-level summary, and token budget management, we optimize response speed and token cost.

Improved Accuracy and Reliability

By automatically searching for similar cases based on correlation coefficients, past improvement effects (Δwt%), and operation history, and injecting them into RAG, we generate analysis and recommendation results with clear evidence.

Flexible Scalability

By utilizing a search and storage infrastructure that combines vector DB (FAISS), time-series DB, and ontology graphs, you can easily expand the context model even if new sensors or process variables are added, or if the process changes.

Operation and Monitoring Support

By monitoring token usage and response quality in the Dynamic Assembly stage, and adjusting context level and RAG keyword strategies as needed, you can continuously improve system performance.