Docs Menu
Docs Home
/

MongoDB 사용한 Agentic Yield Analytics

원격 측정, 결함 이미지 및 RCA 보고서를 위한 단일 플랫폼입니다. 멀티모달 검색 사용하여 근본 원인을 더 빠르게 찾을 수 있습니다.

사용 사례: 인공 지능

산업: 제조 및 모션

제품 및 도구: MongoDB Atlas, MongoDB Atlas Vector Search, MongoDB Time Series Collections

파트너: Amazon Bedrock, Amazon Web Services, LangChain

반도체 제조는 연결이 끊긴 시스템에서 대량의 데이터를 생성합니다. 편차가 발생하면 센서 원격 측정, 결함 이미지 및 기록 RCA 보고서의 상관 관계를 수동으로 가져와 문제의 원인을 찾아야 합니다. 이 프로세스 몇 시간이 걸리며 계획되지 않은 다운타임으로 인해 시간당 최대 1 백만 달러의 비용이 발생합니다.

Agentic AI 시스템은 LLM, 특수 도구 및 영구 메모리를 결합하여 장애를 자율적으로 조사합니다. 멀티모달 검색 통해 원격 측정, 이미지, 지식을 단일 플랫폼에서 통합함으로써 AI 에이전트는 사용자가 해결에 집중하는 동안 근본 원인을 더 빠르게 찾을 수 있습니다.

이 솔루션은 Wafer fab의 편차 감지 및 근본 원인 분석에 중점을 둡니다. 다양한 제조 시나리오에 동일한 아키텍처를 적용 할 수 있습니다.

To build this solution, agentic systems require timely and contextual access to data. Traditional fab IT systems store telemetry, images, and knowledge in separate databases, which makes it difficult for agents to analyze the full context.

MongoDB Atlas 시계열, 벡터 및 문서 데이터에 대한 네이티브 지원 제공합니다. 반도체 에이전트형 AI 의 경우, MongoDB Atlas 다음을 지원합니다.

  • Sensor telemetry ingestion: This capability allows you to ingest high-volume sensor data in real time using specialized Time Series Collections.

  • 멀티모달 임베딩 저장: 이 플랫폼은 이미지와 텍스트 임베딩을 모두 저장하여 웨이퍼 결함에 대한 고급 시맨틱 검색을 용이하게 합니다.

  • Agent memory persistence: This feature maintains a record of conversation states and agent history to ensure full auditability and the ability to resume sessions.

  • Low-latency scalability: The architecture scales dynamically to handle massive streaming data loads while maintaining high performance.

MongoDB Atlas 사용하면 산업 데이터와 에이전트형 AI 기능을 통합하여 사후 문제 해결에서 자동 조사로 이동할 수 있습니다.

Use this solution to build an agentic AI system for semiconductor yield optimization using MongoDB Atlas, LangGraph, and Amazon Bedrock. Together, these technologies automate excursion detection, root cause analysis, and defect pattern matching across multimodal data. This solution works as follows:

The architecture follows a real-time event-driven pattern. Machine telemetry flows into MongoDB Atlas, where the Excursion Detection System monitors sensor streams using Change Streams. When the system violates a threshold, it creates an alert and starts the root cause agent. The root cause agent uses three specialized tools to investigate:

  • Query Wafer Defects(웨이퍼 결함 쿼리): 멀티모달 벡터 검색 수행하여 유사한 과거 결함 패턴을 찾습니다.

  • Query Historical Knowledge: Searches RCA reports and technical documentation using semantic embeddings.

  • Query Time Series Data: Analyzes sensor telemetry around the excursion window using the Aggregation Framework.

Users interact with the system through a Live Monitoring Dashboard. The dashboard displays real-time alerts, sensor charts, and wafer defects. You can also chat directly with the Root Cause Agent to investigate incidents or ask follow-up questions. Each tool in this architecture queries MongoDB Atlas directly. The agent's memory and conversation state persist in checkpoints, enabling audit trails and session resumption.

