You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/reference/alpha-vector-database.md
+94Lines changed: 94 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,6 +32,100 @@ backwards compatibility and the adopt industry standard naming conventions.
32
32
33
33
**Note**: Milvus and SQLite implement the v2 `retrieve_online_documents_v2` method in the SDK. This will be the longer-term solution so that Data Scientists can easily enable vector similarity search by just flipping a flag.
34
34
35
+
## OpenAI-Compatible Vector Store Search
36
+
37
+
Feast exposes an OpenAI-compatible vector store search endpoint at `POST /v1/vector_stores/{feature_view}/search`. This endpoint accepts plain text queries, handles embedding server-side, and returns results in the [OpenAI Vector Store Search API](https://platform.openai.com/docs/api-reference/vector-stores-search) format.
38
+
39
+
This is useful for AI agents and LLM tool-calling workflows where the client cannot produce raw embedding vectors.
40
+
41
+
### Requirements
42
+
43
+
- An `embedding_model` section in your `feature_store.yaml` (uses [LiteLLM](https://docs.litellm.ai/) for provider support):
44
+
45
+
```yaml
46
+
embedding_model:
47
+
model: text-embedding-3-small
48
+
api_key: ${OPENAI_API_KEY}
49
+
# api_base, api_version, dimensions are optional
50
+
```
51
+
52
+
- A feature view with `vector_index=True` on a vector field, materialized to an online store that supports vector search.
53
+
- For metadata filtering with numeric or boolean comparisons, set `enable_openai_compatible_store: true` on your online store config and run `feast apply` to update the schema.
54
+
55
+
### Usage
56
+
57
+
Start the feature server with `feast serve`, then send a search request:
58
+
59
+
```bash
60
+
curl -X POST http://localhost:6566/v1/vector_stores/my_feature_view/search \
61
+
-H "Content-Type: application/json" \
62
+
-d '{
63
+
"query": "wireless noise-cancelling headphones",
64
+
"max_num_results": 5
65
+
}'
66
+
```
67
+
68
+
### Request fields
69
+
70
+
| Field | Type | Default | Description |
71
+
|-------|------|---------|-------------|
72
+
|`query`|`string` or `list[string]`| (required) | Plain text search query. Lists are joined with spaces before embedding. |
73
+
|`max_num_results`|`int`|`10`| Maximum number of results to return. |
74
+
|`filters`|`object`|`null`| OpenAI-style filters (see below). |
75
+
|`ranking_options`|`object`|`null`| Accepted but not yet applied. |
76
+
|`rewrite_query`|`bool`|`null`| Accepted but not yet applied. |
77
+
|`metadata`|`object`|`null`| Optional. `metadata.features_to_retrieve` selects specific features. |
78
+
79
+
### Filters
80
+
81
+
The endpoint supports OpenAI-style filters for narrowing results beyond vector similarity.
Pagination is not yet implemented; `has_more` is always `false`.
128
+
35
129
## Examples
36
130
37
131
- See the v0 [Rag Demo](https://github.com/feast-dev/feast-workshop/blob/rag/module_4_rag) for an example on how to use vector database using the `retrieve_online_documents` method (planning migration and deprecation (planning migration and deprecation).
Copy file name to clipboardExpand all lines: docs/reference/feature-servers/python-feature-server.md
+61Lines changed: 61 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -457,6 +457,66 @@ Prometheus adds an `instance` label per pod, so there is no
457
457
duplication. Use `sum(rate(...))` or `histogram_quantile(...)` across
458
458
instances as usual.
459
459
460
+
## OpenAI-Compatible Vector Store Search
461
+
462
+
The feature server exposes an OpenAI-compatible vector store search endpoint. This allows clients (including LLM agents and tool-calling frameworks) to search vector data with plain text queries, without computing embeddings client-side.
463
+
464
+
### Endpoint
465
+
466
+
`POST /v1/vector_stores/{vector_store_id}/search`
467
+
468
+
The `vector_store_id` path parameter is the **feature view name**.
469
+
470
+
### Configuration
471
+
472
+
Add an `embedding_model` section to your `feature_store.yaml`:
473
+
474
+
```yaml
475
+
embedding_model:
476
+
model: text-embedding-3-small
477
+
api_key: ${OPENAI_API_KEY}
478
+
```
479
+
480
+
Any [LiteLLM](https://docs.litellm.ai/)-supported provider works (OpenAI, Ollama, Azure, Cohere, etc.). See [Alpha Vector Database](../alpha-vector-database.md#openai-compatible-vector-store-search) for full configuration and filter details.
481
+
482
+
### Example
483
+
484
+
```bash
485
+
curl -X POST http://localhost:6566/v1/vector_stores/product_catalog/search \
486
+
-H "Content-Type: application/json" \
487
+
-d '{
488
+
"query": "wireless noise-cancelling headphones",
489
+
"max_num_results": 5,
490
+
"filters": {
491
+
"type": "eq",
492
+
"key": "category",
493
+
"value": "Electronics"
494
+
}
495
+
}'
496
+
```
497
+
498
+
The response follows the OpenAI `vector_store.search_results.page` format:
For metadata filtering with numeric comparisons, set `enable_openai_compatible_store: true` on your online store config and run `feast apply`.
519
+
460
520
## Starting the feature server in TLS(SSL) mode
461
521
462
522
Enabling TLS mode ensures that data between the Feast client and server is transmitted securely. For an ideal production environment, it is recommended to start the feature server in TLS mode.
@@ -529,6 +589,7 @@ The [PyTorch NLP template](https://github.com/feast-dev/feast/tree/main/sdk/pyth
0 commit comments