PulseAugur
EN
LIVE 20:00:19

Ollama silently truncates prompts, crippling RAG bot accuracy

A user encountered significant issues with Ollama's prompt handling, where the `num_ctx` setting silently truncated prompts longer than 2048 tokens. This led to a drastic decrease in accuracy for their local RAG bot, dropping from 81% to 46%. The truncation caused the model to miss crucial instructions and top-ranked retrieved chunks, resulting in incorrect JSON formatting and factually wrong answers. The problem was resolved by explicitly setting `num_ctx` to a higher value (e.g., 8192) in the Modelfile or via the native API, which restored accuracy to 81% at the cost of increased VRAM usage. AI

IMPACT Highlights potential pitfalls in local LLM deployment and prompt engineering, impacting developers using Ollama for RAG applications.

RANK_REASON User-reported issue with a specific software tool's functionality.

Read on dev.to — LLM tag →

AI-generated summary · Google Gemini · from 1 sources. How we write summaries →

Ollama silently truncates prompts, crippling RAG bot accuracy

How we ranked this

Signal score
1 / 100
Composite score across the factors below. Higher = stronger signal that this story matters right now.
Newsworthiness bucket
Tool
User-reported issue with a specific software tool's functionality.
Source corroboration
Single-source cluster
Only one publisher covered this so far. Single-source stories can still rank when the publisher is high-authority, but they lack cross-source corroboration.
Topics
product, infra
Editorial topic classification. Feeds into how the story surfaces on /topic/<slug> hub pages and into the per-entity coverage mix.
AI-industry relevance
High
Clearly on-topic for AI-industry coverage.
Story freshness
1 days old
Coverage has settled into its steady-state source set.

Full methodology in our editorial standards.

COVERAGE [1]

  1. dev.to — LLM tag TIER_1 English(EN) · jidonglab ·

    Ollama num_ctx Truncated 287 of 400 Prompts and Never Told Me

    <p>My local RAG bot answered 46% of my test questions correctly. Llama 3.1 8B on Ollama, a 128K context window on the model card, retrieved chunks that I had checked by hand. The right paragraph was in the prompt every single time.</p> <p>The model just never saw it. Ollama's <co…