<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Anton Malling</title>
    <description>The latest articles on DEV Community by Anton Malling (@anton_malling_43b7137bd8a).</description>
    <link>https://dev.to/anton_malling_43b7137bd8a</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3461042%2F9450edbf-d35d-4d4d-8d34-cc76bd056b17.png</url>
      <title>DEV Community: Anton Malling</title>
      <link>https://dev.to/anton_malling_43b7137bd8a</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/anton_malling_43b7137bd8a"/>
    <language>en</language>
    <item>
      <title>How to Give AI Coding Agents Access to Your Product Docs</title>
      <dc:creator>Anton Malling</dc:creator>
      <pubDate>Tue, 07 Jul 2026 11:05:40 +0000</pubDate>
      <link>https://dev.to/anton_malling_43b7137bd8a/how-to-give-ai-coding-agents-access-to-your-product-docs-46op</link>
      <guid>https://dev.to/anton_malling_43b7137bd8a/how-to-give-ai-coding-agents-access-to-your-product-docs-46op</guid>
      <description>&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; You give AI coding agents access to your product docs by exposing your documentation through an MCP server or a retrieval API, then registering it as a tool in the agent. Once connected, tools like Claude, Cursor, Codex, and VS Code query your current docs and code at the moment they need them, instead of guessing from stale pretraining data or generic web search. Kapa.ai does this with a one-click hosted MCP server and a Retrieval API, so agents answer from your live documentation with citations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key takeaways&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Coding agents get your product wrong because your docs, APIs, and changelogs are not in their training data.&lt;/li&gt;
&lt;li&gt;The Model Context Protocol (MCP) is the open standard for connecting agents to external knowledge; a retrieval API is the alternative for custom builds.&lt;/li&gt;
&lt;li&gt;A hosted MCP server means no infrastructure to run: connect sources once, register one URL in the agent.&lt;/li&gt;
&lt;li&gt;Grounding an agent in your docs also makes its other tools sharper, because it finally understands your product.&lt;/li&gt;
&lt;li&gt;Accurate retrieval is the differentiator; kapa.ai returns the right source roughly twice as often as web search or a DIY RAG pipeline.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why do AI coding agents get your product wrong?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;AI coding agents get your product wrong because the answer is not in the model and not in your APIs, it lives in your docs, code, changelogs, and support tickets.&lt;/strong&gt; Your users work in Claude Code, Cursor, and Codex, and those agents fall back on outdated pretraining data or generic web search when they hit a product-specific question. So when someone asks "how do I enable SSO?" or "why did my deploy fail?", the agent has no tool for it and guesses.&lt;/p&gt;

