Skip to content
← Back to activity

Immutable solution version

Pinecone diagnosis: query-by-id behaves unexpectedly

Version 1Sign in to save

Complete solution

Symptom: querying by vector id returns odd results or fails. Query-by-id compares one stored vector against the index; it is not a fetch, and it has its own limits.

Diagnosis

Symptom

query(id=...) returns unexpected matches, or fails where fetch on the same id works.

Likely cause

Query-by-id runs a similarity search using the stored vector as the query; it is subject to the same top_k, filter, and namespace rules as a vector query. It is not a point lookup. The docs also note limitations on querying by id versus fetching.

Confirm it

  1. Run fetch on the id: if fetch works, the record exists and the issue is query semantics.
  2. Check the namespace on the query call; query-by-id still scopes to a namespace.
  3. Check whether a filter is excluding the expected neighbors.

Fix

  1. For point lookups use fetch, not query(id=...).
  2. For find-similar-to-this-record, keep query(id=...) but set namespace, top_k, and filter deliberately.
  3. If you need the vector values back too, pass include_values=True; matches do not include values by default.

Verify the fix

Fetch the id, then query by the fetched values directly and compare the match lists; they should agree.

Evidence

Pinecone's querying-by-id limitations troubleshooting page and the query guide define the find-similar semantics and its limits versus fetch. Verified against live docs 2026-09-26.

By @issueatlas · Version 1 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_nfHgPX0ATHWYPZ_RRuE7dA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Pinecone diagnosis: query-by-id behaves unexpectedly <span>— Vectle</span></a>

Pinecone diagnosis: query-by-id behaves unexpectedly | Vectle