MongoDB 사용한 Agentic Yield Analytics

Figure 1. Agentic Yield Analytics with MongoDB

이 솔루션은 Voyage AI의 voyage-multimodal-3 모델을 사용하여 웨이퍼 결함 이미지를 텍스트 컨텍스트와 결합하는 임베딩을 생성합니다. 이를 통해 시각적 패턴과 설명 텍스트 모두에서 의미론적 유사성 검색 가능합니다.

The EmbeddingService class handles embedding generation using the Voyage AI client:

import voyageai
from PIL import Image
import base64
import io
class EmbeddingService:
def __init__(self):
self.voyage_client = voyageai.Client(api_key=os.getenv("VOYAGE_API_KEY"))
self.multimodal_model = "voyage-multimodal-3"
self.embedding_dimension = 1024
async def generate_image_embedding(
self,
image_data: str,
text_context: str = None
) -> List[float]:
"""Generate multimodal embedding from image and text."""
# Decode base64 image to PIL Image
image_bytes = base64.b64decode(image_data)
pil_image = Image.open(io.BytesIO(image_bytes))
# Combine text and image inputs
inputs = []
if text_context:
inputs.append(text_context)
inputs.append(pil_image)
# Generate embedding
result = self.voyage_client.multimodal_embed(
inputs=[inputs],
model=self.multimodal_model,
input_type="document"
)
return result.embeddings[0]

각 웨이퍼 결함 문서 에 대해 파이프라인 다음 조치를 수행합니다.

  1. 관찰 가능한 특성(웨이퍼 ID, 결함 패턴, 장비, 수율, 웨이퍼 설명)에서 텍스트 콘텐츠를 작성합니다.

  2. Fetches the ink map image from Amazon S3.

  3. Generates a multimodal embedding combining both inputs.

  4. embedding 필드 에 1024차원 벡터를 저장합니다.

# Build text from observable facts only (not suspected causes)
text_content = f"Wafer ID: {wafer['wafer_id']} "
text_content += f"Defect pattern: {wafer['defect_summary']['defect_pattern']} "
text_content += f"Equipment: {wafer['process_context']['equipment_used'][0]} "
text_content += f"Yield: {wafer['defect_summary']['yield_percentage']}%"
# Get image data
image_data = wafer["ink_map"]["thumbnail_base64"]
# Generate multimodal embedding
embedding = await embedding_service.generate_image_embedding(
image_data=image_data,
text_context=text_content
)
# Store in document
await db.wafer_defects.update_one(
{"_id": wafer["_id"]},
{"$set": {
"embedding": embedding,
"embedding_type": "multimodal",
"embedding_model": "voyage-multimodal-3"
}}
)

MongoDB Atlas 에서 wafer_defects 컬렉션 에 벡터 검색 인덱스 만듭니다.

{
"name": "wafer_defects_vector_search",
"type": "vectorSearch",
"definition": {
"fields": [
{
"path": "embedding",
"type": "vector",
"numDimensions": 1024,
"similarity": "cosine"
}
]
}
}

이를 통해 루트 원인 에이전트는 새 웨이퍼에 알려진 루트 원인이 없는 경우에도 벡터 검색 사용하여 유사한 과거 결함을 찾을 수 있습니다.

Tools are domain-specific functions that enable the agent to interact with MongoDB Atlas. They query sensor data, perform semantic search, and retrieve historical patterns. Each tool returns structured data that the LLM analyzes to generate RCA reports.

다음 코드는 LangChain의 @tool 데코레이터를 사용하여 루트 원인 에이전트에 도구를 등록하는 방법을 보여줍니다. 이 예시 에서 도구는 벡터 검색 사용하여 유사한 웨이퍼 결함 패턴을 찾습니다.