&lt;p&gt;That guessing is &lt;a href="https://www.kapa.ai/blog/introducing-kapa-for-agents" rel="noopener noreferrer"&gt;the most common failure mode in production agents&lt;/a&gt;. The fix is to give the agent a way to retrieve your current product knowledge on demand, so it answers from your documentation instead of its memory.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to give AI coding agents access to your docs
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;You connect your docs to an agent by exposing them as a tool the agent can call, using either an MCP server or a retrieval API.&lt;/strong&gt; Both approaches let the agent run a semantic search over your knowledge base mid-task and pull back the relevant, cited content:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://docs.kapa.ai/integrations/mcp/overview" rel="noopener noreferrer"&gt;MCP server&lt;/a&gt;:&lt;/strong&gt; the standard choice for connecting off-the-shelf coding tools (Cursor, Claude, VS Code, and others). You register one URL and the tool can query your docs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://docs.kapa.ai/integrations/in-product-agents" rel="noopener noreferrer"&gt;Retrieval API&lt;/a&gt;:&lt;/strong&gt; a plain HTTP call for teams building their own agent with a framework like LangGraph, OpenAI Agents, or an in-house orchestrator.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In both cases, the agent's native tools keep handling your product's actions (queries, mutations, object creation), while the docs-search tool supplies the product knowledge it needs to use those tools correctly.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is MCP, and which coding tools support it?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;MCP (Model Context Protocol) is an open standard from Anthropic that lets AI agents connect to external tools and data sources, like a universal API for AI assistants.&lt;/strong&gt; An MCP server exposes your documentation so any MCP-capable tool can query it directly. Support is broad across the coding tools your users already run:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;How MCP is added&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Claude Code&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;claude mcp add&lt;/code&gt; in the terminal&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Claude Desktop&lt;/td&gt;
&lt;td&gt;Settings &amp;gt; Custom Integrations, or config file&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cursor&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;.cursor/mcp.json&lt;/code&gt; or Settings &amp;gt; MCP&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;VS Code (Copilot)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;.vscode/mcp.json&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ChatGPT Desktop&lt;/td&gt;
&lt;td&gt;Settings &amp;gt; MCP Servers (developer mode)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Codex&lt;/td&gt;
&lt;td&gt;&lt;code&gt;codex mcp add&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Windsurf, Zed, Antigravity&lt;/td&gt;
&lt;td&gt;MCP config file&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Setup: connect your docs in a few steps
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;With a hosted MCP server, giving agents access to your docs takes four steps and no infrastructure to run.&lt;/strong&gt; Using kapa.ai as the example:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Connect your sources.&lt;/strong&gt; In the dashboard, add your docs, code, PDFs, tickets, Slack, and any of &lt;a href="https://docs.kapa.ai/data-sources/overview" rel="noopener noreferrer"&gt;30+ sources&lt;/a&gt;; kapa.ai builds them into one synced knowledge base.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Add the integration.&lt;/strong&gt; Add a Hosted MCP Server (or use the Retrieval API for a plain HTTP call), and set a subdomain, server name, and authentication.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Wire it into your agent.&lt;/strong&gt; Copy the MCP URL and register it as one tool alongside the agent's existing tools. That is the whole change.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ship it.&lt;/strong&gt; The agent now falls back to your docs whenever its own tools cannot answer, and cites the source.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Because the server is remote and hosted, your users install nothing: they paste one connection URL into their AI tool. &lt;a href="https://www.kapa.ai/blog/build-an-mcp-server-with-kapa-ai" rel="noopener noreferrer"&gt;Building your own MCP server&lt;/a&gt;, by contrast, means running infrastructure, managing auth and rate limits, and ongoing maintenance.&lt;/p&gt;

&lt;h2&gt;
  
  
  MCP server vs Retrieval API: which should you use?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Use a hosted MCP server to connect existing coding tools, and the Retrieval API when you are building a custom agent.&lt;/strong&gt; They expose the same underlying semantic search over your knowledge base.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Hosted MCP server&lt;/th&gt;
&lt;th&gt;Retrieval API&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Best for&lt;/td&gt;
&lt;td&gt;Off-the-shelf tools (Cursor, Claude, VS Code)&lt;/td&gt;
&lt;td&gt;Custom agents (LangGraph, OpenAI Agents, in-house)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Integration&lt;/td&gt;
&lt;td&gt;Register one URL&lt;/td&gt;
&lt;td&gt;Plain HTTP call&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Infrastructure&lt;/td&gt;
&lt;td&gt;Fully hosted, one click&lt;/td&gt;
&lt;td&gt;You orchestrate the calls&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Users install&lt;/td&gt;
&lt;td&gt;Nothing, paste a URL&lt;/td&gt;
&lt;td&gt;N/A, server-side&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  How accurate is agent retrieval, and why does it matter?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Retrieval accuracy is what decides whether grounding actually helps, because a wrong chunk sends the agent back to guessing.&lt;/strong&gt; On real product questions, kapa.ai's agentic retrieval returns the right source almost twice as often as general web-search APIs or a DIY RAG pipeline. The benchmark is Recall@5 across four real customer projects (developer tools, semiconductors, software platforms), 30 human-annotated multi-source production questions each, with web search using site limiters for fairness and DIY pipelines built on Azure AI Foundry and Firecrawl plus Pinecone.&lt;/p&gt;

&lt;p&gt;The payoff compounds: an agent that retrieves the right context not only answers knowledge questions correctly, it also uses its other tools more accurately, because it finally understands your product.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Kapa.ai gives your agents product knowledge
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Kapa.ai gives AI coding agents your product knowledge through a one-click hosted MCP server and a Retrieval API, grounded in a single synced knowledge base.&lt;/strong&gt; You connect docs, code, PDFs, tickets, and 30+ sources once, everything stays in sync so answers are never stale, and every answer is cited. It works out of the box with Cursor, Claude, VS Code, Codex, and other MCP clients, and teams like Port, Airbyte, Matillion, and Nordic Semiconductor already build coding assistants, product copilots, and support agents on it. &lt;/p&gt;

