openrag/assets/js/71478a5d.6bdf311d.js
2025-12-16 14:05:59 +00:00

1 line
No EOL
7.2 KiB
JavaScript

"use strict";(globalThis.webpackChunkopenrag_docs=globalThis.webpackChunkopenrag_docs||[]).push([[5490],{6195:(e,n,l)=>{l.r(n),l.d(n,{assets:()=>d,contentTitle:()=>a,default:()=>u,frontMatter:()=>o,metadata:()=>t,toc:()=>c});const t=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),r=l(8453),i=l(9179);const o={title:"Filter knowledge",slug:"/knowledge-filters"},a=void 0,d={},c=[{value:"Built-in filters",id:"built-in-filters",level:2},{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,r.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:"built-in-filters",children:"Built-in filters"}),"\n",(0,s.jsxs)(n.p,{children:["When you install OpenRAG, it automatically creates an ",(0,s.jsx)(n.strong,{children:"OpenRAG docs"})," filter that includes OpenRAG's default documents.\nThese documents provide information about OpenRAG itself and help you learn how to use OpenRAG."]}),"\n",(0,s.jsxs)(n.p,{children:["When you use the OpenRAG ",(0,s.jsx)(i.A,{name:"MessageSquare","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Chat"}),", ",(0,s.jsxs)(n.a,{href:"#apply-a-filter",children:["apply the ",(0,s.jsx)(n.strong,{children:"OpenRAG docs"})," filter"]})," if you want to ask questions about OpenRAG's features and functionality.\nThis limits the agent's context to the default OpenRAG documentation rather than all documents in your knowledge base."]}),"\n",(0,s.jsx)(n.p,{children:"After uploading your own documents, it is recommended that you create your own filters to organize your documents effectively and separate them from the default OpenRAG documents."}),"\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)(i.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)(i.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)(i.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)(i.A,{name:"MessageSquare","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Chat"})," window, click ",(0,s.jsx)(i.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)(i.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 u(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},9179:(e,n,l)=>{l.d(n,{A:()=>r});l(6540);var t=l(7856),s=l(4848);function r({name:e,...n}){const l=t[e];return l?(0,s.jsx)(l,{...n}):null}}}]);