openrag/assets/js/71478a5d.7641035a.js
2025-12-02 22:07:28 +00:00

1 line
No EOL
6 KiB
JavaScript

"use strict";(globalThis.webpackChunkopenrag_docs=globalThis.webpackChunkopenrag_docs||[]).push([[5490],{6195:(e,n,l)=>{l.r(n),l.d(n,{assets:()=>c,contentTitle:()=>d,default:()=>g,frontMatter:()=>o,metadata:()=>r,toc:()=>a});const r=JSON.parse('{"id":"core-components/knowledge-filters","title":"Filter knowledge","description":"OpenRAG\'s knowledge filters help you organize and manage your knowledge base by creating pre-defined views of your documents.","source":"@site/docs/core-components/knowledge-filters.mdx","sourceDirName":"core-components","slug":"/knowledge-filters","permalink":"/knowledge-filters","draft":false,"unlisted":false,"editUrl":"https://github.com/openrag/openrag/tree/main/docs/docs/core-components/knowledge-filters.mdx","tags":[],"version":"current","frontMatter":{"title":"Filter knowledge","slug":"/knowledge-filters"},"sidebar":"tutorialSidebar","previous":{"title":"Ingest knowledge","permalink":"/ingestion"},"next":{"title":"Chat","permalink":"/chat"}}');var s=l(4848),i=l(8453),t=l(7733);l(1470),l(9365);const o={title:"Filter knowledge",slug:"/knowledge-filters"},d=void 0,c={},a=[{value:"Create a filter",id:"create-a-filter",level:2},{value:"Apply a filter",id:"apply-a-filter",level:2},{value:"Delete a filter",id:"delete-a-filter",level:2}];function h(e){const n={a:"a",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.p,{children:["OpenRAG's knowledge filters help you organize and manage your ",(0,s.jsx)(n.a,{href:"/knowledge",children:"knowledge base"})," by creating pre-defined views of your documents."]}),"\n",(0,s.jsx)(n.p,{children:"Each knowledge filter captures a specific subset of documents based on given a search query and filters."}),"\n",(0,s.jsx)(n.p,{children:"Knowledge filters can be used with different OpenRAG functionality.\nFor example, knowledge filters can help agents access large knowledge bases efficiently by narrowing the scope of documents that you want the agent to use."}),"\n",(0,s.jsx)(n.h2,{id:"create-a-filter",children:"Create a filter"}),"\n",(0,s.jsx)(n.p,{children:"To create a knowledge filter, do the following:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Click ",(0,s.jsx)(n.strong,{children:"Knowledge"}),", and then click ",(0,s.jsx)(t.A,{name:"Plus","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Knowledge Filters"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Enter a ",(0,s.jsx)(n.strong,{children:"Name"})," and ",(0,s.jsx)(n.strong,{children:"Description"}),", and then click ",(0,s.jsx)(n.strong,{children:"Create Filter"}),"."]}),"\n",(0,s.jsx)(n.p,{children:"By default, new filters match all documents in your knowledge base.\nModify the filter to customize it."}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["To modify the filter, click ",(0,s.jsx)(t.A,{name:"Library","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Knowledge"}),", and then click your new filter. You can edit the following settings:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Search Query"}),": Enter text for semantic search, such as ",(0,s.jsx)(n.code,{children:"financial reports from Q4"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Data Sources"}),": Select specific data sources or folders to include."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Document Types"}),": Filter by file type."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Owners"}),": Filter by the user that uploaded the documents."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Connectors"}),": Filter by ",(0,s.jsx)(n.a,{href:"/ingestion",children:"upload source"}),", such as the local file system or a Google Drive OAuth connector."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Response Limit"}),": Set the maximum number of results to return from the knowledge base. The default is ",(0,s.jsx)(n.code,{children:"10"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Score Threshold"}),": Set the minimum relevance score for similarity search. The default score is ",(0,s.jsx)(n.code,{children:"0"}),"."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["To save your changes, click ",(0,s.jsx)(n.strong,{children:"Update Filter"}),"."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"apply-a-filter",children:"Apply a filter"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Apply a global filter"}),": Click ",(0,s.jsx)(t.A,{name:"Library","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Knowledge"}),", and then enable the toggle next to your preferred filter. Only one filter can be the global filter. The global filter applies to all chat sessions."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Apply a chat filter"}),": In the ",(0,s.jsx)(t.A,{name:"MessageSquare","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Chat"})," window, click ",(0,s.jsx)(t.A,{name:"Funnel","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Filter"}),", and then select the filter to apply.\nChat filters apply to one chat session only."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"delete-a-filter",children:"Delete a filter"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Click ",(0,s.jsx)(t.A,{name:"Library","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Knowledge"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Click the filter that you want to delete."}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Click ",(0,s.jsx)(n.strong,{children:"Delete Filter"}),"."]}),"\n"]}),"\n"]})]})}function g(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}}}]);