ollama

Configure Ollama API payloads and model discovery for local inference.

Updated Nov 8, 2025
One-click install
npx skills add https://github.com/berad217/human-training --skill ollama-berad217
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ollama
Source: https://github.com/berad217/human-training/tree/main/skills-drafts/ollama
Command: npx skills add https://github.com/berad217/human-training --skill ollama-berad217

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing code against a local Ollama daemon frequently encounters undocumented footguns including hallucinated model names, broken vision payloads, incorrect structured output modes, and misconfigured sampling parameters that cause empty responses, wasted GPU resources, and unpredictable inference behavior.

Core Features & Use Cases

  • Discovery-first model selection: Automatically verify installed models via the /api/tags endpoint to avoid referencing uninstalled or incorrectly named models.
  • Safe default guidance: Preset recommended values for sampling parameters, structured output modes, thinking model configuration, and vision payload formatting to prevent common runtime failures.
  • Verified bug workarounds: Documented fixes for production-verified Ollama vision pipeline bugs that cause empty responses when using legacy JSON format or positive num_predict values with image inputs.
  • Use Case: Build a local image captioning pipeline that reliably returns captions without empty responses, or set up reproducible structured output for local LLM evaluation and benchmarking tasks.

Quick Start

Use the ollama skill to write a Python script that safely queries a local Ollama vision model to describe an image, using the correct payload format to avoid empty responses.

Frequently Asked Questions about ollama

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does my local Ollama vision model return empty responses?

Ollama vision models frequently return empty responses when using legacy JSON format or positive num_predict values with image inputs. You can fix this by applying correct payload formatting and verified workarounds for these pipeline bugs.

How do I prevent hallucinated model names when writing Ollama code?

To prevent hallucinated model names in Ollama code, perform discovery-first model selection by automatically verifying installed models via the /api/tags endpoint before referencing any model names in your application logic.

How do I generate deterministic structured output from a local LLM using Ollama?

To generate deterministic structured output from a local LLM using Ollama, apply safe default guidance for structured output modes and sampling parameters to ensure reproducible local LLM evaluation and benchmarking tasks.

What are the common footguns when configuring Ollama sampling parameters?

Common Ollama sampling parameter footguns include misconfigured values that cause unpredictable inference behavior and wasted GPU resources. You can avoid these by enforcing safe defaults for sampling parameters and thinking model configuration.

Can I use the OpenAI-compatible API shim with a local Ollama daemon?

Yes, you can use the OpenAI-compatible API shim with a local Ollama daemon. Proper shim configuration is supported to ensure reliable runtime behavior when integrating local LLM inference into existing OpenAI-compatible workflows.

How do I safely build a local image captioning pipeline with Ollama?

To safely build a local image captioning pipeline with Ollama, use the correct payload formatting for vision endpoints to avoid empty responses, ensuring the vision model reliably returns captions without wasting GPU time.