Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,25 @@

general:
use_uvloop: true
# telemetry:
# logging:
# console:
# _type: console
# level: INFO
# file:
# _type: file
# path: "pdm.log"
# level: DEBUG
# tracing:
# phoenix:
# _type: phoenix
# endpoint: http://localhost:6006/v1/traces
# project: pdm-test
# catalyst:
# _type: catalyst
# project: "pdm-test"
# dataset: "pdm-dataset"
telemetry:
logging:
console:
_type: console
level: DEBUG
# level: INFO
# file:
# _type: file
# path: "alm.log"
# level: DEBUG
tracing:
phoenix:
_type: phoenix
endpoint: http://localhost:6006/v1/traces
project: alm-agent
# catalyst:
# _type: catalyst
# project: "alm-agent"
# dataset: "alm-agent"

llms:
# SQL query generation model
Expand Down Expand Up @@ -134,7 +135,7 @@ functions:
parse_agent_response_max_retries: 2
system_prompt: |
### TASK DESCRIPTION ####
You are a helpful data analysis assistant that can help with predictive maintenance tasks for a turbofan engine.
You are a helpful data analysis assistant specializing in Asset Lifecycle Management tasks, currently focused on predictive maintenance for turbofan engines.
**USE THE PROVIDED PLAN THAT FOLLOWS "Here is the plan that you could use if you wanted to.."**

### TOOLS ###
Expand All @@ -154,7 +155,7 @@ functions:
Executing step: the step you are currently executing from the plan along with any instructions provided
Thought: describe how you are going to execute the step
Final Answer: the final answer to the original input question including the absolute file paths of the generated files with
`/Users/vikalluru/Documents/GenerativeAIExamples/industries/manufacturing/predictive_maintenance_agent/output_data/` prepended to the filename.
`/Users/vikalluru/Documents/GenerativeAIExamples/industries/asset_lifecycle_management_agent/output_data/` prepended to the filename.

**FORMAT 3 (when using a tool)**
Input plan: Summarize all the steps in the plan.
Expand Down Expand Up @@ -216,11 +217,11 @@ workflow:
verbose: true
reasoning_prompt_template: |
### DESCRIPTION ###
You are a Data Analysis Reasoning and Planning Expert specialized in analyzing turbofan engine sensor data and predictive maintenance tasks.
You are a Data Analysis Reasoning and Planning Expert specialized in Asset Lifecycle Management, with expertise in analyzing turbofan engine sensor data and predictive maintenance tasks.
You are tasked with creating detailed execution plans for addressing user queries while being conversational and helpful.

Your Role and Capabilities:**
- Expert in turbofan engine data analysis, predictive maintenance, and anomaly detection
- Expert in Asset Lifecycle Management, turbofan engine data analysis, predictive maintenance, and anomaly detection
- Provide conversational responses while maintaining technical accuracy
- Create step-by-step execution plans using available tools which will be invoked by a data analysis assistant

Expand All @@ -239,13 +240,13 @@ workflow:
four datasets (FD001, FD002, FD003, FD004), each dataset is further divided into training and test subsets.
- **26 data columns**: unit number, time in cycles, 3 operational settings, and 21 sensor measurements
- **Engine lifecycle**: Engines start operating normally, then develop faults that grow until system failure
- **Predictive maintenance goal**: Predict Remaining Useful Life (RUL) - how many operational cycles before failure
- **Asset Lifecycle Management - Operation & Maintenance Phase**: Predict Remaining Useful Life (RUL) - how many operational cycles before failure
- **Data characteristics**: Contains normal operational variation, sensor noise, and progressive fault development
This context helps you understand user queries about engine health, sensor patterns, failure prediction, and maintenance planning.
REMEMBER TO RELY ON DATA ANALYSIS ASSITANT TO RETRIEVE DATA FROM THE DATABASE.

### SPECIAL CONSTRAINTS ###
Create execution plans for specialized predictive maintenance tasks. For other queries, use standard reasoning.
Create execution plans for Asset Lifecycle Management tasks (currently focused on predictive maintenance and sensor data analysis). For other queries, use standard reasoning.
Apply piecewise RUL transformation to the actual RUL values when plotting it against predicted RUL values using the code generation assistant.

### GUIDELINES ###
Expand Down Expand Up @@ -274,7 +275,7 @@ eval:
_type: multimodal_llm_judge_evaluator
llm_name: multimodal_judging_llm
judge_prompt: |
You are an expert evaluator for predictive maintenance agentic workflows.
You are an expert evaluator for Asset Lifecycle Management agentic workflows, with expertise in predictive maintenance tasks.
Your task is to evaluate how well a generated response (which may include both text and visualizations)
matches the reference answer for a given question.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Environment Variables for Predictive Maintenance Agent
# Environment Variables for Asset Lifecycle Management Agent
#
# Copy this file to .env and replace the placeholder values with your actual API keys
# To use: cp env_template.txt .env && source .env
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ build-backend = "setuptools.build_meta"
requires = ["setuptools >= 64"]

