Skip to content

feat: aiDAPTIV™ RAG shared-prefix KV-cache reuse#250

Open
TingyinKuo-Phison wants to merge 3 commits into
TNG:3.1.2-beta-test6from
TingyinKuo-Phison:feature/aidaptiv-rag-kvcache-shared-prefix
Open

feat: aiDAPTIV™ RAG shared-prefix KV-cache reuse#250
TingyinKuo-Phison wants to merge 3 commits into
TNG:3.1.2-beta-test6from
TingyinKuo-Phison:feature/aidaptiv-rag-kvcache-shared-prefix

Conversation

@TingyinKuo-Phison

Copy link
Copy Markdown

Place a fixed shared prefix + document context first so the KV-cache prefix is identical across presets/queries, then append each preset's own system prompt after it (preserving tools/persona) to improve TTFT.

  • textInference: PHISON_KM_RAG_PREFIX, ragMode, 16384 context floor, per-doc retrieval
  • langchain: token-based merged-group chunking, per-doc retrieval, KV-cache warmup
  • IPC: extend addDocumentToRAGList, add warmupKVCacheForDocument
  • presets: supportsPhisonKmRag/defaultRagMode; rename phison preset to "aiDAPTIV™ RAG"
  • SettingsChat: retrieval-mode toggle + context-floor hint; i18n strings

Description:

Please provide a brief description of the changes made in this pull request.

Related Issue:

If this pull request is related to any existing issue, please mention the issue number here.

Changes Made:

Please list down the specific changes made in this pull request.

Testing Done:

Please describe the testing that has been done to ensure the changes made in this pull request are functioning as expected.

Screenshots:

If applicable, please provide screenshots or GIFs or videos to visually demonstrate the changes made.

Checklist:

  • I have tested the changes locally.
  • I have self-reviewed the code changes.
  • I have updated the documentation, if necessary.

Place a fixed shared prefix + document context first so the KV-cache prefix is
identical across presets/queries, then append each preset's own system prompt
after it (preserving tools/persona) to improve TTFT.

- textInference: PHISON_KM_RAG_PREFIX, ragMode, 16384 context floor, per-doc retrieval
- langchain: token-based merged-group chunking, per-doc retrieval, KV-cache warmup
- IPC: extend addDocumentToRAGList, add warmupKVCacheForDocument
- presets: supportsPhisonKmRag/defaultRagMode; rename phison preset to "aiDAPTIV™ RAG"
- SettingsChat: retrieval-mode toggle + context-floor hint; i18n strings

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7f09e7ed-1bf9-435e-95e2-b94500212ef8

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

YuchengKuo-Phison and others added 2 commits July 6, 2026 13:32
Rename the preset from aiDAPTIV™ RAG to aiDAPTIV™, reword the description, and add an extendedDescription shown as an info tooltip.
…ache-shared-prefix_yucheng

feat: refine aiDAPTIV™ preset name and descriptions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants