Skip to content

Commit 7e3cc6e

Browse files
authored
Merge pull request #38 from peak-solution/mcp_playground
feat: Added initial content of mcp playground
2 parents dd5ff16 + e586e56 commit 7e3cc6e

10 files changed

Lines changed: 378 additions & 9 deletions

File tree

data_management_learning_path/_toc.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,16 @@ parts:
2323
- file: ods/explore_the_data_model
2424
- url: https://peak-solution.github.io/data_management_learning_path/_static/asam_ods_basemodel_viewer.html
2525
title: ASAM ODS Base Model Viewer
26+
- caption: Work with AI
27+
chapters:
28+
- file: ai/overview
29+
title: Overview
30+
- file: ai/01_simple_data_interaction
31+
title: Simple Data Interaction
32+
- file: ai/02_simple_analysis_notebook
33+
title: Creating Analysis Notebooks
34+
- file: ai/03_simple_analysis_application
35+
title: Creating Analysis Applications
2636
- caption: Work with EXD-API Plugins
2737
chapters:
2838
- file: exd_api/overview
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# Simple Data Interaction with ASAM ODS
2+
3+
In this guide, you'll learn how to connect to an ASAM ODS server and use AI-powered Copilot Chat to explore and ask questions about your data. This is the starting point for understanding your ASAM ODS data structure and content.
4+
5+
## Overview
6+
7+
This playground demonstrates:
8+
- Connecting to an ASAM ODS server
9+
- Querying basic data information
10+
- Using AI to generate queries and understand data
11+
- Exploring the test hierarchy (Tests → Measurements → Data)
12+
13+
## Step 1: Open Copilot Chat
14+
15+
1. Open VS Code
16+
2. Press `Ctrl+Shift+I` to open Copilot Chat panel
17+
3. You should see "ODSBox-AIConnect" available in the tool suggestions
18+
19+
## Step 2: Connect to ASAM ODS Server
20+
21+
In Copilot Chat, type:
22+
23+
```
24+
Connect to ASAM ODS server
25+
```
26+
27+
In case you're not connected yet, Copilot will ask for connection details. You can use the same connection information as in your Jupyter notebooks:
28+
29+
```
30+
url="https://docker.peak-solution.de:10032/api", auth=("Demo", "mdm")
31+
```
32+
33+
Copilot will use the `ods_connect` tool to establish a connection.
34+
35+
## Step 3: Explore Available Data
36+
37+
Once connected, ask Copilot:
38+
39+
```
40+
What kind of data is contained in the server?
41+
```
42+
43+
```
44+
How many measurements are in the latest test campaign?
45+
```
46+
47+
```
48+
Show me the structure of a measurement
49+
```
50+
51+
Copilot will translate your questions into JAQueL queries using the `query_describe` and `query_execute` tools.
52+
53+
## Step 4: Generate a Query
54+
55+
To learn how to write queries yourself, ask:
56+
57+
```
58+
Generate a JAQueL query to find all measurements from test 'Campaign_01'
59+
```
60+
61+
Copilot will:
62+
1. Create a query skeleton using `query_generate_skeleton`
63+
2. Show you the query syntax
64+
3. Explain what the query does in plain English
65+
66+
## Next Steps
67+
68+
- **Data Analysis:** Head to [Creating Analysis Notebooks](02_simple_analysis_notebook.md) to create reproducible analysis workflows
69+
- **Build Applications:** Move to [Creating Analysis Applications](03_simple_analysis_application.md) to build interactive tools
70+
- **Deep Learning:** Review the [odsbox-jaquel-mcp documentation](https://github.com/totonga/odsbox-jaquel-mcp) for advanced techniques
71+
72+
## Tips & Best Practices
73+
74+
1. **Be specific in prompts** — Instead of "analyze the data," try "Find measurements with temperature > 100°C and show statistics"
75+
2. **Ask for explanations** — Use "Explain this JAQueL query" to learn syntax
76+
3. **Verify generated code** — Always review AI-generated queries before executing on large datasets
77+
4. **Use examples** — Reference specific measurement names or test IDs to get more accurate results
78+
79+
## Example Prompts
80+
81+
Use these starting prompts to guide your exploration:
82+
83+
- `What entities are available in the database?`
84+
- `Show me the test hierarchy structure`
85+
- `Find measurements where the stator winding temperature exceeds 100`
86+
87+
---
88+
89+
**Next:** [Creating Analysis Notebooks](02_simple_analysis_notebook.md)
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Creating Analysis Notebooks with AI
2+
3+
In this guide, you'll use AI-powered Copilot Chat to automatically generate Jupyter notebooks for measurement analysis. This is ideal for creating reproducible workflows like thermal analysis, crash analysis, or performance comparisons.
4+
5+
## Overview
6+
7+
This playground demonstrates:
8+
- Using AI to design analysis workflows
9+
- Generating complete Jupyter notebooks
10+
- Running analysis and generating visualizations
11+
- Saving notebooks for reproducibility and sharing
12+
13+
## Step 1: Define Your Analysis Goal
14+
15+
First, determine what analysis you want to perform. Some examples:
16+
17+
- **Thermal Analysis** — Compare temperature measurements across test campaigns
18+
- **Performance Comparison** — Analyze acceleration or efficiency metrics
19+
- **Data Quality Check** — Identify anomalies or missing values
20+
- **Correlation Analysis** — Find relationships between different measurements
21+
22+
## Step 2: Ask Copilot to Create a Notebook
23+
24+
In Copilot Chat, describe your analysis goal:
25+
26+
```
27+
I want to create a thermal analysis of measurements from test campaign 'Campaign_01'.
28+
Show temperature trends and identify peak values.
29+
```
30+
31+
Copilot will:
32+
1. Ask clarifying questions (e.g., date range, temperature thresholds)
33+
2. Generate a complete Jupyter notebook with:
34+
- Connection setup code
35+
- JAQueL queries to retrieve data
36+
- Data cleaning and preprocessing
37+
- Analysis and visualization code
38+
- Statistical summaries
39+
40+
## Step 3: Review and refine the Generated Notebook
41+
42+
43+
If the generated notebook needs adjustments, provide feedback:
44+
45+
```
46+
Add a second plot comparing temperature from two different test campaigns
47+
```
48+
49+
```
50+
Include error handling for cases where data is missing
51+
```
52+
53+
```
54+
Add a summary table with statistics for each measurement
55+
```
56+
57+
Copilot will update the notebook accordingly.
58+
59+
60+
## Tips & Best Practices
61+
62+
1. **Be descriptive** — Provide context about your data and analysis goals
63+
2. **Start simple** — Begin with basic analysis, then add complexity
64+
3. **Verify queries** — Have Copilot explain generated JAQueL queries before execution
65+
4. **Test on small data** — Use `$rowlimit` to test queries on a subset first
66+
5. **Document assumptions** — Add markdown cells explaining data filters and calculations
67+
6. **Version control** — Commit notebooks to Git for tracking changes
68+
69+
## Next Steps
70+
71+
- **Build Applications:** Use analysis workflows as a foundation for [Creating Analysis Applications](03_simple_analysis_application.md)
72+
- **Advanced Queries:** Learn more in the [Simple Data Interaction](01_simple_data_interaction.md) guide
73+
- **Explore:** Check out the [odsbox-jaquel-mcp documentation](https://github.com/totonga/odsbox-jaquel-mcp) for advanced analysis techniques
74+
75+
---
76+
77+
**Next:** [Creating Analysis Applications](03_simple_analysis_application.md)
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
# Creating Analysis Applications with AI
2+
3+
In this guide, you'll use AI-powered Copilot Chat to build interactive Python applications with user interfaces for exploring and analyzing ASAM ODS data. This extends the notebook-based workflows into standalone tools.
4+
5+
## Overview
6+
7+
This playground demonstrates:
8+
- Designing application architecture with AI
9+
- Generating complete Python applications with UI frameworks
10+
- Creating interactive dashboards and data exploration tools
11+
- Deploying applications for team use
12+
13+
**Time to complete:** 30-45 minutes
14+
15+
## Recommended Frameworks
16+
17+
For interactive applications, consider these frameworks:
18+
19+
- **Streamlit** — Simple, rapid UI development with Python (recommended for beginners)
20+
- **Dash** — More advanced dashboards and web applications
21+
- **PyQt / Tkinter** — Desktop applications with rich UI
22+
23+
This guide focuses on **Streamlit** for its ease of use.
24+
25+
## Step 1: Define Your Application
26+
27+
Determine what your application should do. Examples:
28+
29+
- **Data Explorer** — Browse measurements, filter by criteria, view details
30+
- **Dashboard** — Real-time monitoring of measurement values
31+
- **Analysis Tool** — Run analysis workflows with user-configurable parameters
32+
- **Report Generator** — Create PDF reports from selected data
33+
34+
## Step 2: Ask Copilot to Design the Application
35+
36+
In Copilot Chat, describe your application:
37+
38+
```
39+
I want to build a Streamlit application that lets users:
40+
1. Connect to an ASAM ODS server
41+
2. Browse measurements from a selected test
42+
3. View temperature data with a line chart
43+
4. Compare measurements side-by-side
44+
```
45+
46+
Copilot will:
47+
1. Ask clarifying questions about UI layout and features
48+
2. Suggest library choices (Streamlit, Dash, etc.)
49+
3. Outline application structure
50+
4. Generate complete code
51+
52+
## Step 3: Generate and run Application Code
53+
54+
Copilot will create a Streamlit application structure.
55+
Launch the application:
56+
57+
```bash
58+
streamlit run app.py
59+
```
60+
61+
Streamlit will:
62+
- Start a local development server (usually `http://localhost:8501`)
63+
- Open your application in the default browser
64+
- Auto-reload on code changes
65+
66+
## Step 4: Test and Refine
67+
68+
Interact with your application:
69+
1. **Test all features** — Connect, browse data, create charts
70+
2. **Identify issues** — Note any bugs or missing functionality
71+
3. **Ask Copilot for improvements** — Request UI enhancements or new features
72+
73+
Example refinement requests:
74+
75+
```
76+
Add a date range picker to filter measurements
77+
```
78+
79+
```
80+
Create a comparison view to display two measurements side-by-side
81+
```
82+
83+
```
84+
Add statistics (mean, max, min, std dev) below the chart
85+
```
86+
87+
```
88+
Add login functionality to control data access
89+
```
90+
91+
## Tips & Best Practices
92+
93+
1. **Start small** — Create a minimal working app, then add features
94+
2. **Use session state** — Streamlit sessions persist UI state
95+
3. **Cache expensive operations** — Use `@st.cache_data` to avoid recomputing
96+
4. **Validate inputs** — Check user inputs before querying ASAM ODS server
97+
5. **Handle errors gracefully** — Show user-friendly error messages
98+
6. **Document code** — Add comments and docstrings
99+
7. **Test thoroughly** — Verify all user interactions
100+
101+
## Next Steps
102+
103+
- **Learn more Streamlit** — Visit [Streamlit documentation](https://docs.streamlit.io/)
104+
- **Advanced ODS queries** — Review [odsbox-jaquel-mcp](https://github.com/totonga/odsbox-jaquel-mcp) documentation
105+
- **Share your app** — Deploy and share with your team
106+
- **Extend functionality** — Add databases, APIs, or other integrations
107+
108+
---
109+
110+
**Congratulations!** You've completed the AI playground series. You now have skills to:
111+
- Explore ASAM ODS data interactively
112+
- Generate analysis notebooks with AI
113+
- Build standalone applications
114+
115+
**Next steps:** Explore the [odsbox-jaquel-mcp GitHub](https://github.com/totonga/odsbox-jaquel-mcp) for advanced techniques and the [MCP Playground](https://github.com/peak-solution/asam_ods_mcp_playground) for more examples.
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Work with AI: ODSBox-AIConnect Overview
2+
3+
## What is ODSBox-AIConnect?
4+
5+
**ODSBox-AIConnect** is a Model Context Protocol (MCP) service that enables AI-assisted workflows for working with ASAM ODS data. It's built on top of the [odsbox-jaquel-mcp](https://github.com/totonga/odsbox-jaquel-mcp) project and integrates seamlessly with VS Code's Copilot Chat, allowing you to use natural language to explore, query, and analyze ASAM ODS data.
6+
7+
## How It Works
8+
9+
Rather than manually writing complex queries and analysis scripts, you can:
10+
11+
1. **Connect to your ASAM ODS server** — Provide connection details or use environment variables
12+
2. **Ask questions in plain English** — Use VS Code Copilot Chat to explore your data
13+
3. **Generate code and analysis workflows** — Let AI assist in creating Jupyter notebooks, Python scripts, and data visualizations
14+
4. **Verify and refine results** — Review generated code and prompts for accuracy
15+
16+
## Key Features
17+
18+
- **Schema Inspection** — Explore available entities, relationships, and data structures
19+
- **JAQueL Query Assistance** — Build, validate, and explain ASAM ODS queries using natural language
20+
- **Data Access & Analysis** — Retrieve timeseries and submatrix data with AI-guided workflows
21+
- **Code Generation** — Automatically generate Python scripts for bulk data fetching and visualization
22+
- **Measurement Comparison** — Generate Jupyter notebooks for comparing measurements and analyzing correlations
23+
24+
25+
26+
## Learning Path
27+
28+
### 📘 Simple Data Interaction
29+
Start here to understand the basics: [Simple Data Interaction](01_simple_data_interaction.md)
30+
31+
Learn how to connect to an ASAM ODS server and ask AI-powered questions about your data.
32+
33+
### 📊 Creating Analysis Notebooks
34+
Next, create reproducible analysis workflows: [Creating Analysis Notebooks](02_simple_analysis_notebook.md)
35+
36+
Use AI to generate Jupyter notebooks for thermal analysis or other measurement comparisons.
37+
38+
### 🎨 Creating Analysis Applications
39+
Finally, build interactive applications: [Creating Analysis Applications](03_simple_analysis_application.md)
40+
41+
Leverage AI to create simple Python applications with user interfaces for data exploration and visualization.
42+
43+
## Example Use Cases
44+
45+
- **Data Exploration** — Quickly understand what data is available in your ASAM ODS server
46+
- **Query Development** — Generate JAQueL queries using natural language descriptions
47+
- **Performance Analysis** — Compare measurements and identify correlations with AI assistance
48+
- **Report Generation** — Create Jupyter notebooks for automated reporting and analysis
49+
- **Data Migration** — Understand data models and generate migration scripts
50+
51+
## Resources
52+
53+
- **[odsbox-jaquel-mcp GitHub](https://github.com/totonga/odsbox-jaquel-mcp)** — Full project documentation and advanced usage
54+
- **[MCP Playground Examples](https://github.com/peak-solution/asam_ods_mcp_playground)** — Installation, configuration, and reference implementations
55+
- **[ASAM ODS Standard](https://www.asam.net/standards/detail/ods/)** — Official ASAM ODS documentation
56+
57+
## Next Steps
58+
59+
Ready to get started? Head to [Simple Data Interaction](01_simple_data_interaction.md) to begin your first AI-assisted ASAM ODS workflow!
60+
61+
---
62+
63+
**License:** Creative Commons BY-NC-SA 4.0
64+
**Based on:** [odsbox-jaquel-mcp](https://github.com/totonga/odsbox-jaquel-mcp) by totonga
111 KB
Loading

data_management_learning_path/notebooking/overview.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,9 @@ With Jupyter Notebooks, you can get a first overview of your data. By adding add
1313
Furthermore, Jupyter Notebooks are a great environment for rapid software development - like we've shown you for the EXD-API Plugins.
1414

1515
Moreover, you can share your notebooks, either as JSON so that others can use them with their data, or as PDF or HTML so that you can create reports.
16+
17+
## Using Notebooks with AI: ODSBox-AIConnect
18+
19+
**[📓 Work with AI](/ai/overview.md)** — Explore the dedicated AI chapter for a complete learning path with three playgrounds (data interaction, analysis notebooks, and standalone applications).
20+
21+
**Setup & Configuration** — For installation and configuration instructions, see the [MCP Playground Examples](https://github.com/peak-solution/asam_ods_mcp_playground) repository.

0 commit comments

Comments
 (0)