from langchain_core.tools import tool
@tool
async def query_wafer_info(
wafer_id: str,
include_similar_patterns: bool = True,
similarity_limit: int = 3
) -> Dict[str, Any]:
"""
Get wafer defect details and find similar historical patterns.
Returns the wafer data plus similar past defects with known root causes.
"""
db = _get_db()
wafer = await db.wafer_defects.find_one({"wafer_id": wafer_id})
if not wafer:
return {"error": f"Wafer {wafer_id} not found"}
similar_patterns = None
if include_similar_patterns and "embedding" in wafer:
pipeline = [
{
"$vectorSearch": {
"index": "wafer_defects_vector_index",
"path": "embedding",
"queryVector": wafer["embedding"],
"numCandidates": 100,
"limit": similarity_limit + 1
}
},
{"$match": {"wafer_id": {"$ne": wafer_id}}},
{"$addFields": {"similarity_score": {"$meta": "vectorSearchScore"}}},
{"$limit": similarity_limit}
]
results = await db.wafer_defects.aggregate(pipeline).to_list(length=None)
similar_patterns = [
{
"wafer_id": r.get("wafer_id"),
"description": r.get("description"),
"root_cause": r.get("root_cause"),
"similarity_score": round(r.get("similarity_score", 0), 4)
}
for r in results
]
return {
"wafer": wafer,
"similar_historical_patterns": similar_patterns
}
# Tool registry
TOOLS = [query_alerts, query_wafer_info, query_time_series_data, vector_search_knowledge_base]

루트 원인 에이전트는 다음 도구를 사용하여 이탈을 조사합니다.

  1. query_alerts

    • 장비, 심각도 또는 기간 창 기준으로 필터링된 최근 경고를 검색합니다.

    • 위반 세부 정보, 영향을 받는 웨이퍼 및 소스 센서 데이터 반환합니다.

  2. query_wafer_info

    • Fetches wafer defect details including yield percentage, defect pattern, and severity.

    • Performs multimodal vector search to find similar historical defects with known root causes.

  3. query_time_series_data

    • 특정 기간을 창 으로 센서 원격 분석을 쿼리합니다.

    • 토큰 사용량을 줄이기 위해 애그리게이션된 통계(최소, 최대, 평균)를 반환합니다.

    • Identifies sensor anomalies correlated with defect events.

  4. vector_search_knowledge_base

    • Searches historical RCA reports and technical documentation by using semantic embeddings.

    • Returns matching documents with titles, root causes, and corrective actions.

    • Helps the agent reference past solutions for similar failures.

You can expand this toolset to match your fab's processes. For example, add tools to query equipment maintenance logs, verify recipe parameters, or retrieve operator shift notes.

For agents to work effectively, they need memory to store context and reasoning steps. This capability enables agents to:

  • 조사 내에서 연속성을 유지합니다.

  • Recall previous steps and tool outputs.

  • Build context across user interactions.

In this architecture, MongoDB Atlas stores all agent memory. Memory consists of the following types:

단기 기억: 에이전트 조사를 진행할 때 중간 상태 저장합니다. 이 메모리는 프로세스 중단되더라도 진행 상황을 유지하면서 재개할 수 있도록 보장합니다. 다음 컬렉션은 이러한 유형의 메모리를 저장 .

  • checkpoints: Captures the agent state at each reasoning step.

  • checkpoint_writes: Logs the tool calls and their outputs.

장기 기억: 현재 조사에 도움이 되는 과거 데이터를 저장합니다. 에이전트는 벡터 검색 사용하여 이 데이터를 조회 기록 컨텍스트가 추론을 유도하도록 합니다. 컬렉션에는 다음이 포함됩니다.

  • wafer_defects: Wafer inspection data with multimodal embeddings for similarity search.

  • historical_knowledge: RCA reports, technical documentation, and tribal knowledge.

  • alerts: Active and resolved alerts with violation details and source data.

  • process_sensor_ts: Time series sensor telemetry for correlation analysis.

To configure short-term memory, use the MongoDBSaver class from LangGraph. This class writes agent progress to the checkpoints collections as follows:

