-
Notifications
You must be signed in to change notification settings - Fork 91
LCORE-2505: Add migration guide and deprecation notes for BYOK config refactoring #1882
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
are-ces
wants to merge
1
commit into
lightspeed-core:main
Choose a base branch
from
are-ces:lcore-2505-migration-guide-byok-config
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+150
−0
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,128 @@ | ||
| # Migrating to v0.7.0 | ||
|
|
||
| ## Table of Contents | ||
|
|
||
| * [RAG Configuration](#rag-configuration) | ||
|
|
||
| --- | ||
|
|
||
| ## RAG Configuration | ||
|
|
||
| In v0.7.0, the RAG configuration in `lightspeed-stack.yaml` is unified under a single `rag` section. The four separate top-level sections (`byok_rag`, `rag`, `okp`, `reranker`) are replaced by a nested structure that groups BYOK stores, OKP settings, retrieval strategies, and reranker settings together. The `rag_type` field is renamed to `backend` and the `inline::`/`remote::` prefix is dropped (e.g. `inline::faiss` becomes `faiss`). Hardcoded chunk limit constants are now user-configurable fields with sensible defaults. | ||
|
|
||
| ### Field Mapping | ||
|
|
||
| | Old config path | New config path | Notes | | ||
| |---|---|---| | ||
| | `byok_rag` (top-level list) | `rag.byok.stores` | Moved under `rag.byok` | | ||
| | `byok_rag[].rag_type` | `rag.byok.stores[].backend` | Drop the `inline::`/`remote::` prefix (e.g. `inline::faiss` becomes `faiss`) | | ||
| | `rag.inline` (list of IDs) | `rag.retrieval.inline.sources` | Moved under `rag.retrieval.inline` | | ||
| | `rag.tool` (list of IDs) | `rag.retrieval.tool.sources` | Moved under `rag.retrieval.tool` | | ||
| | `okp` (top-level section) | `rag.okp` | Moved under `rag` | | ||
| | `BYOK_RAG_MAX_CHUNKS` constant | `rag.byok.max_chunks` | Default: 10 | | ||
| | `OKP_RAG_MAX_CHUNKS` constant | `rag.okp.max_chunks` | Default: 5 | | ||
| | `INLINE_RAG_MAX_CHUNKS` constant | `rag.retrieval.inline.max_chunks` | Default: 10 | | ||
| | `TOOL_RAG_MAX_CHUNKS` constant | `rag.retrieval.tool.max_chunks` | Default: 10 | | ||
| | `reranker` (top-level section) | `rag.retrieval.inline.reranker` | Moved under `rag.retrieval.inline` | | ||
|
|
||
| --- | ||
|
|
||
| ### Before / After Examples | ||
|
|
||
| #### Full RAG Configuration Example | ||
|
|
||
| **Before (v0.6.x):** | ||
|
|
||
| ```yaml | ||
| byok_rag: | ||
| - rag_id: ocp-docs | ||
| rag_type: inline::faiss | ||
| embedding_model: sentence-transformers/all-mpnet-base-v2 | ||
| embedding_dimension: 768 | ||
| vector_db_id: vs_123 | ||
| db_path: /tmp/ocp.faiss | ||
| score_multiplier: 1.0 | ||
| - rag_id: knowledge-base | ||
| rag_type: inline::faiss | ||
| embedding_model: sentence-transformers/all-mpnet-base-v2 | ||
| embedding_dimension: 768 | ||
| vector_db_id: vs_456 | ||
| db_path: /tmp/kb.faiss | ||
| score_multiplier: 1.2 | ||
|
|
||
| rag: | ||
| inline: | ||
| - ocp-docs | ||
| - knowledge-base | ||
| - okp | ||
| tool: | ||
| - ocp-docs | ||
| - knowledge-base | ||
|
|
||
| okp: | ||
| rhokp_url: ${env.RH_SERVER_OKP} | ||
| offline: true | ||
| # chunk_filter_query: "product:*ansible* AND product:*openshift*" | ||
|
|
||
| reranker: | ||
| enabled: true | ||
| model: cross-encoder/ms-marco-MiniLM-L6-v2 | ||
| ``` | ||
|
|
||
| **After (v0.7.0):** | ||
|
|
||
| ```yaml | ||
| rag: | ||
| byok: | ||
| max_chunks: 10 # Was BYOK_RAG_MAX_CHUNKS constant | ||
| stores: | ||
| - rag_id: ocp-docs | ||
| backend: faiss # Was 'rag_type: inline::faiss' | ||
| embedding_model: sentence-transformers/all-mpnet-base-v2 | ||
| embedding_dimension: 768 | ||
| vector_db_id: vs_123 | ||
| db_path: /tmp/ocp.faiss | ||
| score_multiplier: 1.0 | ||
| - rag_id: knowledge-base | ||
| backend: faiss # Was 'rag_type: inline::faiss' | ||
| embedding_model: sentence-transformers/all-mpnet-base-v2 | ||
| embedding_dimension: 768 | ||
| vector_db_id: vs_456 | ||
| db_path: /tmp/kb.faiss | ||
| score_multiplier: 1.2 | ||
|
|
||
| okp: | ||
| rhokp_url: ${env.RH_SERVER_OKP} | ||
| offline: true | ||
| max_chunks: 5 # Was OKP_RAG_MAX_CHUNKS constant | ||
| # chunk_filter_query: "product:*ansible* AND product:*openshift*" | ||
|
|
||
| retrieval: | ||
| inline: | ||
| sources: | ||
| - ocp-docs | ||
| - knowledge-base | ||
| - okp | ||
| max_chunks: 10 # Was INLINE_RAG_MAX_CHUNKS constant | ||
| reranker: | ||
| enabled: true | ||
| model: cross-encoder/ms-marco-MiniLM-L6-v2 | ||
| tool: | ||
| sources: | ||
| - ocp-docs | ||
| - knowledge-base | ||
| max_chunks: 10 # Was TOOL_RAG_MAX_CHUNKS constant | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ### Chunk Limits | ||
|
|
||
| Chunk limits were previously hardcoded as constants in `src/constants.py`. They are now configurable fields in `lightspeed-stack.yaml` with the same default values: | ||
|
|
||
| | Old constant | New config field | Default | | ||
| |---|---|---| | ||
| | `BYOK_RAG_MAX_CHUNKS` | `rag.byok.max_chunks` | 10 | | ||
| | `OKP_RAG_MAX_CHUNKS` | `rag.okp.max_chunks` | 5 | | ||
| | `INLINE_RAG_MAX_CHUNKS` | `rag.retrieval.inline.max_chunks` | 10 | | ||
| | `TOOL_RAG_MAX_CHUNKS` | `rag.retrieval.tool.max_chunks` | 10 | | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.