[project]
name = "predictive_maintenance_agent"
name = "asset_lifecycle_management_agent"
dynamic = ["version"]
dependencies = [
"nvidia-nat[profiling, langchain, telemetry]==1.2.1",
Expand All @@ -18,23 +18,23 @@ dependencies = [
"pytest-asyncio"
]
requires-python = ">=3.11,<3.13"
description = "Predictive maintenance workflow using NeMo Agent Toolkit"
description = "Asset Lifecycle Management workflow using NeMo Agent Toolkit for comprehensive industrial asset management from acquisition through retirement"
classifiers = ["Programming Language :: Python"]
authors = [{ name = "Vineeth Kalluru" }]
maintainers = [{ name = "NVIDIA Corporation" }]

[project.entry-points.'nat.components']
predictive_maintenance_agent = "predictive_maintenance_agent.register"
asset_lifecycle_management_agent = "asset_lifecycle_management_agent.register"

[tool.uv.sources]
momentfm = { path = "./moment", editable = true }

[tool.setuptools]
packages = ["predictive_maintenance_agent"]
packages = ["asset_lifecycle_management_agent"]
package-dir = {"" = "src"}

[tool.setuptools.dynamic]
version = {attr = "predictive_maintenance_agent.__version__"}
version = {attr = "asset_lifecycle_management_agent.__version__"}

[tool.pytest.ini_options]
asyncio_mode = "auto"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
NASA Turbofan Engine Dataset to SQLite Database Converter
This script converts the NASA Turbofan Engine Degradation Simulation Dataset (C-MAPSS)
from text files into a structured SQLite database for use with the predictive maintenance agent.
from text files into a structured SQLite database for use with the Asset Lifecycle Management agent.
The NASA dataset contains:
- Training data: Engine run-to-failure trajectories
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
# limitations under the License.

"""
Evaluators package for predictive maintenance agent.
Evaluators package for Asset Lifecycle Management agent.
This package contains evaluator implementations for assessing the quality
of responses from the predictive maintenance agent workflow.
of responses from the Asset Lifecycle Management agent workflow.
"""

from .llm_judge_evaluator import LLMJudgeEvaluator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class LLMJudgeEvaluatorConfig(EvaluatorBaseConfig, name="llm_judge"):
llm_name: str = Field(description="Name of the LLM to use as judge")
judge_prompt: str = Field(
description="Prompt template for the judge LLM. Should include {question}, {reference_answer}, and {generated_answer} placeholders",
default="""You are an expert evaluator for predictive maintenance systems. Your task is to evaluate how well a generated answer matches the reference answer for a given question.
default="""You are an expert evaluator for Asset Lifecycle Management systems. Your task is to evaluate how well a generated answer matches the reference answer for a given question.
Question: {question}
Expand All @@ -38,7 +38,7 @@ class LLMJudgeEvaluatorConfig(EvaluatorBaseConfig, name="llm_judge"):
Please evaluate the generated answer against the reference answer considering:
1. Factual accuracy and correctness
2. Completeness of the response
3. Technical accuracy for predictive maintenance context
3. Technical accuracy for Asset Lifecycle Management context
4. Relevance to the question asked
Provide your evaluation as a JSON object with the following format:
Expand Down Expand Up @@ -77,5 +77,5 @@ async def register_llm_judge_evaluator(config: LLMJudgeEvaluatorConfig, builder:
yield EvaluatorInfo(
config=config,
evaluate_fn=evaluator.evaluate,
description="LLM-as-a-Judge Evaluator for Predictive Maintenance"
description="LLM-as-a-Judge Evaluator for Asset Lifecycle Management"
)
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Multimodal LLM Judge Evaluator
An enhanced evaluator that uses llama-3.2-90b-instruct to evaluate both text and visual outputs
from agentic workflows. This evaluator is specifically designed for predictive maintenance
from agentic workflows. This evaluator is specifically designed for Asset Lifecycle Management
responses that may include plots and visualizations.
"""

Expand Down Expand Up @@ -162,7 +162,7 @@ def _extract_plot_paths(self, response: str) -> list[str]:
# If we detect plot generation language but no existing files,
# try to find PNG files in the output_data directory that might be related
if has_plot_indicator and not plot_paths:
output_dir = "/Users/vikalluru/Documents/GenerativeAIExamples/industries/manufacturing/predictive_maintenance_agent/output_data"
output_dir = "/Users/vikalluru/Documents/GenerativeAIExamples/industries/manufacturing/asset_lifecycle_management_agent/output_data"
if os.path.exists(output_dir):
png_files = [f for f in os.listdir(output_dir) if f.endswith('.png')]
# Add the most recently modified PNG files
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class MultimodalLLMJudgeEvaluatorConfig(EvaluatorBaseConfig, name="multimodal_ll
llm_name: str = Field(description="Name of the LLM to use as judge (should support vision for multimodal evaluation)")
judge_prompt: str = Field(
description="Prompt template for the judge LLM. Should include {question}, {reference_answer}, and {generated_answer} placeholders. This prompt works for both text-only and multimodal evaluation.",
default="""You are an expert evaluator for predictive maintenance agentic workflows. Your task is to evaluate how well a generated response (which may include both text and visualizations) matches the reference answer for a given question.
default="""You are an expert evaluator for Asset Lifecycle Management agentic workflows. Your task is to evaluate how well a generated response (which may include both text and visualizations) matches the reference answer for a given question.
Question: {question}
Expand All @@ -40,23 +40,23 @@ class MultimodalLLMJudgeEvaluatorConfig(EvaluatorBaseConfig, name="multimodal_ll
TEXT EVALUATION:
1. Factual accuracy and correctness of technical information
2. Completeness of the response (does it answer all parts of the question?)
3. Technical accuracy for predictive maintenance context (RUL predictions, sensor data analysis, etc.)
4. Appropriate use of predictive maintenance terminology and concepts
3. Technical accuracy for Asset Lifecycle Management context (RUL predictions, sensor data analysis, etc.)
4. Appropriate use of Asset Lifecycle Management and predictive maintenance terminology and concepts
VISUAL EVALUATION (if plots/charts are present):
1. Does the visualization show the correct data/variables as specified in the reference?
2. Are the axes labeled correctly and with appropriate ranges?
3. Does the plot type (line chart, bar chart, distribution, etc.) match what was requested?
4. Are the data values, trends, and patterns approximately correct?
5. Is the visualization clear and appropriate for predictive maintenance analysis?
5. Is the visualization clear and appropriate for Asset Lifecycle Management analysis?
6. Does the plot help answer the original question effectively?
COMBINED EVALUATION:
1. Do the text and visual elements complement each other appropriately?
2. Does the overall response provide a complete answer?
3. Is the combination more helpful than text or visuals alone would be?
For predictive maintenance context, pay special attention to:
For Asset Lifecycle Management context, pay special attention to:
- RUL (Remaining Useful Life) predictions and trends
- Sensor data patterns and operational settings
- Time-series data representation
Expand Down Expand Up @@ -96,5 +96,5 @@ async def register_multimodal_llm_judge_evaluator(config: MultimodalLLMJudgeEval
yield EvaluatorInfo(
config=config,
evaluate_fn=evaluator.evaluate,
description="Multimodal LLM Judge Evaluator with Text and Visual Evaluation Capabilities for Predictive Maintenance"
description="Multimodal LLM Judge Evaluator with Text and Visual Evaluation Capabilities for Asset Lifecycle Management"
)
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
# limitations under the License.

"""
Plotting package for predictive maintenance agent.
Plotting package for Asset Lifecycle Management agent.
This package contains components for data visualization, plotting tools,
and code generation assistance for predictive maintenance workflows.
and code generation assistance for Asset Lifecycle Management workflows.
"""

from . import plot_comparison_tool
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ async def _generate_and_execute_code(
Generate only the code needed. Your response must contain ONLY executable Python code which will be DIRECTLY EXECUTED IN A SANDBOX.

**UTILITIES AVAILABLE:**
A 'utils' folder contains a pre-built function for predictive maintenance tasks:
A 'utils' folder contains pre-built functions for Asset Lifecycle Management tasks (especially predictive maintenance):
- utils.apply_piecewise_rul_transformation
INPUTS:
- file_path: Path to JSON file with time series data
Expand Down Expand Up @@ -255,7 +255,8 @@ def is_code_incomplete(code):
# All retries failed
response = f"Code generation failed after {max_retries + 1} attempts."
if error_info:
response += f" Last error: {error_info.strip().replace('\n', ' ')}"
error_text = error_info.strip().replace('\n', ' ')
response += f" Last error: {error_text}"
response += " Consider using alternative approaches."

logger.error(response)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
# limitations under the License.

"""
Predictors package for predictive maintenance agent.
Predictors package for Asset Lifecycle Management agent.
This package contains components for prediction and anomaly detection
in predictive maintenance workflows.
in Asset Lifecycle Management workflows (Operation & Maintenance phase).
"""

from . import moment_anomaly_detection_tool
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
# limitations under the License.

"""
Retrievers package for predictive maintenance agent.
Retrievers package for Asset Lifecycle Management agent.
This package contains components for data retrieval and SQL query generation
for predictive maintenance workflows.
for Asset Lifecycle Management workflows (currently focused on predictive maintenance).
"""

from .vanna_manager import VannaManager
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from pathlib import Path

import pytest
from predictive_maintenance_agent import register
from asset_lifecycle_management_agent import register

from nat.runtime.loader import load_workflow

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

training_config:
# Basic metadata about this training configuration
description: "Training data for NASA Turbofan Engine predictive maintenance SQL generation"
description: "Training data for NASA Turbofan Engine Asset Lifecycle Management (predictive maintenance) SQL generation"
version: "1.0"
# You should update these fields to describe your specific domain and use case

Expand Down