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
@@ -179,6 +184,46 @@ For instance, the following [Filter (google_search_tool.py)](../filters/google_s
179
184
180
185
When enabled, sources and google queries used by Gemini will be displayed with the response.
181
186
187
+
## Grounding with Vertex AI Search
188
+
189
+
Improve the accuracy and recency of Gemini responses by grounding them with your own data in Vertex AI Search.
190
+
191
+
### Configuration
192
+
193
+
To enable Vertex AI Search grounding, you need to:
194
+
195
+
1.**Set up a Vertex AI Search Data Store**: Follow the [Google Cloud documentation](https://cloud.google.com/vertex-ai/docs/search/overview) to create a Data Store in Discovery Engine and ingest your documents.
196
+
2.**Provide the RAG Store Path**: The path should be in the format `projects/PROJECT/locations/LOCATION/ragCorpora/DATA_STORE_ID` or `projects/PROJECT/locations/global/collections/default_collection/dataStores/DATA_STORE_ID`.
197
+
- Set the `VERTEX_AI_RAG_STORE` environment variable, or
198
+
- Use the [Filter (vertex_ai_search_tool.py)](../filters/vertex_ai_search_tool.py) to enable the feature and optionally pass the store ID via chat metadata.
199
+
3.**Enable Vertex AI**: Set `GOOGLE_GENAI_USE_VERTEXAI=true` to use Vertex AI (required for Vertex AI Search grounding).
200
+
201
+
When `USE_VERTEX_AI` is `true` and `VERTEX_AI_RAG_STORE` is configured, Vertex AI Search grounding will be automatically enabled. You can also explicitly enable it via the `vertex_ai_search` feature flag.
202
+
203
+
When enabled, Gemini will use the specified Vertex AI Search Data Store to retrieve relevant information and ground its responses, providing citations to the source documents.
204
+
205
+
### Example Filter Usage
206
+
207
+
The [vertex_ai_search_tool.py](../filters/vertex_ai_search_tool.py) filter enables Vertex AI Search grounding when the `vertex_ai_search` feature is requested:
208
+
209
+
```python
210
+
# filters/vertex_ai_search_tool.py
211
+
# ... (filter code) ...
212
+
```
213
+
214
+
To use this filter, ensure it's enabled in your Open WebUI configuration. Then, in your chat settings or via metadata, you can enable the `vertex_ai_search` feature:
description="The Google Cloud region to use with Vertex AI.",
179
180
)
181
+
VERTEX_AI_RAG_STORE: str|None=Field(
182
+
default=os.getenv("VERTEX_AI_RAG_STORE"),
183
+
description="Vertex AI RAG Store path for grounding (e.g., projects/PROJECT/locations/LOCATION/ragCorpora/DATA_STORE_ID). Only used when USE_VERTEX_AI is true.",
0 commit comments