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/byok_guide.md
+17-4Lines changed: 17 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -79,6 +79,7 @@ Both modes rely on:
79
79
80
80
Inline RAG additionally supports:
81
81
-**Score Multiplier**: Optional weight applied per BYOK vector store when mixing multiple sources. Allows custom prioritization of content.
82
+
-**Relevance cutoff score** (`relevance_cutoff_score` in `byok_rag`): Minimum raw similarity score for a chunk to be returned from that BYOK vector store. Chunks below the threshold are dropped before results are merged and ranked with other sources. Configure per knowledge source (each `byok_rag` entry has its own value). The default when omitted is `0.3` (see `DEFAULT_BYOK_RAG_RELEVANCE_CUTOFF_SCORE` in `src/constants.py`). This value is passed to Llama Stack as the vector search `score_threshold` for that store.
82
83
83
84
> [!NOTE]
84
85
> OKP and BYOK scores are not directly comparable (different scoring systems), so
score_multiplier: 1.2 # Boost results from this store
247
+
relevance_cutoff_score: 0.3 # Optional: min raw similarity per chunk for this store (Inline RAG only; default 0.3)
239
248
```
240
249
250
+
`relevance_cutoff_score`is interpreted in the same score space as the vector backend for that
251
+
store. It is not comparable across different vector stores or OKP; tune each `byok_rag` entry
252
+
using retrieval quality on that corpus.
253
+
241
254
**⚠️ Important**: The `vector_db_id` value must exactly match the ID generated by the rag-content tool during index creation (e.g. `vs_8c94967b-81cc-4028-a294-9cfac6fd9ae2`). This identifier links your configuration to the specific vector database index.
242
255
243
256
### Step 5: Configure RAG Strategy
@@ -265,10 +278,10 @@ okp:
265
278
266
279
Both modes can be enabled simultaneously. Choose based on your latency and control preferences:
267
280
268
-
| Mode | When context is fetched | Tool call needed | score_multiplier |
Copy file name to clipboardExpand all lines: docs/openapi.json
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -11870,6 +11870,13 @@
11870
11870
"description": "Multiplier applied to relevance scores from this vector store. Used to weight results when querying multiple knowledge sources. Values > 1 boost this store's results; values < 1 reduce them.",
11871
11871
"default": 1.0
11872
11872
},
11873
+
"relevance_cutoff_score": {
11874
+
"type": "number",
11875
+
"exclusiveMinimum": 0.0,
11876
+
"title": "Relevance cutoff score",
11877
+
"description": "Minimum raw similarity score to consider a result relevant. Results with a similarity score below this threshold are not returned.",
0 commit comments