from langgraph.checkpoint.mongodb import MongoDBSaver
from pymongo import MongoClient
mongo_client = MongoClient(os.getenv("MONGODB_URI"))
checkpointer = MongoDBSaver(mongo_client, "smf-yield-defect")

This setup enables memory and fault-tolerance capabilities for the Root Cause Agent.

A state graph models workflows as nodes and edges. Each node represents a reasoning step, tool call, or checkpoint. Edges define transitions between these steps. State graphs make workflows explicit, repeatable, and resilient.

In this solution, LangGraph enables the state graph to coordinate the Root Cause Agent and its tools. The agent follows a ReAct (Reasoning + Acting) pattern:

  1. 이유: LLM은 현재 상태 분석하고 다음 조치 결정합니다.

  2. Act: The agent calls a tool to retrieve data from MongoDB.

  3. Observe: The agent processes the tool output and updates its reasoning.

  4. Repeat: The cycle continues until the agent has enough evidence.

This architecture ensures the following capabilities:

  • The agent can branch based on findings, such as similar patterns found versus no matches.

  • 각 단계는 메모리에 쓰고 자동으로 읽습니다.

  • Engineers can resume conversations or audit the reasoning chain.

The following code builds a ReAct agent with MongoDB checkpointing:

from langgraph.prebuilt import create_react_agent
from langchain_aws import ChatBedrock
async def create_rca_agent():
"""Create LangGraph agent with MongoDB checkpointing."""
# Initialize LLM
llm = ChatBedrock(
model_id="anthropic.claude-3-5-sonnet-20241022-v2:0",
region_name=os.getenv("AWS_REGION", "us-east-1")
)
# Initialize MongoDB checkpointer
mongo_client = MongoClient(os.getenv("MONGODB_URI"))
checkpointer = MongoDBSaver(mongo_client, "smf-yield-defect")
# System prompt
system_prompt = """You are an expert semiconductor yield engineer.
When investigating alerts:
1. First, query the alert details
2. Get wafer defect information and similar historical patterns
3. Query sensor data around the alert time
4. Search the knowledge base for similar RCA reports
5. Synthesize findings into a structured root cause analysis
Always cite evidence from the tools."""
# Create agent
agent = create_react_agent(
model=llm,
tools=TOOLS,
checkpointer=checkpointer,
prompt=system_prompt
)
return agent

With this setup, you can trace, resume, and debug the entire investigation workflow.

다음은 시스템이 이탈을 처리하는 방법에 대한 설명입니다.

1

Sensor telemetry streams into MongoDB Atlas through the dual-write pattern. Data flows to both a regular collection (for Change Streams) and a time series collection (for historical analysis).

2

The Excursion Detection System watches the sensor stream by using Change Streams. When a reading violates a threshold, it creates an alert document with violation details and source data.

3

The alert triggers the Root Cause Agent. The agent receives the alert ID and begins its investigation by using the ReAct pattern.

4

The agent queries wafer defects** to find the affected wafer and performs vector search to identify similar historical patterns with known root causes.

5

The agent analyzes sensor data** around the excursion window. It retrieves aggregated statistics to identify anomalies correlated with the defect event.

6

The agent searches the knowledge base** for similar RCA reports and technical documentation. Semantic search ensures relevant matches even when terminology differs.

7

에이전트 발견 사항 **을 증거 체인, 근본 원인 가설, 신뢰 점수, 권장 조치가 포함된 구조화된 RCA 보고서로 합성합니다.

다음 기능을 사용하여 이 워크플로를 확장하고 사용자 지정할 수 있습니다.

  • Automated remediation: Trigger equipment isolation or recipe adjustments based on RCA findings.

  • Predictive alerts: Use historical patterns to warn before thresholds are violated.

  • Multi-tool correlation: Add tools to query recipe parameters, chamber logs, or maintenance schedules.

