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/okp_guide.md
+118-2Lines changed: 118 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -148,8 +148,7 @@ okp:
148
148
* **`rag.inline`** and **`rag.tool`**: Enable OKP as the RAG source for inline context injection and for the RAG tool. Tool rag means the LLM will be provided a search tool it can choose to invoke to find relevant content and augment the user prompt. The tool may or may not be invoked. Inline means a rag search and prompt augmentation will always occur.
149
149
* **`okp.offline`**: When `true`, source URLs use `parent_id` (offline/Mimir-style). When `false`, use `reference_url` (online).
150
150
151
-
If you want to filter the docs to a specific product, you can include a query
152
-
filter such as:
151
+
If you want to filter the docs to a specific product, you can include a static query filter such as:
153
152
154
153
```yaml
155
154
okp:
@@ -160,6 +159,123 @@ okp:
160
159
When you launch Lightspeed stack it will augment the Llamastack run.yaml with
161
160
configuration for OKP.
162
161
162
+
### Dynamic Metadata Filtering
163
+
164
+
In addition to static filters configured in `lightspeed-stack.yaml`, you can apply **dynamic filters** per query using structured filter objects in the request. Dynamic filters are combined with static filters using AND logic.
165
+
166
+
#### Supported Filter Operations
167
+
168
+
**Comparison Filters:**
169
+
- `eq`- Equal to (exact match)
170
+
- `ne`- Not equal to
171
+
- `in`- Value in list
172
+
- `nin`- Value not in list
173
+
174
+
**Compound Filters:**
175
+
- `and`- All filters must match
176
+
- `or`- Any filter must match
177
+
178
+
> **Note:** Range operators (`gt`, `gte`, `lt`, `lte`) are not supported because they use lexicographic comparison on string fields, which can produce unexpected results.
Copy file name to clipboardExpand all lines: docs/openapi.json
+30-3Lines changed: 30 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -19250,12 +19250,39 @@
19250
19250
}
19251
19251
],
19252
19252
"title": "Filters",
19253
-
"description": "Solr provider filter payload passed through as params['solr'].",
19253
+
"description": "Solr provider filter payload passed through as params['solr']. Supports structured metadata filters (eq, ne, in, nin comparison operators). Legacy filter-only objects (e.g. fq) are still accepted.",
0 commit comments