</description>
      <category>ai</category>
      <category>code</category>
      <category>rag</category>
    </item>
    <item>
      <title>How we index images for RAG</title>
      <dc:creator>Anton Malling</dc:creator>
      <pubDate>Mon, 08 Jun 2026 18:11:25 +0000</pubDate>
      <link>https://dev.to/anton_malling_43b7137bd8a/how-we-index-images-for-rag-1pf4</link>
      <guid>https://dev.to/anton_malling_43b7137bd8a/how-we-index-images-for-rag-1pf4</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;kapa.ai builds AI documentation assistants, an LLM-powered RAG chatbot for technical documentation used in production by 200+ technical companies. The knowledge bases we process hold millions of images like screenshots, architecture diagrams, circuit schematics, annotated UI walkthroughs. We spent several months working out how to make them useful in our RAG pipeline.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The short version: we don't send images to the model at query time. We describe each image once, at indexing time, with a cheap vision model, store the descriptions as text, and retrieve them alongside ordinary text chunks. Indexing is a one-time cost; after that, per-query overhead is 1% to 6% over text-only, and answers are measurably, statistically significantly better. This post explains how we got there.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fheodv9mkt9ao4jkt83xy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fheodv9mkt9ao4jkt83xy.png" alt="Two answers compared, one with a screenshot" width="800" height="438"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Both answers are correct. The one that shows the screenshot is the one a user can act on without hunting for the setting.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What images actually do in technical documentation
&lt;/h2&gt;

&lt;p&gt;We went through thousands of real customer questions across hardware, semiconductor, and developer-tooling accounts to see how images earn their place in an answer. They split into two kinds.&lt;/p&gt;

&lt;p&gt;Most are illustrative. They show what the text already says, only more clearly: a guide says "click the settings icon," and the screenshot beside it shows which icon, where, and what it looks like. The words carry the fact; the picture makes it easy to act on.&lt;/p&gt;

&lt;p&gt;Some are load-bearing. A wiring diagram, a spec table, a certification or color-availability matrix can hold a value that lives in the figure and essentially nowhere else. There the picture is not a convenience, it is the source of the answer.&lt;/p&gt;

