PageSourceSearch

https://vllm-sr.ai/assets/js/04d38678.f731c245.js

js vllm-sr.ai collected 2026-10-04 01:32:16 UTC 4,656 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunksemantic_router_docs=self.webpackChunksemantic_router_docs||[]).push([[16867],{77010(e,n,t){t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>s,default:()=>u,frontMatter:()=>l,metadata:()=>r,toc:()=>c});const r=JSON.parse('{"id":"tutorials/plugin/rag","title":"RAG","description":"Overview","source":"@site/versioned_docs/version-v0.3/tutorials/plugin/rag.md","sourceDirName":"tutorials/plugin","slug":"/tutorials/plugin/rag","permalink":"/docs/v0.3/tutorials/plugin/rag","draft":false,"unlisted":false,"editUrl":"https://github.com/vllm-project/semantic-router/edit/main/website/docs/tutorials/plugin/rag.md","tags":[],"version":"v0.3","frontMatter":{},"sidebar":"tutorialSidebar","previous":{"title":"Memory","permalink":"/docs/v0.3/tutorials/plugin/memory"},"next":{"title":"Router Replay","permalink":"/docs/v0.3/tutorials/plugin/router-replay"}}');var i=t(74848),o=t(28453);const l={},s="RAG",a={},c=[{value:"Overview",id:"overview",level:2},{value:"Key Advantages",id:"key-advantages",level:2},{value:"What Problem Does It Solve?",id:"what-problem-does-it-solve",level:2},{value:"When to Use",id:"when-to-use",level:2},{value:"Configuration",id:"configuration",level:2}];function d(e){const n={code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.header,{children:(0,i.jsx)(n.h1,{id:"rag",children:"RAG"})}),"\n",(0,i.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"rag"})," is a route-local plugin for retrieval-augmented generation."]}),"\n",(0,i.jsxs)(n.p,{children:["It aligns to ",(0,i.jsx)(n.code,{children:"config/fragments/plugin/rag/milvus.yaml"})," (Milvus) and ",(0,i.jsx)(n.code,{children:"config/fragments/plugin/rag/qdrant.yaml"})," (Qdrant)."]}),"\n",(0,i.jsx)(n.h2,{id:"key-advantages",children:"Key Advantages"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Keeps retrieval local to routes that actually need it."}),"\n",(0,i.jsx)(n.li,{children:"Supports backend-specific retrieval settings in one place."}),"\n",(0,i.jsx)(n.li,{children:"Avoids forcing every route to inject documents or tool context."}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"what-problem-does-it-solve",children:"What Problem Does It Solve?"}),"\n",(0,i.jsxs)(n.p,{children:["Some routes need external document retrieval before answering, while most do not. ",(0,i.jsx)(n.code,{children:"rag"})," lets the matched route perform retrieval and injection without globalizing that behavior."]}),"\n",(0,i.jsx)(n.h2,{id:"when-to-use",children:"When to Use"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"a route should fetch documents or facts before the final model call"}),"\n",(0,i.jsx)(n.li,{children:"retrieval should use Milvus, Qdrant, or another explicit backend"}),"\n",(0,i.jsx)(n.li,{children:"different routes need different retrieval settings"}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"configuration",children:"Configuration"}),"\n",(0,i.jsxs)(n.p,{children:["Use this fragment under ",(0,i.jsx)(n.code,{children:"routing.decisions[].plugins"}),":"]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"Milvus backend:"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-yaml",children:"plugin:\n  type: rag\n  configuration:\n    enabled: true\n    backend: milvus\n    top_k: 5\n    similarity_threshold: 0.78\n    injection_mode: tool_role\n    on_failure: warn\n    backend_config:\n      collection: docs\n      reuse_cache_connection: true\n      content_field: content\n      metadata_field: metadata\n"})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"Qdrant backend:"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-yaml",children:"plugin:\n  type: rag\n  configuration:\n    enabled: true\n    backend: qdrant\n    top_k: 5\n    similarity_threshold: 0.78\n    injection_mode: tool_role\n    on_failure: warn\n    backend_config:\n      collection: docs\n      reuse_cache_connection: true\n      content_field: content\n"})})]})}function u(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},28453(e,n,t){t.d(n,{R:()=>l,x:()=>s});var r=t(96540);const i={},o=r.createContext(i);function l(e){const n=r.useContext(o);return r.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function s(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:l(e.components),r.createElement(o.Provider,{value:n},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.