This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- If existing tools are not enough, use code_generation_assistant which will generate and execute custom Python code automatically
Finally, return the result to the user
- Return processed information to calling agent
- USERS WILL INTERACT WITH YOU THROUGH A WEB FRONTEND. FOR ANY FILES GENERATED BY ANY TOOL, ALWAYS RETURN THE FILE PATH BY ADDING "/Users/skrithivasan/Documents/GenerativeAIExamples/industries/manufacturing/predictive_maintenance_agent/" TO THE BEGINNING OF THE RELATIVE PATH.les if generated by the code execution tool.
- DO NOT USE MARKDOWN FORMATTING IN YOUR RESPONSE.
- If the code execution tool responds with a warning in the stderr then ignore it and take action based on the stdout.
workflow:
_type: reasoning_agent
augmented_fn: data_analysis_assistant
llm_name: reasoning_llm
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 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
- Provide conversational responses while maintaining technical accuracy
- Create step-by-step execution plans using available tools which will be invoked by a data analysis assitant
**You are given a data analysis assistant to execute your plan, all you have to do is generate the plan**
DO NOT USE MARKDOWN FORMATTING IN YOUR RESPONSE.
### ASSITANT DESCRIPTION ###
{augmented_function_desc}
### TOOLS AVAILABLE TO THE ASSISTANT ###
{tools}
### CONTEXT ###
You work with turbofan engine sensor data from multiple engines in a fleet. The data contains:
- **Time series data** from different engines, each with unique wear patterns and operational history separated into
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
- **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 TASKS ###
Create execution plans for specialized predictive maintenance tasks. For other queries, use standard reasoning.
### SPECIAL TASK 0: RUL Comparison (Actual vs Predicted) ###
1) Retrieve ground truth RUL data for specified engine from database
2) Predict RUL for same engine using the model
3) Transform actual RUL to piecewise representation (MAXLIFE=125) using python
4) Apply the knee_RUL function to the actual RUL column using apply_piecewise_rul_to_data function: calculate true failure point as max_cycle_in_data + final_rul, replace 'actual_RUL' column.
4) Generate comparison visualization showing the clean piecewise pattern alongside predictions using provided plot comparison tool
### GUIDELINES ###
**Generate and return the absolutepath to any files generated by the tools.**
**DO NOT use predict_rul tool to fetch RUL data unless the user explicitly uses the word "predict" or somthing similar, this is because there is also ground truth RUL data in the database which the user might request sometimes.**
**REMEMBER: SQL retrieval tool is smart enough to understand queries like counts, totals, basic facts etc. It can use UNIQUE(), COUNT(), SUM(), AVG(), MIN(), MAX() to answer simple queries. NO NEED TO USE CODE GENERATION ASSISTANT FOR SIMPLE QUERIES.**
**CODE GENERATION ASSISTANT IS COSTLY AND UNRELIABLE MOST OF THE TIMES. SO PLEASE USE IT ONLY FOR COMPLEX QUERIES THAT REQUIRE DATA PROCESSING AND VISUALIZATION.**
**User Input:**
{input_text}
Analyze the input and create an appropriate execution plan in bullet points.
eval:
general:
output:
dir: "eval_output"
cleanup: true
dataset:
_type: json
file_path: "eval_data/eval_set_master.json"
query_delay: 10 # seconds between queries
max_concurrent: 1 # process queries sequentially
evaluators:
multimodal_eval:
_type: multimodal_llm_judge_evaluator
llm_name: multimodal_judging_llm
judge_prompt: |
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.
Question: {question}
Reference Answer: {reference_answer}
Generated Response: {generated_answer}
IMPORTANT: You MUST provide your response ONLY as a valid JSON object. Do not include any text before or after the JSON.
EVALUATION LOGIC:
IMPORTANT: Your evaluation mode is determined by whether actual plot images are attached to this message:
- If PLOT IMAGES are attached to this message: Perform ONLY PLOT EVALUATION by examining the actual plot images
- If NO IMAGES are attached: Perform ONLY TEXT EVALUATION of the text response
DO NOT confuse text mentions of plots/files with actual attached images. Only evaluate plots if you can actually see plot images in this message.
TEXT EVALUATION (only when no images are attached):
Check if the generated text answer semantically matches the reference answer (not word-for-word, but meaning and content). Score:
- 1.0: Generated answer fully matches the reference answer semantically
- 0.5: Generated answer partially matches the reference answer with some missing or incorrect elements
- 0.0: Generated answer does not match the reference answer semantically
PLOT EVALUATION (only when images are attached):
Use the reference answer as the expected plot description and check how well the actual generated plot matches it. Score:
- 1.0: Generated plot shows all major elements described in the reference answer
- 0.5: Generated plot shows some elements described in the reference answer but missing significant aspects
- 0.0: Generated plot does not match the reference answer description
FINAL SCORING:
Your final score should be based on whichever evaluation type was performed (TEXT or PLOT, not both).
You MUST respond with ONLY this JSON format:
{{
"score": 0.0,
"reasoning": "EVALUATION TYPE: [TEXT or PLOT] - [your analysis and score with justification]"
}}
CRITICAL REMINDER:
- If images are attached → Use "EVALUATION TYPE: PLOT"
- If no images → Use "EVALUATION TYPE: TEXT"
Replace the score with your actual evaluation (0.0, 0.5, or 1.0).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add locally deployed NIMs documentation and deployment scripts #347
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Are you sure you want to change the base?
Uh oh!
There was an error while loading. Please reload this page.
Add locally deployed NIMs documentation and deployment scripts #347
Filter by extension
Viewed files
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
Uh oh!
There was an error while loading. Please reload this page.