local llm

How to Give a Local Ollama Model a Custom System Prompt

3 min · updated June 13, 2026

With Ollama you can wrap any local model in your own system prompt and settings, then call it by name — no pasting instructions every time. You do it with a tiny file called a Modelfile.

Prerequisite: Ollama installed — see Run a local AI model with Ollama.

1. Create a Modelfile

In any folder, make a file named Modelfile (no extension):

FROM llama3

SYSTEM """
You are a blunt code reviewer. Point out bugs and risks first.
Be terse. Use bullet points. No praise.
"""

PARAMETER temperature 0.4

FROM is the base model, SYSTEM is the baked-in instruction, and PARAMETER tweaks behavior.

2. Build your model

From that folder:

ollama create reviewer -f Modelfile

reviewer is the name of your new model.

3. Run it

ollama run reviewer

It starts with your system prompt already applied. Use it anywhere you’d use a normal Ollama model, including from the API.


Tips

← All guides