How ravikumargupta-bosch/ai-usecases-showcase works
Purpose and scope
A learning repository of runnable LLM-driven manufacturing and finance examples, implemented in parallel in Python and .NET 8. It also contains independent Python tutorial curricula for AI frameworks and patterns; this is a collection of scripts/projects, not a single deployed application.
Primary entry points
Each domain use case is a standalone console program: Python uses main.py, while .NET uses Program.cs within individual projects listed by dotnet/AIUsecasesShowcase.sln. Representative entry points: python/Manufacturing/01-PredictiveMaintenance/main.py, python/Finance/01-FraudDetection/main.py, and dotnet/Manufacturing/01-PredictiveMaintenance/Program.cs.
Use-case execution pipeline
The eight mirrored examples follow the same conceptual flow: load local sample CSV/JSON, convert domain records into an LLM prompt, invoke the selected provider, parse structured AI output, and print a domain result. Domain implementations include maintenance, quality, forecasting, anomaly detection, fraud, news sentiment, loan risk, and portfolio advice. Key .NET stages are visible in dotnet/Finance/01-FraudDetection/PromptBuilder.cs, dotnet/Finance/01-FraudDetection/TransactionRecord.cs, and dotnet/Finance/01-FraudDetection/FraudResult.cs.
Shared AI-provider boundary
Provider selection is centralized behind service abstractions rather than embedded in every .NET example: dotnet/Shared/Core/IAIService.cs, dotnet/Shared/Core/AIServiceFactory.cs, and dotnet/Shared/Core/OpenAIService.cs. The alternative local implementation is dotnet/Shared/Core/OllamaService.cs. Python has analogous shared modules in python/Shared/ai_service.py and python/Shared/json_helper.py. This boundary allows each scenario to target cloud OpenAI/Azure OpenAI or local Ollama/LLaMA through environment configuration.
Data and result boundary
Examples deliberately use file-backed sample inputs rather than databases or production ingestion. Shared loaders separate CSV/JSON decoding from business prompts in dotnet/Shared/Data/CsvLoader.cs and dotnet/Shared/Data/JsonLoader.cs; samples reside alongside scenarios, e.g. dotnet/Manufacturing/04-AnomalyDetection/data/sample_production_data.csv. Typed input/result models in each .NET project establish the expected pre-LLM and post-LLM shapes.
Runtimes and external services
Python requires Python 3.8+ and root requirements.txt; .NET targets .NET 8 via dotnet/AIUsecasesShowcase.sln. Cloud execution uses OpenAI in Python (OPENAI_API_KEY) and Azure OpenAI in .NET (AZURE_OPENAI_ENDPOINT, AZURE_OPENAI_KEY). Local execution depends on an Ollama runtime with a Llama 3 model and AI_PROVIDER=ollama. No persistent infrastructure, web server, or database is indicated.
Tutorial subsystem
tutorials/ is architecturally separate from the industry examples and serves as executable reference material for framework-specific patterns: tutorials/LangChain-LangGraph-LangSmith/, tutorials/AutoGen/, and tutorials/MCP/. Tutorials include basic-to-advanced stages and use cases, covering agent orchestration, RAG, observability, vector stores, local models, and prompt engineering; they have their own dependency and environment boundaries.
Components 21
Python examples
- Manufacturing scenarios · Maintenance, quality, forecasting, and anomaly examples.
python/Manufacturing/01-PredictiveMaintenance/main.py - Finance scenarios · Fraud, sentiment, loan-risk, and portfolio examples.
python/Finance/01-FraudDetection/main.py - AI service · Selects and invokes the configured Python LLM provider.
python/Shared/ai_service.py - JSON parser
python/Shared/json_helper.py - Python dependencies · Python 3.8+ dependencies for runnable examples.
requirements.txt
.NET 8 examples
- Use-case solution · Hosts standalone console projects for mirrored scenarios.
dotnet/AIUsecasesShowcase.sln - Manufacturing console app · Representative predictive-maintenance entry point.
dotnet/Manufacturing/01-PredictiveMaintenance/Program.cs - Finance console app · Representative fraud-detection pipeline.
dotnet/Finance/01-FraudDetection/PromptBuilder.cs - Transaction record · Typed pre-LLM fraud input.
dotnet/Finance/01-FraudDetection/TransactionRecord.cs - Fraud result · Typed structured AI output.
dotnet/Finance/01-FraudDetection/FraudResult.cs - Local sample data · File-backed scenario inputs; no database.
dotnet/Manufacturing/04-AnomalyDetection/data/sample_production_data.csv
Shared boundaries
- AI service factory · Creates the configured .NET provider service.
dotnet/Shared/Core/AIServiceFactory.cs - AI service contract · Common LLM invocation boundary for .NET scenarios.
dotnet/Shared/Core/IAIService.cs - Azure OpenAI service
dotnet/Shared/Core/OpenAIService.cs - Ollama service
dotnet/Shared/Core/OllamaService.cs - CSV/JSON loaders · Separates file decoding from scenario prompts.
dotnet/Shared/Data/CsvLoader.cs
Tutorial curricula
Independent executable framework references.
- LangChain ecosystem · Agents, RAG, observability, vector stores, and prompts.
- AutoGen curriculum · Agent orchestration examples.
- MCP curriculum · Model Context Protocol examples.
Other components
- OpenAI / Azure OpenAI · Configured with provider credentials.
- Ollama + Llama 3 · Selected with AI_PROVIDER=ollama.
Connections 21
- Python dependencies → Manufacturing scenarios: runs
- Python dependencies → Finance scenarios: runs
- Manufacturing scenarios → AI service: prompts via
- Finance scenarios → AI service: prompts via
- AI service → JSON parser: parses output
- AI service → OpenAI / Azure OpenAI: cloud provider
- AI service → Ollama + Llama 3: local provider
- Use-case solution → Manufacturing console app: contains
- Use-case solution → Finance console app: contains
- Local sample data → CSV/JSON loaders: decoded by
- CSV/JSON loaders → Manufacturing console app: supplies records
- CSV/JSON loaders → Finance console app: supplies records
- Transaction record → Finance console app: shapes prompt input
- Finance console app → AI service factory: selects provider
- Manufacturing console app → AI service factory: selects provider
- AI service factory → AI service contract: creates
- AI service contract → Azure OpenAI service: implemented by
- AI service contract → Ollama service: implemented by
- Azure OpenAI service → OpenAI / Azure OpenAI: invokes
- Ollama service → Ollama + Llama 3: invokes
- Finance console app → Fraud result: parses into