# Retrieve passages from a document corpus to ground an answer

> Retrieve passages from a document corpus to ground an answer: 9 companies fully do it, 5 with a limit, 18 carry the tag. Every listing in Retrieval & vector search with the reason and a source.

- Canonical: https://www.anchorterminal.com/niches/vector-search.rag-over-docs/
- Markdown: https://www.anchorterminal.com/niches/vector-search.rag-over-docs/index.md (~1,500 tokens)
- Slim: https://www.anchorterminal.com/niches/vector-search.rag-over-docs/index.min.md (~330 tokens, same facts, less prose, for token-sensitive contexts)
- JSON: https://www.anchorterminal.com/niches/vector-search.rag-over-docs/index.json (this page as data, same URL with Accept: application/json)
- Site index for agents: https://www.anchorterminal.com/llms.txt (the key docs and every listing in one file, at most 16 MB, about 4 million tokens: https://www.anchorterminal.com/llms-full.txt)
- API: https://www.anchorterminal.com/api/v1/index.json
- MCP: https://www.anchorterminal.com/mcp (the whole catalogue as tools, no key)
- DNS: dig +short TXT <slug>.grade.anchorterminal.com (the grade as a DNS TXT record, for a sandbox with no HTTP where names still resolve; also top., best.<category>. and <a>.vs.<b>. under the zone, and the same under grade.letme.dev)
- Licence: CC BY 4.0, credit Anchor Terminal and link this page (https://www.anchorterminal.com/terms/#data)
- Updated: 2026-11-15

Four or more companies' docs show a full fit.

| Companies, full fit | With a limit | Carry the tag | Share of the category's work | First-hand accounts |
| --- | --- | --- | --- | --- |
| 9 | 5 | 18 | 24 | 12 |

## What counts as done

The top results include passages that answer the question, each with its document id, chunk text and score, no vectors in the payload, from a query sent as text in one call.

Measured, for our own tests: on a fixed question set the answer passage is in the top 10 for at least 80 per cent of questions, at a p95 under 300 ms.

How agents ask for it: answer from our docs; find the section of the manual about X; search the knowledge base for the refund policy; which document says this

## Does the job

The docs show it meets the test above, and nothing we read says otherwise.

- **Cloudflare AI Search (Cloudflare, Inc.)**: The search endpoint takes a text query and returns chunks with id, text, score and source item key, with no vectors; embedding and chunking are managed by the instance.
- **Elasticsearch (Elasticsearch B.V.)**: A semantic_text field embeds documents through an inference endpoint, and kNN's query_vector_builder (or a semantic query) embeds the question at search time, so the agent sends text and gets ranked documents with scores.
- **Epsilla Vector Database (Epsilla, Inc.)**: A table index with a built-in model such as BAAI/bge-small-en-v1.5 embeds documents, and db.query takes query_text with limit, response_fields and with_distance.
- **Meilisearch (Meili SAS)**: A configured embedder embeds documents and the text query itself, and hybrid with semanticRatio 1 gives pure semantic search over documents in one search call.
- **OpenSearch (OpenSearch Software Foundation, a project of The Linux Foundation)**: Semantic search with an ingest pipeline and a deployed model embeds documents and the text query in the cluster, so the agent sends text in one search; accounts use it for RAG and hybrid retrieval over document sets.
- **Pinecone API + MCP (Pinecone Systems Inc.)**: A text field declared with embed lets one search send the query as text; Pinecone embeds it with the index's model and returns ranked documents with scores.
- **Upstash Vector API + MCP (Upstash, Inc.)**: query-data takes the question as text, embeds it with the index's model, and returns topK results with scores, data and metadata on request; includeVectors defaults to false.
- **Vespa (Vespa.ai AS)**: An embedder component in the application embeds the question at query time with input.query(...)=embed(@text), and results return document summary fields with relevance scores; the schema and embedder must be deployed first.
- **Weaviate API + MCP (Weaviate B.V.)**: A collection vectorizer embeds the text query server-side, results return chosen properties with scores and a limit, and the built-in MCP server's weaviate-query-hybrid takes a text query.

## Does the job, with a limit

It 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.

- **Chroma API + MCP (Chroma Inc.)**: Text queries are embedded with the collection's persisted embedding function and results carry ids, documents and distances, but embedding runs in the client, and #26 shows a 384-dimension query hitting a 1024-dimension collection through chroma-mcp.
- **LanceDB (LanceDB Systems, Inc.)**: Vector search ranks by distance with limit and offset, and select() can drop the vector column, but the pages read show queries by embedding, not text embedded by the table's own model, and there is no endpoint or MCP tool, only library calls.
- **Milvus and Zilliz Cloud API + MCP (Zilliz Inc.)**: The Function module embeds raw text at insert and query time and output_fields returns chunk text with scores, but #22 shows an MCP agent unable to vector search because milvus_vector_search needs a query vector; milvus_text_similarity_search now exists.
- **Qdrant API + MCP (Qdrant Solutions GmbH)**: The Query API returns payload text and scores with with_vectors off, but text queries need Cloud Inference (managed only) or the MCP server's FastEmbed; self-hosted REST takes vectors. #47 shows qdrant-find failing on a self-hosted instance.
- **Typesense API + MCP (Typesense, Inc.)**: An auto-embedding field embeds documents and the text query inside Typesense, but #3004 reports the built-in model cutting every input to 128 tokens without notice.

## What stops agents finishing

- query embedded with a different model or dimension than the index
- vector tool needs a query vector the agent cannot make
- per-query result cap below what grouping needs

## Around it

Before: document-extraction.chunk, embeddings.embed-text. After: search.ground-fact, llm.answer-with-citations.

## Where this comes from

Weight 24 of 100 in Retrieval & vector search: 12 of 37 accounts; the job behind most threads read (10M-document RAG, Drupal AI Search, AutoRAG, Chroma and Milvus MCP use)

As data: https://www.anchorterminal.com/api/v1/use-cases/vector-search.rag-over-docs.json, or the MCP tool get_use_case with id vector-search.rag-over-docs. Draft, read 2026-11-15 from public docs and first-hand accounts, not yet reviewed by a person.

---

Query this catalogue directly over MCP: https://www.anchorterminal.com/mcp (Streamable HTTP, no key). How: https://www.anchorterminal.com/agents/#mcp