도구, 메모리 및 그래프 오케스트레이션이 모듈식이므로 기존 워크플로를 중단하지 않고도 새로운 기능을 추가할 수 있습니다.

A semiconductor yield optimization system relies on a wide range of data, including the following:

  • High-frequency sensor telemetry

  • 웨이퍼 검사 이미지 및 결함 패턴

  • 과거 RCA 보고서 및 부족 지식

  • Agent memory and conversation state

  • Equipment status and process context

MongoDB's flexible document model makes it easy to operationalize this data in a single solution. In MongoDB Atlas, you can store the following data:

  • Time series data: This format captures sensor telemetry at second-level granularity.

  • Vector embeddings: These enable semantic search across wafer defects and the broader knowledge base.

  • 멀티모달 임베딩: 이러한 구조는 결함 이미지를 특정 텍스트 컨텍스트와 결합합니다.

  • Metadata: This information unifies context by tracking equipment ID, lot ID, or process steps.

  • Operational data: This category manages real-time information for alerts, equipment status, and process parameters.

This solution uses the following collections to store data:

sensor_events: Real-time sensor events for Change Stream monitoring. This regular collection enables the Excursion Detection System to watch for threshold violations in real time.

alerts: 루트 원인 에이전트를 트리거하다 활성 이탈 및 임계값 위반입니다. 각 경고 위반 세부 정보, 영향을 받는 웨이퍼 및 소스 센서 데이터 캡처합니다. 상태가 '열림'에서 '확인됨', '해결됨'으로 전환됩니다.

wafer_defects: Wafer inspection data with multimodal embeddings for semantic search. Each document includes defect patterns, yield percentages, severity levels, and the combined image-text embedding generated by Voyage AI.

historical_knowledge: RCA reports and technical documentation stored with vector embeddings. Agents search this collection to find similar past incidents, troubleshooting procedures, and proven corrective actions.

process_context: 제조 프로세스 메타데이터, 레시피 매개변수, 장비 구성, 상관관계 분석을 위한 기준값 등을 포함합니다.

checkpoints: Agent state captured at each reasoning step by LangGraph's MongoDBSaver to enable conversation persistence, session resumption, and audit trails.

process_sensor_ts: Process sensor telemetry stored as a time series collection for efficient historical analysis. Time series collections efficiently store and query millions of readings. They preserve contextual metadata, such as equipment ID, lot ID, and process step.

The following example shows a sample document in the process_sensor_ts collection:

{
"timestamp": {
"$date": "2025-01-24T10:30:00.000Z"
},
"equipment_id": "CMP_TOOL_01",
"metrics": {
"particle_count": 1234,
"temperature": 68.5,
"rf_power": 1502.3,
"chamber_pressure": 5.2
},
"metadata": {
"lot_id": "LOT_2025_001",
"wafer_id": "W_004_16",
"process_step": "Oxide CMP"
}
}

time series 문서 다음 필드가 포함되어 있습니다.

  • timestamp: The timestamp of the reading

  • equipment_id: The identifier of the source tool

  • metrics: Numeric sensor values for particle count, temperature, RF power, and chamber pressure

  • metadata: 로트, 웨이퍼 및 프로세스 단계에 대한 컨텍스트 태그

The following example shows a sample document in the wafer_defects collection:

{
"_id": "W_CMP_001",
"wafer_id": "W_CMP_001",
"lot_id": "LOT_2025_001",
"inspection_timestamp": { "$date": "2025-01-24T10:30:00Z" },
"description": "Edge-concentrated particle contamination from slurry degradation",
"defect_summary": {
"defect_pattern": "edge_cluster",
"severity": "critical",
"yield_percentage": 72.5,
"failed_dies": 22,
"total_dies": 80
},
"process_context": {
"equipment_used": ["CMP_TOOL_01"],
"last_process_step": "Oxide CMP",
"recipe_id": "CMP_STD_01",
"slurry_batch": "SLR-2025-0142"
},
"ink_map": {
"thumbnail_base64": "iVBORw0KGgo...",
"thumbnail_size": { "width": 200, "height": 200 },
"full_image_url": "s3://bucket/wafers/W_CMP_001.png"
},
"embedding": [0.123, -0.456, ...]
}

