๐ง AI-Generated Technical Service Bulletins (TSBs) for EVs
This project uses local LLMs to automatically generate Technical Service Bulletins (TSBs) from electric vehicle (EV) repair logs. It includes clustering similar logs, generating markdown TSBs, and a user-friendly Streamlit interface.
๐ Features
โ๏ธ TSB Generation using local LLMs (e.g. Mistral via Ollama)
๐ง Unsupervised Clustering of similar repair logs
๐ Markdown Export of generated TSBs
๐๏ธ Streamlit Web App for interactive use
๐ Offline Compatible โ no API calls or internet required
๐๏ธ Organized project structure with extensible modules
๐ Project Structure
๐ ๏ธ Requirements
Python 3.8+
Ollama installed locally
A local LLM (e.g.,
mistral, llama3, phi3)pip packages:
streamlitscikit-learnnumpypandasollamaTo install and start Ollama:
Install Ollama:
Download and run a model (e.g. Mistral):
Make sure the model is running before launching the app or scripts.
๐ฆ Installation
Clone and set up the project:
Create a virtual environment:
Install Python dependencies:
โ๏ธ How to Run the Scripts
1. Generate TSBs from Raw Logs
๐ Output:
outputs/Tsbs/tsb_1.md, tsb_2.md, etc.2. Cluster Logs into Groups
๐ Output:
data/clustered_logs/cluster_1.txt, cluster_2.txt, etc.3. Generate TSBs from Clustered Logs
๐ Output:
outputs/Tsbs/cluster_1.md, etc.4. Launch the Streamlit App
Then open
http://localhost:8501 in your browser.๐งช Sample File Format
repair_logs_sample.txt example:Each log is separated by either a double newline or
---.๐ง Model & Prompt
The prompt used for TSB generation is stored in:
It provides instructions to the LLM for generating concise, technical, and standardized service bulletins based on the input logs.
You can customize the prompt to match your formatting preferences or tone of voice.
โ
Current Status
โ
Offline TSB generation using Ollama
โ
Clustering of logs for grouped TSBs
โ
Markdown file generation for each TSB
โ
Streamlit UI for manual upload and generation
โ
Export to PDF
๐ Add quality evaluation & ranking (Planned)
๐ Multi-log summarization via embedding clustering (Planned)
๐ Acknowledgments
Ollama โ local LLM orchestration
scikit-learn โ clustering engine
Streamlit โ web app UI
โ๏ธ Author
Iftekhar Ahmed, Berlin, Germany AI | ML | Automation | Sustainability
0 likes ยท 18 views ยท Aug 5, 2025
Automates TSB creation from repair logs using local LLMs, Python, and Streamlit for EV maintenance insights.
Timeline
Jul 1, 2025 - Jul 30, 2025