{
  "data": null,
  "kind": "anchor.page",
  "links": {
    "api": "https://www.anchorterminal.com/api/v1/index.json",
    "html": "https://www.anchorterminal.com/niches/embeddings.code-search/",
    "json": "https://www.anchorterminal.com/niches/embeddings.code-search/index.json",
    "llms": "https://www.anchorterminal.com/llms.txt",
    "markdown": "https://www.anchorterminal.com/niches/embeddings.code-search/index.md",
    "mcp": "https://www.anchorterminal.com/mcp",
    "slim": "https://www.anchorterminal.com/niches/embeddings.code-search/index.min.md"
  },
  "markdown": "Two or three companies' docs show a full fit.\n\n| Companies, full fit | With a limit | Carry the tag | Share of the category's work | First-hand accounts |\n| --- | --- | --- | --- | --- |\n| 2 | 10 | 35 | 5 | 5 |\n\n## What counts as done\n\nA code-capable model (a code model id, or code retrieval results published) embeds code and natural-language queries into one space, handles code tokens without errors or NaN, and either runs locally or states retention for uploaded code.\n\nMeasured, for our own tests: recall@10 on a labelled code query set compared with a grep baseline, and time to re-embed one changed file.\n\nHow agents ask for it: semantic search over this repo; find where we handle refunds; index the monorepo for the agent; which function does this\n\n## Does the job\n\nThe docs show it meets the test above, and nothing we read says otherwise.\n\n- **EmbeddingGemma 2 (Google LLC (RDAP registrant of gemma.ai; the card names Google DeepMind as author))**: A CodeRetrieval prompt for natural-language queries against code, an MTEB(Code, v1) score of 78.68 on the card, and it runs locally. NaN only in float16, which the card rules out.\n- **EmbeddingGemma 300M (Google LLC (RDAP registrant of gemma.ai; the card names Google DeepMind as author))**: A Code Retrieval prompt for natural-language queries against code blocks, MTEB(Code, v1) 68.76 published on the card, and a local route. Code recall against grep unmeasured.\n- **Granite Embedding Small English R2 (International Business Machines Corporation)**: Code retrieval results are published (CoIR 53.8 over 10 tasks), it runs locally, and no report of code-token failures was found in the publisher repository's 7 issues. Recall against grep unmeasured.\n\n## Does the job, with a limit\n\nIt does the job, but something in the docs or a user's account will get in an agent's way. The limit is named in each row.\n\n- **Gemini Embedding (Google LLC)**: A task: code retrieval prefix embeds natural-language queries against code, and retention is stated, but free-tier inputs are used to improve Google products and may be read by human reviewers; only the paid tier excludes it.\n- **Jina Embeddings and Reranker (Jina AI GmbH)**: Code embedding models take nl2code.query and nl2code.passage tasks, but retention of uploaded code wasn't stated on any page read here.\n- **Mistral Embed and Codestral Embed (Mistral AI (RCS Paris 952 418 325))**: codestral-embed is a code model for retrieval over code, but it is hosted and retention of uploaded code wasn't confirmed on the pages read; the free tier may train on inputs per the last assessment.\n- **Nomic Embed (Nomic, Inc.)**: No code model or code results on the Atlas pages, though an account found Ollama with Nomic fast enough to index a codebase for the Roo agent.\n- **OpenAI embeddings (OpenAI OpCo, LLC)**: No code model or code retrieval results; the guide shows code search over Python functions with text-embedding-3-small, and retention for uploaded code wasn't on the pages read.\n- **Qwen3-Embedding-0.6B (Alibaba Cloud (the registrant of qwen.ai per RDAP, carried from the Qwen3.8-27B check))**: The card claims code retrieval and support for programming languages, but publishes no code retrieval results; it runs locally, so no code leaves the machine.\n- **Qwen3-Embedding-4B (Alibaba Cloud (named in the copyright line of the 8B sibling's Apache 2.0 licence; this repository has no LICENSE file))**: The card claims code retrieval and support for programming languages, but publishes no code retrieval results; it runs locally, so no code leaves the machine.\n- **Qwen3-Embedding-8B (Alibaba Cloud (named in the licence's copyright line))**: Code retrieval is claimed without published code results, and an account found any text containing \"import\" returned an all-NaN vector in float16, a named blocker.\n- **Voyage AI embeddings and rerankers (Voyage AI Innovations, Inc.)**: voyage-code-4 is a code retrieval model and retention is stated, but inputs train models by default with a one-way opt-out, and an account benchmarking coding agents went back to ripgrep.\n- **ZeroEntropy zerank and zembed (ZeroEntropy, Inc.)**: The zembed-1 card publishes a code retrieval score (0.6452) and runs locally, but needs trust_remote_code.\n\n- not this job: Amazon Nova Multimodal Embeddings (Amazon Web Services, Inc.): No code model or code retrieval results in the guide, schema or model card, and it doesn't run locally.\n- not this job: Cohere Embed and Rerank (Cohere Inc.): No code model and no code retrieval results on the models page, and no local route.\n- not this job: jina-embeddings-v5-omni-small (Jina AI GmbH, a subsidiary of Elastic N.V. (per the jina-embeddings listing's 2 October 2026 check)): No code task, code model id or code retrieval results on the card.\n- not this job: NVIDIA NeMo Retriever Embedding and Reranking NIMs (NVIDIA Corporation): None of the eight models in the support matrix is a code model, and no code retrieval results were found on the pages read.\n- not this job: Qwen3-VL-Embedding-2B (Alibaba Cloud (RDAP names Alibaba Cloud (Singapore) Private Limited as the registrant of qwen.ai)): No code retrieval claim, code model id or code results on the card.\n- not this job: Qwen3-VL-Embedding-8B (Alibaba Group (Tongyi Lab, named in the copyright line of the GitHub repository's Apache 2.0 licence)): No code retrieval claim, code model id or code results on the card.\n\n## What stops agents finishing\n\n- float16 NaN on common code tokens such as \"import\" (Qwen3-Embedding-8B)\n- indexing too slow for a working repo\n- the agent does as well with grep, so the index is not worth its cost\n\n## Around it\n\nBefore: code.read-repo. After: vector-search.agent-query-tool.\n\n## Where this comes from\n\nWeight 5 of 100 in Embeddings \u0026 rerankers: 5 of 62 accounts (91 account-use-case tags, accounts counted in each use case they fit, scaled to 100 and rounded by hand); Roo, ChunkHound and benchmark accounts; two accounts say grep or BM25 beat embeddings for code\n\nAs data: https://www.anchorterminal.com/api/v1/use-cases/embeddings.code-search.json, or the MCP tool get_use_case with id embeddings.code-search. Draft, read 2026-11-15 from public docs and first-hand accounts, not yet reviewed by a person.\n",
  "meta": {
    "attribution": "Anchor Terminal (https://www.anchorterminal.com)",
    "attributionRequired": true,
    "credit": "CC BY 4.0, credit Anchor Terminal and link the page or API address you took it from (https://www.anchorterminal.com/terms/#data)",
    "docs": "https://www.anchorterminal.com/docs/",
    "generatedAt": "2026-11-16",
    "license": "CC-BY-4.0",
    "method": "https://www.anchorterminal.com/benchmark/",
    "methodology": "0.8",
    "openapi": "https://www.anchorterminal.com/openapi.json",
    "preview": false,
    "run": "2026-10-01",
    "runLabel": "October 2026 research run",
    "terms": "https://www.anchorterminal.com/terms/#data"
  },
  "page": {
    "breadcrumbs": [
      {
        "name": "Home",
        "url": "https://www.anchorterminal.com/"
      },
      {
        "name": "For agents",
        "url": "https://www.anchorterminal.com/agents/"
      },
      {
        "name": "Niches",
        "url": "https://www.anchorterminal.com/niches/"
      },
      {
        "name": "Index a codebase for a coding agent",
        "url": ""
      }
    ],
    "description": "Index a codebase for a coding agent: 2 companies fully do it, 10 with a limit, 35 carry the tag. Every listing in Embeddings \u0026 rerankers with the reason and a source.",
    "facts": null,
    "h1": "Index a codebase for a coding agent",
    "image": "https://www.anchorterminal.com/assets/og/default.png",
    "path": "/niches/embeddings.code-search/",
    "published": "",
    "section": "agents",
    "title": "Index a codebase for a coding agent: who does it | Anchor Terminal",
    "toc": null,
    "updated": "2026-11-15",
    "url": "https://www.anchorterminal.com/niches/embeddings.code-search/"
  },
  "tokens": {
    "markdown": 1750,
    "slim": 480
  },
  "version": 1
}
