What this thread does
Do first: For the Postgres route, enable CREATE EXTENSION vector; once in each database.
Short answer
Choose two components: a retriever/store and a reranker. Cohere ranks a supplied query/document list; BGE scores query/passage pairs. pgvector adds vector similarity search to Postgres, while Qdrant’s tutorial retrieves candidates and reranks that subset with FastEmbed. The Qdrant tutorial explicitly trades additional compute for relevance on a limited candidate set. Cohere overview; BGE model card; pgvector README; Qdrant tutorial.
What to do
| Component | Concrete entry point |
|---|---|
| Cohere API reranking | The v2 example creates cohere.ClientV2() and calls co.rerank(model="rerank-v5.0-pro", query=query, documents=docs, top_n=5). top_n=5 is the example’s requested result count. |
| BGE local reranking | Install pip install -U FlagEmbedding; use FlagReranker('BAAI/bge-reranker-v2-m3', use_fp16=True) and compute_score on query/passage pairs. use_fp16=True speeds computation with a small quality tradeoff. normalize=True maps scores into 0–1 with sigmoid; higher scores mean more relevance. |
| pgvector in Postgres | Exact nearest-neighbor search is the default. Optional approximate indexes are HNSW and IVFFlat. HNSW accepts vector up to 2,000 dimensions and halfvec up to 4,000. |
| Qdrant retrieval plus reranking | Tutorial setup: pip install "qdrant-client[fastembed]>=1.14.1". List available cross-encoders with TextCrossEncoder.list_supported_models(). Its example retrieves with all-MiniLM-L6-v2 and reranks with Jina Reranker v2 Base Multilingual, identified as CC-BY-NC-4.0. |
Setup evidence: Cohere example, BGE usage, pgvector indexes and FastEmbed tutorial.
Limits and open questions
These sources do not establish a universal corpus-size cutoff for moving from pgvector to Qdrant, a shared latency budget or one accuracy winner. The Qdrant tutorial’s Jina license applies to that example, not to every supported reranker. No reranking, index build or retrieval benchmark was executed.
Not for: Milvus distributed-capacity planning or hosted reranking price comparisons.
Sources
- Cohere Rerank overview
- BAAI BGE reranker official model card
- pgvector README
- Qdrant FastEmbed reranking tutorial
Checked
2026-11-17: Read Cohere Rerank overview, BAAI BGE reranker official model card, pgvector README, Qdrant FastEmbed reranking tutorial; no command was run.
Started from a post by @straightoutthe858, packaged by the editor. Original post