# Which ANN method does pinecone support?

**URL:** <https://community.pinecone.io/t/which-ann-method-does-pinecone-support/303>\
**Category:** Support\
**Created:** [March 16, 2022, 12:52pm UTC](https://community.pinecone.io/t/which-ann-method-does-pinecone-support/303 "2022-03-16T12:52:41Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![zhenglaizhang](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/zhenglaizhang/32/115_2.png) [@zhenglaizhang](https://community.pinecone.io/u/zhenglaizhang)\
**Post date:** [March 16, 2022, 12:52pm UTC](https://community.pinecone.io/t/which-ann-method-does-pinecone-support/303/1 "2022-03-16T12:52:42Z")

</div>

Hi Pinecone experts.

I am wondering if we can tweak ANN methods based on our specific scenarios for the pinecone index? I didn’t find any doc about it.

---

<div class="post-metadata">

**Author:** ![sophiem](https://avatars.discourse-cdn.com/v4/letter/s/9de053/32.png) [@sophiem](https://community.pinecone.io/u/sophiem)\
**Post date:** [March 17, 2022, 2:58pm UTC](https://community.pinecone.io/t/which-ann-method-does-pinecone-support/303/2 "2022-03-17T14:58:46Z")

</div>

Hello,  
Thanks for your question. What type of tweaking are you looking for/what are you trying to optimize and for what purpose? Just trying to get a better sense of your use case!

---

<div class="post-metadata">

**Author:** ![zhenglaizhang](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/zhenglaizhang/32/115_2.png) [@zhenglaizhang](https://community.pinecone.io/u/zhenglaizhang)\
**Post date:** [March 18, 2022, 2:54am UTC](https://community.pinecone.io/t/which-ann-method-does-pinecone-support/303/3 "2022-03-18T02:54:35Z")

</div>

Thanks for following up.  
Currently, I don’t have the specific context in mind, just curious that there are lots of ANN algorithms and different ones have trade-off between memory, building speed, query latency, and accuracy. And I am curious if there are opportunities that we can fine-tune it for different cases.  
And I am also curious that with the same data and config, is the similarity search result exactly the same between p1 pod and s1 pod?

---

<div class="post-metadata">

**Author:** ![dave](https://avatars.discourse-cdn.com/v4/letter/d/ee7513/32.png) [@dave](https://community.pinecone.io/u/dave)\
**Post date:** [March 21, 2022, 2:17pm UTC](https://community.pinecone.io/t/which-ann-method-does-pinecone-support/303/4 "2022-03-21T14:17:08Z")

</div>

Hi. It’s a good question. We currently don’t allow customers to tweak the core algorithms or indexes. We do expose the kbits parameter (kbits=512 is the default, kbits=1024 consumes more memory, but provides very very high recall). We plan to expose more tunability in the future. If you have specific requests that you feel are unmet by Pinecone we’d love to hear about them. Also - regarding p1 and s1: yes, so long as you use the same kbits value (512 or 1024) you should expect the same recall.

---

<div class="post-metadata">

**Author:** ![zhenglaizhang](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/zhenglaizhang/32/115_2.png) [@zhenglaizhang](https://community.pinecone.io/u/zhenglaizhang)\
**Post date:** [March 22, 2022, 2:35am UTC](https://community.pinecone.io/t/which-ann-method-does-pinecone-support/303/5 "2022-03-22T02:35:20Z")

</div>

thanks @dave for the detailed explanation! I checked the doc again, you are referring to the index config.

```auto
"index_config": {
  "k_bits": 512,
  "hybrid": false
}

```

But I cannot find any more configuration about the `k_bits` and `hybrid`. So here are my follow up questions.

1. kbits = 1024, you mentioned provides `very very high recall` do you mean higher `recall rate`? What about the latency change here?
2. What’s the meaning of `hybrid` here?

---

<div class="post-metadata">

**Author:** ![dave](https://avatars.discourse-cdn.com/v4/letter/d/ee7513/32.png) [@dave](https://community.pinecone.io/u/dave)\
**Post date:** [March 22, 2022, 2:59am UTC](https://community.pinecone.io/t/which-ann-method-does-pinecone-support/303/6 "2022-03-22T02:59:20Z")

</div>

Yes! You can store more vectors per pod with `k_bits: 512` (default) than `k_bits: 1024`. I don’t believe there is a substantial difference in latency. The primary tradeoff is memory for recall. But the recall with k\_bits: 512 is already quite high. We are exploring how we might offer even an even greater recall tradeoff.

`hybid` here refers to the index type. `hybrid: true` means that the index is entirely stored in RAM (lower latency). Note this is only available on p1 pods. `hybrid: false` means that the index is partly in RAM and partly on SSD (store more vectors per pod). Note this is only available on s1 pods. Since today s1 or p1 dictate the necessary value for `hybrid`, it’s actually updated for you and you don’t need to set it. In the future, we may release different pod types and other such tuning parameters.

```auto

```

---

<div class="post-metadata">

**Author:** ![dave](https://avatars.discourse-cdn.com/v4/letter/d/ee7513/32.png) [@dave](https://community.pinecone.io/u/dave)\
**Post date:** [March 22, 2022, 3:01am UTC](https://community.pinecone.io/t/which-ann-method-does-pinecone-support/303/7 "2022-03-22T03:01:07Z")

</div>

If you had to make more of a trade-off in one direction (memory, latency, recall), what would it be?

---

<div class="post-metadata">

**Author:** ![zhenglaizhang](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/zhenglaizhang/32/115_2.png) [@zhenglaizhang](https://community.pinecone.io/u/zhenglaizhang)\
**Post date:** [March 22, 2022, 6:36am UTC](https://community.pinecone.io/t/which-ann-method-does-pinecone-support/303/8 "2022-03-22T06:36:37Z")

</div>

@dave thanks for the quick response!

It depends on our scenario, one important case is for online recaller - we need to maintain high throughput (~6k/s) and low latency (e.g. p95 \< 20ms) for our typical scale 10w x 30D scale.  
And also we want to achieve low latency for fetching by id. What’s the typical fetching latency?

---

<div class="post-metadata">

**Author:** ![greg](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/greg/32/54_2.png) [@greg](https://community.pinecone.io/u/greg)\
**Post date:** [March 22, 2022, 3:11pm UTC](https://community.pinecone.io/t/which-ann-method-does-pinecone-support/303/9 "2022-03-22T15:11:03Z")

</div>

@zhenglaizhang Typical [fetching](https://www.pinecone.io/docs/manage-data/#fetching-vectors) latency is under 5ms.

---

<div class="post-metadata">

**Author:** ![dave](https://avatars.discourse-cdn.com/v4/letter/d/ee7513/32.png) [@dave](https://community.pinecone.io/u/dave)\
**Post date:** [April 15, 2022, 8:13pm UTC](https://community.pinecone.io/t/which-ann-method-does-pinecone-support/303/10 "2022-04-15T20:13:59Z")

</div>

@zhenglaizhang Fetching latencies can be 10s of ms. Depends on details like metadata use and the number of dimensions.
