Use cases
Contents
[
Hide
]
This section shows how to build real applications with Aspose.LLM for .NET. Each use case is a complete, runnable scenario — paste it into a .NET 8 or .NET 10 project, apply a license, and run.
For compact snippets that illustrate a single call, see Quick wins. For the first runnable example, see Hello, world!.
We assume familiarity with C# and async/await. If you are new to the SDK, read Getting started first.
Core scenarios
- Simple chat — one or a few messages without managing sessions yourself.
- Multi-turn chat — an explicit session with several exchanges in one conversation.
- Save and restore session — persist conversation state to disk and resume later.
- Custom preset — patterns for customizing a built-in preset or building one from scratch.
Vision
- Vision question answering — ask questions about images, compare images, transcribe documents.
Throughput and scaling
- Batch processing — run many prompts through one loaded model.
- Streaming-like responses — the no-streaming limitation and workarounds.
- Multiple concurrent sessions — serve many users or workflows from a single instance.
Deployment
- Offline deployment — air-gapped, firewalled, or no-internet targets.
- CPU-only deployment — no GPU, tune threads, set realistic expectations.
- GPU deployment with CUDA — NVIDIA GPUs, single and multi-GPU.
- Integration with ASP.NET Core — host behind HTTP via Minimal API.
Tuning
- Long context tuning — 128K-262K contexts with flash attention and KV quantization.
- Low memory tuning — fit into tight memory budgets.
Advanced
- Bring your own GGUF — custom models from Hugging Face or disk.
- System prompt recipes — effective system-prompt patterns.
What’s next
- Quick wins — compact recipes for single tasks.
- Developer’s reference — conceptual reference for presets, sessions, and the API.
- Supported presets — pick a preset for your scenario.