&lt;p&gt;We confirmed the lift either way: with image context available, an LLM judge preferred the answers across three customer projects and two models, by a statistically significant margin (McNemar's test, p &amp;lt; 0.05).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fymbrokbgi7hokacxz3x7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fymbrokbgi7hokacxz3x7.png" alt="Answer quality lift with image context" width="799" height="440"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The improvement is the kind a user feels. Instead of "look for the configuration section that controls the setting," you get the specific path plus a screenshot showing exactly where to click. Same facts, far easier to act on. For a support assistant, that is the difference between a user who self-serves and one who opens a ticket.&lt;/p&gt;

&lt;p&gt;Either way, images make answers materially better. The engineering question is the one the rest of this post is about: how to use them without paying a vision bill on every query.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why query-time multimodal does not work at scale
&lt;/h2&gt;

&lt;p&gt;The approach most people reach for first: retrieve the relevant chunks, collect the images they reference, and pass everything to a vision-capable model.&lt;/p&gt;

&lt;p&gt;We tested it with GPT 5.1 and Claude 4.6 Sonnet across hundreds of production questions. The problems are structural, not engineering details to tune away.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fleqg43253c2nkachskrq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fleqg43253c2nkachskrq.png" alt="Query-time multimodal cost and payload problems" width="800" height="531"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The economics do not work.&lt;/strong&gt; Raw images added 27% to per-query cost on GPT and 51% on Claude (Claude tokenizes an image at roughly 975 tokens to GPT's 716). We serve millions of queries; paying that much more on all of them, when most answers do not need a fresh look at the pixels, is not a trade we can make.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The images do not physically fit.&lt;/strong&gt; A typical question retrieves 10-30 chunks referencing 20-30 images on average, with a long tail past 130. Claude's payload limit is 30 MB and OpenAI's 50 MB; around 25 images already approaches Claude's ceiling. You would have to cap images aggressively, which defeats the point.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Multimodal retrieval does not suit this domain.&lt;/strong&gt; CLIP-style embeddings wash out exactly the fine detail that matters in charts, tables, and annotated screenshots, and short technical queries ("how do I configure X") give too little signal to match against image vectors.&lt;/p&gt;

&lt;p&gt;These are properties of today's ecosystem, not bugs to fix. They pointed us away from query-time vision entirely.&lt;/p&gt;

&lt;h2&gt;
  
  
  Describe once at indexing time, retrieve as text
&lt;/h2&gt;

&lt;p&gt;The approach that works inverts the economics. Instead of paying to process images on every query, you pay once, at indexing time, to turn each image into a text description. After that, retrieval and generation run entirely in text.&lt;/p&gt;

&lt;p&gt;At indexing time, a vision language model writes a caption for each image. The captions are stored and retrieved alongside ordinary text chunks. At query time, if a caption is relevant, the retriever pulls it in; the model sees the caption, never the raw image, and cites the image by its original URL.&lt;/p&gt;

&lt;p&gt;This works because the heavy lifting, actually looking at the image, happens once, at ingestion, instead of on every query. For an illustrative screenshot the caption is a description; for a load-bearing figure it is a transcription of what the figure holds, the values in the table, the labels on the diagram. Either way the content becomes text, and the rest of the pipeline never has to see a pixel. &lt;a href="https://devblogs.microsoft.com/ise/multimodal-rag-with-vision/" rel="noopener noreferrer"&gt;Microsoft's research team&lt;/a&gt; also reached the same conclusion: describe at ingestion, store as separate chunks.&lt;/p&gt;

&lt;p&gt;This is what makes the load-bearing case work, and it is where a lot of assistants quietly fail. A color-availability matrix is a wall of check marks; a fire-resistance table is a grid of ratings. Flatten one into plain text with a generic extractor and the structure dissolves, which is how an assistant ends up confidently telling a customer a panel comes in a color it does not. Transcribed at ingestion, the same matrix becomes retrievable text, and the answer stays grounded in what the figure actually shows.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu820ln0rz3jlb27vy6rm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu820ln0rz3jlb27vy6rm.png" alt="A datasheet figure that is itself the answer" width="800" height="474"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;For datasheet-heavy products, the figure can sometimes be the answer. Though, this is rarely found based on real user questions in production.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What you have to get right in production
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Filtering: most images are junk, and some cannot be classified
&lt;/h3&gt;

&lt;p&gt;You cannot caption millions of images indiscriminately. Most are noise: logos, avatars, social preview cards, decorative banners. Heuristics handle the first pass (drop unsupported formats, tiny images, extreme aspect ratios). For the rest, we built a zero-shot classifier on multimodal embeddings. It is cheap enough to run across the whole corpus.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff1ahkpuze1oif60f4v1j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff1ahkpuze1oif60f4v1j.png" alt="Filtering the image corpus" width="800" height="482"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On clear-cut images it hits 96.8% accuracy (F1 0.974). On ambiguous ones, accuracy collapses to 59.8%, and the reason is fundamental. A screenshot of a countdown timer could be a decorative banner or step 3 of a tutorial about timers. The pixels are identical; without the surrounding text there is not enough information to decide, and no embedding model can fix that. So we accept it: the classifier removes the clear junk (about 13% of what survives heuristics) and we tolerate the ambiguous edge. Context-aware classification is the obvious next step.&lt;/p&gt;

&lt;h3&gt;
  
  
  Captioning: context matters more than model size
&lt;/h3&gt;

&lt;p&gt;Two things drive caption quality. First, surrounding text: feed the model the paragraphs before and after the image and quality jumps. Without context, a file-upload dialog is "a web page with a file upload form"; with it, the caption is grounded in the specific product, workflow, and step, which is what makes it useful for retrieval.&lt;/p&gt;

&lt;p&gt;Second, expensive models buy little. We compared five, from Claude 4.6 Sonnet down to GPT 5.4 nano. A small model (GPT 5.4 mini) produced captions almost indistinguishable from models four times its price; only nano dropped off. At our scale, a small model is the obvious choice.&lt;/p&gt;

&lt;h3&gt;
  
  
  Storage: separate caption chunks beat inline
&lt;/h3&gt;

&lt;p&gt;Two ways to integrate a caption. Inline: replace the image's alt text in the document, so some chunks carry both text and description. Separate: store each caption as its own chunk, leaving the document untouched.&lt;/p&gt;

&lt;p&gt;We expected inline to win, since the caption sits next to its text. Separate won, on both cost and image usage. Inline captions inflate every chunk they live in, and those chunks ship on every query whether the images are relevant or not. Separate chunks only enter the context when the retriever judges them relevant, so you pay for an image only when it matters. On one image-heavy project, inline raised per-query cost 19% with GPT; separate, 6%. With Claude, separate captions slightly lowered cost versus text-only. And they earn their place: the re-ranker promoted them into the top 15 on 51% of queries, while overall ranking held steady (Spearman ρ = 0.905).&lt;/p&gt;

&lt;h2&gt;
  
  
  Results
&lt;/h2&gt;

&lt;p&gt;End to end across three customer projects with GPT 5.1 and Claude 4.6 Sonnet:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Text-only baseline&lt;/th&gt;
&lt;th&gt;With image captions&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Images cited in answers&lt;/td&gt;
&lt;td&gt;0%&lt;/td&gt;
&lt;td&gt;10% to 64%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Answer quality (LLM judge)&lt;/td&gt;
&lt;td&gt;baseline&lt;/td&gt;
&lt;td&gt;significantly better (p &amp;lt; 0.05)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Per-query cost&lt;/td&gt;
&lt;td&gt;baseline&lt;/td&gt;
&lt;td&gt;+1% to 6%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Latency (time to first token)&lt;/td&gt;
&lt;td&gt;baseline&lt;/td&gt;
&lt;td&gt;sub-second increase&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Model uncertainty&lt;/td&gt;
&lt;td&gt;baseline&lt;/td&gt;
&lt;td&gt;unchanged or slightly lower&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Indexing cost&lt;/td&gt;
&lt;td&gt;n/a&lt;/td&gt;
&lt;td&gt;one-time, then no recurring image cost&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Across every experiment, images were placed correctly 94% to 99% of the time.&lt;/p&gt;

&lt;p&gt;This is a less flashy answer than "use a multimodal model," and that is the point. It works because it puts the vision where it belongs: once, at ingestion, turning whatever an image holds into text, instead of paying to re-examine pixels on every query. Whether an image clarifies the words or carries the answer outright, reading it once is cheaper and a better fit for how the rest of the pipeline works. The constraints we hit were not obstacles to engineer around; they were pointing at the architecture.&lt;/p&gt;

&lt;p&gt;This ships into kapa's answer engine as part of how we keep answers accurate on real-world technical docs, where the diagram or the spec table is often where the answer actually lives. Rolling out in preview now.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Written by the team at &lt;a href="https://www.kapa.ai" rel="noopener noreferrer"&gt;kapa.ai&lt;/a&gt;, an LLM-powered RAG chatbot for technical documentation used by 200+ technical companies including N8N, Grafana, Sentry and Nokia. This post was originally published at &lt;a href="https://www.kapa.ai/blog/how-we-index-images-for-rag" rel="noopener noreferrer"&gt;kapa.ai/blog/how-we-index-images-for-rag&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>rag</category>
    </item>
    <item>
      <title>We shipped 30 tools to our agent. The most-used one just reads our documentation.</title>
      <dc:creator>Anton Malling</dc:creator>
      <pubDate>Mon, 08 Jun 2026 17:55:51 +0000</pubDate>
      <link>https://dev.to/anton_malling_43b7137bd8a/we-shipped-30-tools-to-our-agent-the-most-used-one-just-reads-our-documentation-38l2</link>
      <guid>https://dev.to/anton_malling_43b7137bd8a/we-shipped-30-tools-to-our-agent-the-most-used-one-just-reads-our-documentation-38l2</guid>
      <description>&lt;h2&gt;
  
  
  The most important tool in our product agent is the one that reads documentation
&lt;/h2&gt;

&lt;p&gt;A few months ago we shipped an agent inside our own product. It lives in our web app and our customers use it to ask questions about their deployment - things like "how many Slack bot questions have users asked in the last month?".&lt;/p&gt;

&lt;p&gt;We built the agent because the analytics tooling we'd shipped (clustering, tagging, filters) never quite covered every use case, and we wanted to see if a chat interface could.&lt;/p&gt;

&lt;p&gt;For context, the agent has around 30 native tools to interact with our platform like &lt;code&gt;search_conversations&lt;/code&gt;, &lt;code&gt;display_chart&lt;/code&gt;, and so on.&lt;/p&gt;

&lt;p&gt;And the agent also has a single &lt;code&gt;search_knowledge_base&lt;/code&gt; that can read our documentation, code examples, support FAQs and API reference.&lt;/p&gt;

&lt;p&gt;We expected the native tools to do most of the work.&lt;/p&gt;

&lt;p&gt;But when looking at the last 1,192 conversations we found that &lt;code&gt;search_knowledge_base&lt;/code&gt; was the most used tool, almost as much as all the native tools combined.&lt;/p&gt;

&lt;p&gt;This post is about what we found when we looked at why.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2hidrbl7ijsa9ts93f3e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2hidrbl7ijsa9ts93f3e.png" alt=" " width="800" height="351"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Finding #1: Documentation became the fallback
&lt;/h2&gt;

&lt;p&gt;The main use case for knowledge base search was acting as a failover for the agent when users asked questions that no native tool calls could help with. That accounts for 32.1% of conversations.&lt;/p&gt;

&lt;p&gt;These were conversations where users asked completely reasonable product questions like:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"How do I set up the Slack integration?"&lt;/p&gt;

&lt;p&gt;"Why am I getting CORS errors on the widget?"&lt;/p&gt;

&lt;p&gt;"How often do website crawls ingest?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If we had shipped with native tools but no &lt;code&gt;search_knowledge_base&lt;/code&gt;, the agent would have had to refuse or guess.&lt;/p&gt;

&lt;p&gt;What happened here is we had built an analytics agent but our users treated it as a "catch-all" product agent.&lt;/p&gt;

&lt;h2&gt;
  
  
  Finding #2: Documentation adds context to the native tools
&lt;/h2&gt;

&lt;p&gt;The next pattern was conversations where the agent used both kinds of tools. Around 7% of the total.&lt;/p&gt;

&lt;p&gt;These were smaller in volume but they made the division of labor between the two kinds of tools clearer than anything else. The native tools answer what is true about the user's account right now. &lt;code&gt;search_knowledge_base&lt;/code&gt; answers what it means.&lt;/p&gt;

&lt;p&gt;A representative example: a user asked what type of MCP integration they had set up and how it differed from the other options. &lt;code&gt;list_integrations&lt;/code&gt; answered the first half - here's what you have configured.&lt;/p&gt;

&lt;p&gt;To answer the second half the agent needed to read the docs, because the comparison between integration types lives there.&lt;/p&gt;

&lt;p&gt;Neither tool could have answered this on its own. The native tool knew the state. The knowledge-base tool knew the product.&lt;/p&gt;

&lt;p&gt;The answer required both. This is the role most people probably expect a docs-reading tool to play in an agent. It's real, it matters, and it was the smallest of the three patterns we found.&lt;/p&gt;

&lt;h2&gt;
  
  
  Finding #3: Documentation helps the agent use its own tools
&lt;/h2&gt;

&lt;p&gt;This was the most interesting pattern and the one we didn't expect.&lt;/p&gt;

&lt;p&gt;In some conversations, &lt;code&gt;search_knowledge_base&lt;/code&gt; wasn't being called to answer the user. It was being called so the agent could figure out what to do.&lt;/p&gt;

&lt;p&gt;The clearest example: a user asked the agent to find conversations with negative sentiment. We don't have a sentiment filter. We don't have a "sentiment" field anywhere in the product. An agent with only native tools would either refuse or guess at a tool that doesn't exist.&lt;/p&gt;

&lt;p&gt;What our agent did instead was search the documentation, find that we capture negative signals as downvotes and feedback comments, and then call the right native tool with the right filters.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmb1res6z296pqc4h72i3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmb1res6z296pqc4h72i3.png" alt=" " width="784" height="462"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The docs weren't the answer. They were the briefing the agent needed before it could act. Instead the knowledge-base tool was doing planning work.&lt;/p&gt;

&lt;p&gt;We've started thinking of this as a third job the knowledge-base tool does, alongside answering and contextualizing: it teaches the agent what the product can actually do, so the agent can pick the right native tool.&lt;/p&gt;

&lt;h2&gt;
  
  
  So what
&lt;/h2&gt;

&lt;p&gt;If you're building a product agent, the knowledge-base tool is a lot more important than you might think.&lt;/p&gt;

&lt;p&gt;It catches the questions your native tools were never designed for, which will be more of them than you think. It explains what your native tools return when the raw output isn't enough. And it tells the agent which native tool to call when the user's language doesn't match your schema.&lt;/p&gt;

&lt;p&gt;We shipped 30 native tools and one tool that reads documentation. The one that reads documentation is what makes the other 30 useful.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Built by the team at &lt;a href="https://www.kapa.ai/" rel="noopener noreferrer"&gt;kapa.ai&lt;/a&gt; - an AI documentation assistant for technical docs used by teams like Nokia, Grafana and Sentry.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
    </item>
  </channel>
</rss>
