Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@
* [Aerospike](reference/online-stores/aerospike.md)
* [Elasticsearch](reference/online-stores/elasticsearch.md)
* [Qdrant](reference/online-stores/qdrant.md)
* [Pinecone](reference/online-stores/pinecone.md)
* [Faiss](reference/online-stores/faiss.md)
* [Hybrid](reference/online-stores/hybrid.md)
* [Registries](reference/registries/README.md)
Expand Down
9 changes: 8 additions & 1 deletion docs/reference/alpha-vector-database.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Below are supported vector databases and implemented features:
| SQLite | [x] | [ ] | [x] | [x] |
| Qdrant | [x] | [x] | [] | [] |
| ScyllaDB | [x] | [x] | [x] | [x] |
| Pinecone | [x] | [x] | [x] | [x] |

*Note: V2 Support means the SDK supports retrieval of features along with vector embeddings from vector similarity search.

Expand Down Expand Up @@ -190,7 +191,7 @@ print('\n'.join([c.message.content for c in response.choices]))

### Configuration and Installation

We offer [Milvus](https://milvus.io/), [PGVector](https://github.com/pgvector/pgvector), [SQLite](https://github.com/asg017/sqlite-vec), [Elasticsearch](https://www.elastic.co) and [Qdrant](https://qdrant.tech/) as Online Store options for Vector Databases.
We offer [Milvus](https://milvus.io/), [PGVector](https://github.com/pgvector/pgvector), [SQLite](https://github.com/asg017/sqlite-vec), [Elasticsearch](https://www.elastic.co), [Qdrant](https://qdrant.tech/) and [Pinecone](https://www.pinecone.io/) as Online Store options for Vector Databases.

Milvus offers a convenient local implementation for vector similarity search. To use Milvus, you can install the Feast package with the Milvus extra.

Expand All @@ -210,6 +211,12 @@ pip install feast[elasticsearch]
```bash
pip install feast[qdrant]
```
#### Installation with Pinecone

```bash
pip install feast[pinecone]
```

#### Installation with SQLite

If you are using `pyenv` to manage your Python versions, you can install the SQLite extension with the following command:
Expand Down
4 changes: 4 additions & 0 deletions docs/reference/online-stores/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ Please see [Online Store](../../getting-started/components/online-store.md) for
[milvus.md](milvus.md)
{% endcontent-ref %}

{% content-ref url="pinecone.md" %}
[pinecone.md](pinecone.md)
{% endcontent-ref %}

{% content-ref url="faiss.md" %}
[faiss.md](faiss.md)
{% endcontent-ref %}
Expand Down
109 changes: 109 additions & 0 deletions docs/reference/online-stores/pinecone.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# Pinecone online store

## Description

The [Pinecone](https://www.pinecone.io/) online store provides support for materializing feature values into a Pinecone vector database. It is particularly suited for AI workloads that require both low-latency feature serving and vector similarity search for RAG (Retrieval-Augmented Generation) applications.

## Getting started

In order to use this online store, you'll need to install the Pinecone extra (along with the dependency needed for the offline store of choice). E.g.

`pip install 'feast[pinecone]'`

You will also need a Pinecone account and API key. Set your API key via the `PINECONE_API_KEY` environment variable or directly in `feature_store.yaml`.

## Examples

{% code title="feature_store.yaml" %}
```yaml
project: my_feature_repo
registry: data/registry.db
provider: local
online_store:
type: pinecone
api_key: ${PINECONE_API_KEY}
index_name: feast-online
embedding_dim: 384
metric: cosine
cloud: aws
region: us-east-1
vector_enabled: true
```
{% endcode %}

### Using a custom namespace

By default, Feast maps each feature view to a Pinecone namespace (`{project}_{feature_view_name}`). You can override this with a fixed namespace:

{% code title="feature_store.yaml" %}
```yaml
online_store:
type: pinecone
api_key: ${PINECONE_API_KEY}
index_name: feast-online
namespace: my-custom-namespace
embedding_dim: 384
```
{% endcode %}

### Vector similarity search

Pinecone supports the `retrieve_online_documents_v2` API for vector similarity search:

```python
from feast import FeatureStore

store = FeatureStore(repo_path=".")

results = store.retrieve_online_documents_v2(
features=[
"city_embeddings:vector",
"city_embeddings:sentence_chunks",
],
query=query_embedding,
top_k=5,
distance_metric="cosine",
).to_df()
```

The full set of configuration options is available in [PineconeOnlineStoreConfig](https://rtd.feast.dev/en/latest/#feast.infra.online_stores.pinecone_online_store.pinecone.PineconeOnlineStoreConfig).

## Configuration options

| Option | Type | Default | Description |
|:---|:---|:---|:---|
| `type` | string | `"pinecone"` | Must be `pinecone` |
| `api_key` | string | `None` | Pinecone API key (falls back to `PINECONE_API_KEY` env var) |
| `index_name` | string | `"feast-online"` | Name of the Pinecone index |
| `namespace` | string | `None` | Override namespace (default: `{project}_{fv_name}`) |
| `embedding_dim` | int | `128` | Vector dimension |
| `metric` | string | `"cosine"` | Distance metric: `cosine`, `euclidean`, or `dotproduct` |
| `cloud` | string | `"aws"` | Cloud provider for serverless indexes |
| `region` | string | `"us-east-1"` | Cloud region for serverless indexes |
| `vector_enabled` | bool | `true` | Enable vector similarity search |
| `batch_size` | int | `100` | Number of vectors per upsert batch |

## Functionality Matrix

The set of functionality supported by online stores is described in detail [here](overview.md#functionality).
Below is a matrix indicating which functionality is supported by the Pinecone online store.

| | Pinecone |
|:----------------------------------------------------------|:---------|
| write feature values to the online store | yes |
| read feature values from the online store | yes |
| update infrastructure (e.g. tables) in the online store | yes |
| teardown infrastructure (e.g. tables) in the online store | yes |
| generate a plan of infrastructure changes | no |
| support for on-demand transforms | yes |
| readable by Python SDK | yes |
| readable by Java | no |
| readable by Go | no |
| support for entityless feature views | yes |
| support for concurrent writing to the same key | yes |
| support for ttl (time to live) at retrieval | no |
| support for deleting expired data | no |
| collocated by feature view | no |
| collocated by feature service | no |
| collocated by entity key | no |
| vector similarity search | yes |
7 changes: 4 additions & 3 deletions pixi.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ postgres = ["psycopg[binary,pool]>=3.2.5"]
# https://www.psycopg.org/psycopg3/docs/basic/install.html#local-installation
postgres-c = ["psycopg[c,pool]>=3.2.5"]
pytorch = ["torch>=2.7.0", "torchvision>=0.22.1"]
pinecone = ["pinecone>=5.0"]
qdrant = ["qdrant-client>=1.12.0"]
rag = [
"transformers>=4.36.0",
Expand Down Expand Up @@ -164,7 +165,7 @@ test = [
]

ci = [
"feast[test, aws, azure, cassandra, clickhouse, couchbase, delta, docling, duckdb, elasticsearch, faiss, gcp, ge, go, grpcio, hazelcast, hbase, ibis, iceberg, image, k8s, mcp, milvus, mlflow, mongodb, mssql, mysql, openlineage, opentelemetry, oracle, scylladb, spark, trino, postgres, pytorch, qdrant, rag, ray, redis, singlestore, snowflake, sqlite_vec]",
"feast[test, aws, azure, cassandra, clickhouse, couchbase, delta, docling, duckdb, elasticsearch, faiss, gcp, ge, go, grpcio, hazelcast, hbase, ibis, iceberg, image, k8s, mcp, milvus, mlflow, mongodb, mssql, mysql, openlineage, opentelemetry, oracle, pinecone, scylladb, spark, trino, postgres, pytorch, qdrant, rag, ray, redis, singlestore, snowflake, sqlite_vec]",
"build",
"virtualenv==20.23.0",
"dbt-artifacts-parser",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from feast.infra.online_stores.pinecone_online_store.pinecone import (
PineconeOnlineStore,
PineconeOnlineStoreConfig,
)

__all__ = ["PineconeOnlineStore", "PineconeOnlineStoreConfig"]
Loading
Loading