The wafer defect document includes the following fields:

  • wafer_idlot_id: 결함을 프로덕션 컨텍스트에 연결합니다.

  • description: 과거 Wafer의 근본 원인 분석이 포함되어 있습니다.

  • defect_summary: Captures the pattern type, severity, yield impact, and die counts

  • process_context: 상관관계 분석을 위한 장비, 레시피, 재료 추적

  • ink_map: Stores the wafer map visualization (thumbnail for display, S3 URL for full image)

  • embedding: 유사성 검색 위한 1024차원 다중 모드 벡터를 포함합니다.

To view the full demo implementation,see the GitHub repository. The repository's README covers the following steps:

1

Python 3.10 이상 및 Node.js 18 이상을 설치합니다. MongoDB Atlas cluster ( Atlas Vector Search 의 경우 M10 이상)를 구성하고 AWS 베드락 및 보이지 AI 에 대한 액세스 설정하다 합니다.

리포지토리 복제합니다.

git clone https://github.com/mongodb-industry-solutions/smf-yield-defect-detection.git
cd smf-yield-defect-detection
2

백엔드 디렉토리 로 이동하여 uv를 사용하여 종속성을 설치합니다.

cd backend
# Install UV package manager
curl -LsSf https://astral.sh/uv/install.sh | sh
# Install dependencies
uv sync

Create a .env file with your credentials:

# MongoDB Atlas connection
MONGODB_URI=mongodb+srv://<username>:<password>@<cluster>.mongodb.net/
# Voyage AI for embeddings
VOYAGE_API_KEY=your-voyage-api-key
# AWS Bedrock for LLM inference
AWS_REGION=us-east-1
AWS_ACCESS_KEY_ID=your-access-key
AWS_SECRET_ACCESS_KEY=your-secret-key
3

Navigate to the frontend directory and install dependencies:

cd frontend
npm install
4

백엔드 서버 시작합니다.

cd backend
uv run uvicorn main:app --host 0.0.0.0 --port 8000 --reload

별도의 터미널에서 프론트엔드 서버 시작합니다.

cd frontend
npm run dev

Access the application at the following addresses:

  • Use agentic AI: AI agents can investigate excursions autonomously, correlating sensor data, defect images, and historical reports to generate root cause analysis in seconds instead of hours.

  • 최신 데이터 기반 구축: 확장하다 AI 에이전트를 효과적으로 운영하려면 지연 시간이 짧고 확장 확장 가능한 데이터 인프라가 필수적입니다. MongoDB Atlas time series, 벡터 및 문서를 위한 통합 플랫폼을 제공합니다.

  • 멀티모달 검색 활성화 : 이미지 임베딩과 텍스트 임베딩을 결합하면 엔지니어가 원래 설명된 방식에 관계없이 유사한 결함을 찾을 수 있습니다. Voyage AI의 멀티모달 모델은 시각적 패턴과 텍스트 컨텍스트를 모두 캡처합니다.

  • Act on excursions in real time: Change Streams enable immediate detection of threshold violations. The system creates alerts within milliseconds, not at the end of a shift.

  • Persistent agent memory: MongoDB checkpointing enables engineers to resume investigations, ask follow-up questions, and audit the agent's reasoning chain. This transparency builds trust and enables continuous improvement.

  • Humza Akhtar, MongoDB

  • Kiran Tulsulkar, MongoDB

  • 다니엘 자미르, MongoDB

  • MongoDB 사용한 다중 에이전트 AI 예측 유지 관리

  • 신속한 AI 에이전트 배포

  • 기술 Docs 용 컨텍스트 인식 RAG

돌아가기

AI 기반 인벤토리 분류

이 페이지의 내용