Polish local AI demo

Bielik running inside ASP.NET.

A private Polish RAG and tool-calling agent using Bielik, pure C#/.NET, local documents and well-formed JSON output — without Python, Ollama or a model server.

5-minute path
$ cd Demo/LocalAgentAspNetDemo $ .\download-bielik.cmd $ .\download-embedder.cmd $ .\run-bielik.cmd

The Bielik profile loads appsettings.Bielik.json, Polish documents from Data-pl/ and Polish Swagger examples.

Flow

Local Polish AI in one process.

📦

Load Bielik

GGUF model file from disk, mmap-backed, tokenizer and chat template read from the model.

🔎

RAG

Index Polish markdown documents and retrieve grounded context from the in-process vector store.

🛠️

C# tools

Polish user request becomes a constrained tool call dispatched to a C# handler.

{}

JSON

Return a well-formed business-decision JSON object for app integration and automation.

Try these endpoints

Swagger or curl.

# RAG over Polish documents
curl -X POST http://localhost:5234/rag/query ^
  -H "Content-Type: application/json" ^
  -d "{ \"question\": \"Ile dni ma klient z UE na odstąpienie od umowy?\", \"topK\": 4 }"

# C# tool call from Polish request
curl -X POST http://localhost:5234/agent ^
  -H "Content-Type: application/json" ^
  -d "{ \"message\": \"Załóż zgłoszenie reklamacyjne o wysokim priorytecie dla klienta anna@firma.pl.\" }"

# Business-decision JSON
curl -X POST http://localhost:5234/decision/refund ^
  -H "Content-Type: application/json" ^
  -d "{ \"message\": \"Klient z UE kupił produkt 10 dni temu, nie był używany, chce odstąpić od umowy.\" }"
⚠️

Honest demo notes

  • Bielik-4.5B Q4_K_M is the practical CPU demo target.
  • Observed decode speed is around ~17 tok/s in the current CPU demo context.
  • MiniLM is used as the demo embedder; a Polish/multilingual embedder is the next better preset.
  • The JSON guarantee is about well-formed JSON structure; full field-level schema enforcement is separate.
Why it matters

Bielik without a separate AI stack.

For Polish documents

Policies, support FAQs, contracts, claims, procedures and internal knowledge bases.

For .NET teams

ASP.NET, WPF, Blazor, desktop and internal enterprise apps that already live in .NET.

For controlled environments

On-prem, regulated, air-gapped or procurement-heavy environments where external APIs and sidecars are hard to approve.