diff --git a/404.html b/404.html index 3cc08db..41aab20 100644 --- a/404.html +++ b/404.html @@ -7,7 +7,7 @@ - + diff --git a/assets/js/400dfa73.066bb592.js b/assets/js/400dfa73.c1d11f2d.js similarity index 70% rename from assets/js/400dfa73.066bb592.js rename to assets/js/400dfa73.c1d11f2d.js index 850ba81..21fbf6b 100644 --- a/assets/js/400dfa73.066bb592.js +++ b/assets/js/400dfa73.c1d11f2d.js @@ -1 +1 @@ -"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[254],{6223:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>t,default:()=>h,frontMatter:()=>i,metadata:()=>a,toc:()=>d});var r=s(4848),o=s(8453);const i={},t="\ud83d\udc50 Add memory to the RAG application",a={id:"add-memory/add-memory",title:"\ud83d\udc50 Add memory to the RAG application",description:'In many Q&A applications we want to allow the user to have a back-and-forth conversation with the LLM, meaning the application needs some sort of "memory" of past questions and answers, and some logic for incorporating those into its current thinking. In this section, you will retrieve chat message history from MongoDB and incorporate it in your RAG application.',source:"@site/docs/80-add-memory/2-add-memory.mdx",sourceDirName:"80-add-memory",slug:"/add-memory/add-memory",permalink:"/ai-rag-lab/docs/add-memory/add-memory",draft:!1,unlisted:!1,editUrl:"https://github.com/mongodb-developer/ai-rag-lab/blob/main/docs/80-add-memory/2-add-memory.mdx",tags:[],version:"current",sidebarPosition:2,frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udcd8 Tools, libraries, and concepts",permalink:"/ai-rag-lab/docs/add-memory/concepts"},next:{title:"\ud83c\udfaf Summary",permalink:"/ai-rag-lab/docs/summary"}},c={},d=[];function l(e){const n={code:"code",h1:"h1",p:"p",pre:"pre",strong:"strong",...(0,o.R)(),...e.components},{Details:s}=n;return s||function(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{id:"-add-memory-to-the-rag-application",children:"\ud83d\udc50 Add memory to the RAG application"}),"\n",(0,r.jsx)(n.p,{children:'In many Q&A applications we want to allow the user to have a back-and-forth conversation with the LLM, meaning the application needs some sort of "memory" of past questions and answers, and some logic for incorporating those into its current thinking. In this section, you will retrieve chat message history from MongoDB and incorporate it in your RAG application.'}),"\n",(0,r.jsxs)(n.p,{children:["Fill in any ",(0,r.jsx)(n.code,{children:""})," placeholders and run the cells under the ",(0,r.jsx)(n.strong,{children:"Step 10: Add memory to the RAG application"})," section in the notebook to add memory to the RAG application."]}),"\n",(0,r.jsx)(n.p,{children:"The answers for code blocks in this section are as follows:"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"CODE_BLOCK_25"})}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:'history_collection.create_index("session_id")\n'})})})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"CODE_BLOCK_26"})}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:'{\n "session_id": session_id,\n "role": role,\n "content": content,\n "timestamp": datetime.now(),\n}\n'})})})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"CODE_BLOCK_27"})}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"history_collection.insert_one(message)\n"})})})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"CODE_BLOCK_28"})}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:'history_collection.find({"session_id": session_id}).sort("timestamp", 1)\n'})})})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"CODE_BLOCK_29"})}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:'{"role": msg["role"], "content": msg["content"]} for msg in cursor\n'})})})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"CODE_BLOCK_30"})}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"message_history = retrieve_session_history(session_id)\nmessages += message_history\n"})})})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"CODE_BLOCK_31"})}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:'user_message = {"role": "user", "content": user_query}\nmessages.append(user_message)\n'})})})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"CODE_BLOCK_32"})}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:'store_chat_message(session_id, "user", user_query)\nstore_chat_message(session_id, "assistant", answer)\n'})})})]})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>t,x:()=>a});var r=s(6540);const o={},i=r.createContext(o);function t(e){const n=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:t(e.components),r.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[254],{6223:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>t,default:()=>h,frontMatter:()=>i,metadata:()=>a,toc:()=>d});var r=s(4848),o=s(8453);const i={},t="\ud83d\udc50 Add memory to the RAG application",a={id:"add-memory/add-memory",title:"\ud83d\udc50 Add memory to the RAG application",description:'In many Q&A applications we want to allow the user to have a back-and-forth conversation with the LLM, meaning the application needs some sort of "memory" of past questions and answers, and some logic for incorporating those into its current thinking. In this section, you will retrieve chat message history from MongoDB and incorporate it in your RAG application.',source:"@site/docs/80-add-memory/2-add-memory.mdx",sourceDirName:"80-add-memory",slug:"/add-memory/add-memory",permalink:"/ai-rag-lab/docs/add-memory/add-memory",draft:!1,unlisted:!1,editUrl:"https://github.com/mongodb-developer/ai-rag-lab/blob/main/docs/80-add-memory/2-add-memory.mdx",tags:[],version:"current",sidebarPosition:2,frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udcd8 Tools, libraries, and concepts",permalink:"/ai-rag-lab/docs/add-memory/concepts"},next:{title:"\ud83c\udfaf Summary",permalink:"/ai-rag-lab/docs/summary"}},c={},d=[];function l(e){const n={code:"code",h1:"h1",p:"p",pre:"pre",strong:"strong",...(0,o.R)(),...e.components},{Details:s}=n;return s||function(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{id:"-add-memory-to-the-rag-application",children:"\ud83d\udc50 Add memory to the RAG application"}),"\n",(0,r.jsx)(n.p,{children:'In many Q&A applications we want to allow the user to have a back-and-forth conversation with the LLM, meaning the application needs some sort of "memory" of past questions and answers, and some logic for incorporating those into its current thinking. In this section, you will retrieve chat message history from MongoDB and incorporate it in your RAG application.'}),"\n",(0,r.jsxs)(n.p,{children:["Fill in any ",(0,r.jsx)(n.code,{children:""})," placeholders and run the cells under the ",(0,r.jsx)(n.strong,{children:"Step 10: Add memory to the RAG application"})," section in the notebook to add memory to the RAG application."]}),"\n",(0,r.jsx)(n.p,{children:"The answers for code blocks in this section are as follows:"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"CODE_BLOCK_27"})}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:'history_collection.create_index("session_id")\n'})})})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"CODE_BLOCK_28"})}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:'{\n "session_id": session_id,\n "role": role,\n "content": content,\n "timestamp": datetime.now(),\n}\n'})})})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"CODE_BLOCK_29"})}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"history_collection.insert_one(message)\n"})})})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"CODE_BLOCK_30"})}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:'history_collection.find({"session_id": session_id}).sort("timestamp", 1)\n'})})})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"CODE_BLOCK_31"})}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:'{"role": msg["role"], "content": msg["content"]} for msg in cursor\n'})})})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"CODE_BLOCK_32"})}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"message_history = retrieve_session_history(session_id)\nmessages.extend(message_history)\n"})})})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"CODE_BLOCK_33"})}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:'user_message = {"role": "user", "content": user_query}\nmessages.append(user_message)\n'})})})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"CODE_BLOCK_34"})}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:'store_chat_message(session_id, "user", user_query)\nstore_chat_message(session_id, "assistant", answer)\n'})})})]})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>t,x:()=>a});var r=s(6540);const o={},i=r.createContext(o);function t(e){const n=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:t(e.components),r.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/412449fd.40d85668.js b/assets/js/412449fd.40d85668.js new file mode 100644 index 0000000..b6eb23c --- /dev/null +++ b/assets/js/412449fd.40d85668.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[199],{3889:(t,e,a)=>{a.r(e),a.d(e,{assets:()=>l,contentTitle:()=>s,default:()=>p,frontMatter:()=>n,metadata:()=>d,toc:()=>i});var o=a(4848),r=a(8453);const n={},s="\ud83d\udc50 Load the dataset",d={id:"prepare-the-data/load-data",title:"\ud83d\udc50 Load the dataset",description:"First, let's download the dataset for our lab. We'll use a subset of articles from the MongoDB Developer Center as the source data for our RAG application.",source:"@site/docs/50-prepare-the-data/2-load-data.mdx",sourceDirName:"50-prepare-the-data",slug:"/prepare-the-data/load-data",permalink:"/ai-rag-lab/docs/prepare-the-data/load-data",draft:!1,unlisted:!1,editUrl:"https://github.com/mongodb-developer/ai-rag-lab/blob/main/docs/50-prepare-the-data/2-load-data.mdx",tags:[],version:"current",sidebarPosition:2,frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udcd8 Tools, libraries, and concepts",permalink:"/ai-rag-lab/docs/prepare-the-data/concepts"},next:{title:"\ud83d\udc50 Chunk up the data",permalink:"/ai-rag-lab/docs/prepare-the-data/chunk-data"}},l={},i=[];function c(t){const e={h1:"h1",p:"p",strong:"strong",...(0,r.R)(),...t.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(e.h1,{id:"-load-the-dataset",children:"\ud83d\udc50 Load the dataset"}),"\n",(0,o.jsx)(e.p,{children:"First, let's download the dataset for our lab. We'll use a subset of articles from the MongoDB Developer Center as the source data for our RAG application."}),"\n",(0,o.jsxs)(e.p,{children:["Run all the cells under the ",(0,o.jsx)(e.strong,{children:"Step 3: Load the dataset"})," section in the notebook to load the articles as a list of Python objects consisting of the content and relevant metadata."]})]})}function p(t={}){const{wrapper:e}={...(0,r.R)(),...t.components};return e?(0,o.jsx)(e,{...t,children:(0,o.jsx)(c,{...t})}):c(t)}},8453:(t,e,a)=>{a.d(e,{R:()=>s,x:()=>d});var o=a(6540);const r={},n=o.createContext(r);function s(t){const e=o.useContext(n);return o.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function d(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(r):t.components||r:s(t.components),o.createElement(n.Provider,{value:e},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/412449fd.af4de671.js b/assets/js/412449fd.af4de671.js deleted file mode 100644 index 168a0a9..0000000 --- a/assets/js/412449fd.af4de671.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[199],{3889:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>l,contentTitle:()=>s,default:()=>p,frontMatter:()=>n,metadata:()=>d,toc:()=>i});var o=a(4848),r=a(8453);const n={},s="\ud83d\udc50 Load the dataset",d={id:"prepare-the-data/load-data",title:"\ud83d\udc50 Load the dataset",description:"First, let's download the dataset for our lab. We'll use four RAG-focused blogs from our Developer Center as the source data for our RAG application.",source:"@site/docs/50-prepare-the-data/2-load-data.mdx",sourceDirName:"50-prepare-the-data",slug:"/prepare-the-data/load-data",permalink:"/ai-rag-lab/docs/prepare-the-data/load-data",draft:!1,unlisted:!1,editUrl:"https://github.com/mongodb-developer/ai-rag-lab/blob/main/docs/50-prepare-the-data/2-load-data.mdx",tags:[],version:"current",sidebarPosition:2,frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udcd8 Tools, libraries, and concepts",permalink:"/ai-rag-lab/docs/prepare-the-data/concepts"},next:{title:"\ud83d\udc50 Chunk up the data",permalink:"/ai-rag-lab/docs/prepare-the-data/chunk-data"}},l={},i=[];function c(e){const t={h1:"h1",p:"p",strong:"strong",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.h1,{id:"-load-the-dataset",children:"\ud83d\udc50 Load the dataset"}),"\n",(0,o.jsx)(t.p,{children:"First, let's download the dataset for our lab. We'll use four RAG-focused blogs from our Developer Center as the source data for our RAG application."}),"\n",(0,o.jsxs)(t.p,{children:["Run all the cells under the ",(0,o.jsx)(t.strong,{children:"Step 3: Load the dataset"})," section in the notebook to load the blog content as LangChain Document objects."]})]})}function p(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(c,{...e})}):c(e)}},8453:(e,t,a)=>{a.d(t,{R:()=>s,x:()=>d});var o=a(6540);const r={},n=o.createContext(r);function s(e){const t=o.useContext(n);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function d(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),o.createElement(n.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/6e787a66.a2076857.js b/assets/js/6e787a66.9d388fff.js similarity index 52% rename from assets/js/6e787a66.a2076857.js rename to assets/js/6e787a66.9d388fff.js index 3b43bba..e7f1651 100644 --- a/assets/js/6e787a66.a2076857.js +++ b/assets/js/6e787a66.9d388fff.js @@ -1 +1 @@ -"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[301],{8708:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>i,contentTitle:()=>o,default:()=>p,frontMatter:()=>a,metadata:()=>s,toc:()=>c});var r=t(4848),d=t(8453);const a={},o="\ud83d\udc50 Generate embeddings",s={id:"prepare-the-data/embed-data",title:"\ud83d\udc50 Generate embeddings",description:"To perform vector search on our data, we need to embed it (i.e. generate embedding vectors) before ingesting it into MongoDB.",source:"@site/docs/50-prepare-the-data/4-embed-data.mdx",sourceDirName:"50-prepare-the-data",slug:"/prepare-the-data/embed-data",permalink:"/ai-rag-lab/docs/prepare-the-data/embed-data",draft:!1,unlisted:!1,editUrl:"https://github.com/mongodb-developer/ai-rag-lab/blob/main/docs/50-prepare-the-data/4-embed-data.mdx",tags:[],version:"current",sidebarPosition:4,frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udc50 Chunk up the data",permalink:"/ai-rag-lab/docs/prepare-the-data/chunk-data"},next:{title:"\ud83d\udc50 Ingest data into MongoDB",permalink:"/ai-rag-lab/docs/prepare-the-data/ingest-data"}},i={},c=[];function l(e){const n={code:"code",h1:"h1",p:"p",pre:"pre",strong:"strong",...(0,d.R)(),...e.components},{Details:t}=n;return t||function(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{id:"-generate-embeddings",children:"\ud83d\udc50 Generate embeddings"}),"\n",(0,r.jsx)(n.p,{children:"To perform vector search on our data, we need to embed it (i.e. generate embedding vectors) before ingesting it into MongoDB."}),"\n",(0,r.jsxs)(n.p,{children:["Fill in any ",(0,r.jsx)(n.code,{children:""})," placeholders and run the cells under the ",(0,r.jsx)(n.strong,{children:"Step 5: Generate embeddings"})," section in the notebook to generate embeddings for the chunked documents."]}),"\n",(0,r.jsx)(n.p,{children:"The answers for code blocks in this section are as follows:"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"CODE_BLOCK_6"})}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:'SentenceTransformer("mixedbread-ai/mxbai-embed-large-v1")\n'})})})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"CODE_BLOCK_7"})}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"embedding = embedding_model.encode(text)\nreturn embedding.tolist()\n"})})})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"CODE_BLOCK_8"})}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:'for doc in split_docs:\n temp = doc.copy()\n temp["embedding"] = get_embedding(temp["page_content"])\n embedded_docs.append(temp)\n'})})})]})]})}function p(e={}){const{wrapper:n}={...(0,d.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>s});var r=t(6540);const d={},a=r.createContext(d);function o(e){const n=r.useContext(a);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(d):e.components||d:o(e.components),r.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[301],{8708:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>i,contentTitle:()=>o,default:()=>p,frontMatter:()=>a,metadata:()=>s,toc:()=>c});var r=t(4848),d=t(8453);const a={},o="\ud83d\udc50 Generate embeddings",s={id:"prepare-the-data/embed-data",title:"\ud83d\udc50 Generate embeddings",description:"To perform vector search on our data, we need to embed it (i.e. generate embedding vectors) before ingesting it into MongoDB.",source:"@site/docs/50-prepare-the-data/4-embed-data.mdx",sourceDirName:"50-prepare-the-data",slug:"/prepare-the-data/embed-data",permalink:"/ai-rag-lab/docs/prepare-the-data/embed-data",draft:!1,unlisted:!1,editUrl:"https://github.com/mongodb-developer/ai-rag-lab/blob/main/docs/50-prepare-the-data/4-embed-data.mdx",tags:[],version:"current",sidebarPosition:4,frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udc50 Chunk up the data",permalink:"/ai-rag-lab/docs/prepare-the-data/chunk-data"},next:{title:"\ud83d\udc50 Ingest data into MongoDB",permalink:"/ai-rag-lab/docs/prepare-the-data/ingest-data"}},i={},c=[];function l(e){const n={code:"code",h1:"h1",p:"p",pre:"pre",strong:"strong",...(0,d.R)(),...e.components},{Details:t}=n;return t||function(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{id:"-generate-embeddings",children:"\ud83d\udc50 Generate embeddings"}),"\n",(0,r.jsx)(n.p,{children:"To perform vector search on our data, we need to embed it (i.e. generate embedding vectors) before ingesting it into MongoDB."}),"\n",(0,r.jsxs)(n.p,{children:["Fill in any ",(0,r.jsx)(n.code,{children:""})," placeholders and run the cells under the ",(0,r.jsx)(n.strong,{children:"Step 5: Generate embeddings"})," section in the notebook to embed the chunked articles."]}),"\n",(0,r.jsx)(n.p,{children:"The answers for code blocks in this section are as follows:"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"CODE_BLOCK_8"})}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:'SentenceTransformer("mixedbread-ai/mxbai-embed-large-v1")\n'})})})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"CODE_BLOCK_9"})}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"embedding = embedding_model.encode(text)\nreturn embedding.tolist()\n"})})})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"CODE_BLOCK_10"})}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:'for doc in split_docs:\n temp = doc.copy()\n temp["embedding"] = get_embedding(temp["body"])\n embedded_docs.append(temp)\n'})})})]})]})}function p(e={}){const{wrapper:n}={...(0,d.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>s});var r=t(6540);const d={},a=r.createContext(d);function o(e){const n=r.useContext(a);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(d):e.components||d:o(e.components),r.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/6effaccf.1662c470.js b/assets/js/6effaccf.e37cfb28.js similarity index 96% rename from assets/js/6effaccf.1662c470.js rename to assets/js/6effaccf.e37cfb28.js index 687ef44..a160d88 100644 --- a/assets/js/6effaccf.1662c470.js +++ b/assets/js/6effaccf.e37cfb28.js @@ -1 +1 @@ -"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[839],{8031:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>a,default:()=>d,frontMatter:()=>o,metadata:()=>i,toc:()=>l});var r=t(4848),s=t(8453);const o={},a="\ud83e\uddb9 Stream responses from the RAG application",i={id:"build-rag-app/stream-responses",title:"\ud83e\uddb9 Stream responses from the RAG application",description:"By default, generation results are return once the generation is completed. Another option is to stream the results, which is useful for chat use cases where the user can incrementally see results as each token is generated.",source:"@site/docs/70-build-rag-app/3-stream-responses.mdx",sourceDirName:"70-build-rag-app",slug:"/build-rag-app/stream-responses",permalink:"/ai-rag-lab/docs/build-rag-app/stream-responses",draft:!1,unlisted:!1,editUrl:"https://github.com/mongodb-developer/ai-rag-lab/blob/main/docs/70-build-rag-app/3-stream-responses.mdx",tags:[],version:"current",sidebarPosition:3,frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udc50 Build the RAG application",permalink:"/ai-rag-lab/docs/build-rag-app/build-rag-app"},next:{title:"Add memory to the RAG application",permalink:"/ai-rag-lab/docs/category/add-memory-to-the-rag-application"}},c={},l=[];function p(e){const n={code:"code",h1:"h1",p:"p",pre:"pre",strong:"strong",...(0,s.R)(),...e.components},{Details:t}=n;return t||function(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{id:"-stream-responses-from-the-rag-application",children:"\ud83e\uddb9 Stream responses from the RAG application"}),"\n",(0,r.jsx)(n.p,{children:"By default, generation results are return once the generation is completed. Another option is to stream the results, which is useful for chat use cases where the user can incrementally see results as each token is generated."}),"\n",(0,r.jsxs)(n.p,{children:["Fill in any ",(0,r.jsx)(n.code,{children:""})," placeholders and run the cells under the ",(0,r.jsx)(n.strong,{children:"\ud83e\uddb9\u200d\u2640\ufe0f Return streaming responses"})," section in the notebook to stream the results from your RAG application."]}),"\n",(0,r.jsx)(n.p,{children:"The answers for code blocks in this section are as follows:"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"CODE_BLOCK_23"})}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:'fw_client.chat.completions.create(\n model=model,\n temperature=0,\n stream=True,\n messages=[\n {\n "role": "user",\n "content": create_prompt(user_query),\n }\n ],\n)\n'})})})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"CODE_BLOCK_24"})}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:'for chunk in response:\n if chunk.choices[0].delta.content:\n print(chunk.choices[0].delta.content, end="")\n'})})})]})]})}function d(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(p,{...e})}):p(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>i});var r=t(6540);const s={},o=r.createContext(s);function a(e){const n=r.useContext(o);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),r.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[839],{8031:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>a,default:()=>d,frontMatter:()=>o,metadata:()=>i,toc:()=>l});var r=t(4848),s=t(8453);const o={},a="\ud83e\uddb9 Stream responses from the RAG application",i={id:"build-rag-app/stream-responses",title:"\ud83e\uddb9 Stream responses from the RAG application",description:"By default, generation results are return once the generation is completed. Another option is to stream the results, which is useful for chat use cases where the user can incrementally see results as each token is generated.",source:"@site/docs/70-build-rag-app/3-stream-responses.mdx",sourceDirName:"70-build-rag-app",slug:"/build-rag-app/stream-responses",permalink:"/ai-rag-lab/docs/build-rag-app/stream-responses",draft:!1,unlisted:!1,editUrl:"https://github.com/mongodb-developer/ai-rag-lab/blob/main/docs/70-build-rag-app/3-stream-responses.mdx",tags:[],version:"current",sidebarPosition:3,frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udc50 Build the RAG application",permalink:"/ai-rag-lab/docs/build-rag-app/build-rag-app"},next:{title:"Add memory to the RAG application",permalink:"/ai-rag-lab/docs/category/add-memory-to-the-rag-application"}},c={},l=[];function p(e){const n={code:"code",h1:"h1",p:"p",pre:"pre",strong:"strong",...(0,s.R)(),...e.components},{Details:t}=n;return t||function(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{id:"-stream-responses-from-the-rag-application",children:"\ud83e\uddb9 Stream responses from the RAG application"}),"\n",(0,r.jsx)(n.p,{children:"By default, generation results are return once the generation is completed. Another option is to stream the results, which is useful for chat use cases where the user can incrementally see results as each token is generated."}),"\n",(0,r.jsxs)(n.p,{children:["Fill in any ",(0,r.jsx)(n.code,{children:""})," placeholders and run the cells under the ",(0,r.jsx)(n.strong,{children:"\ud83e\uddb9\u200d\u2640\ufe0f Return streaming responses"})," section in the notebook to stream the results from your RAG application."]}),"\n",(0,r.jsx)(n.p,{children:"The answers for code blocks in this section are as follows:"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"CODE_BLOCK_25"})}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:'fw_client.chat.completions.create(\n model=model,\n temperature=0,\n stream=True,\n messages=[\n {\n "role": "user",\n "content": create_prompt(user_query),\n }\n ],\n)\n'})})})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"CODE_BLOCK_26"})}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:'for chunk in response:\n if chunk.choices[0].delta.content:\n print(chunk.choices[0].delta.content, end="")\n'})})})]})]})}function d(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(p,{...e})}):p(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>i});var r=t(6540);const s={},o=r.createContext(s);function a(e){const n=r.useContext(o);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),r.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/798f680c.25be884e.js b/assets/js/798f680c.a41a8674.js similarity index 72% rename from assets/js/798f680c.25be884e.js rename to assets/js/798f680c.a41a8674.js index f02c249..be4986f 100644 --- a/assets/js/798f680c.25be884e.js +++ b/assets/js/798f680c.a41a8674.js @@ -1 +1 @@ -"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[260],{5285:(e,r,n)=>{n.r(r),n.d(r,{assets:()=>i,contentTitle:()=>o,default:()=>h,frontMatter:()=>c,metadata:()=>a,toc:()=>d});var s=n(4848),t=n(8453);const c={},o="\ud83d\udc50 Perform semantic search",a={id:"perform-semantic-search/vector-search",title:"\ud83d\udc50 Perform semantic search",description:"Now let's run some vector search queries against our data present in MongoDB.",source:"@site/docs/60-perform-semantic-search/3-vector-search.mdx",sourceDirName:"60-perform-semantic-search",slug:"/perform-semantic-search/vector-search",permalink:"/ai-rag-lab/docs/perform-semantic-search/vector-search",draft:!1,unlisted:!1,editUrl:"https://github.com/mongodb-developer/ai-rag-lab/blob/main/docs/60-perform-semantic-search/3-vector-search.mdx",tags:[],version:"current",sidebarPosition:3,frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udc50 Create a vector search index",permalink:"/ai-rag-lab/docs/perform-semantic-search/create-vector-index"},next:{title:"\ud83e\uddb9 Combine pre-filtering with vector search",permalink:"/ai-rag-lab/docs/perform-semantic-search/pre-filtering"}},i={},d=[];function l(e){const r={code:"code",h1:"h1",p:"p",pre:"pre",strong:"strong",...(0,t.R)(),...e.components},{Details:n}=r;return n||function(e,r){throw new Error("Expected "+(r?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.h1,{id:"-perform-semantic-search",children:"\ud83d\udc50 Perform semantic search"}),"\n",(0,s.jsx)(r.p,{children:"Now let's run some vector search queries against our data present in MongoDB."}),"\n",(0,s.jsxs)(r.p,{children:["Fill in any ",(0,s.jsx)(r.code,{children:""})," placeholders and run the cells under the ",(0,s.jsx)(r.strong,{children:"Step 8: Perform semantic search on your data"})," section in the notebook to run vector search queries against your data."]}),"\n",(0,s.jsx)(r.p,{children:"The answers for code blocks in this section are as follows:"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"CODE_BLOCK_13"})}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Answer"}),(0,s.jsx)("div",{children:(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-python",children:"get_embedding(user_query)\n"})})})]}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"CODE_BLOCK_14"})}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Answer"}),(0,s.jsx)("div",{children:(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-python",children:'[\n {\n "$vectorSearch": {\n "index": ATLAS_VECTOR_SEARCH_INDEX_NAME,\n "queryVector": query_embedding,\n "path": "embedding",\n "numCandidates": 150,\n "limit": 5,\n }\n },\n {\n "$project": {\n "_id": 0,\n "page_content": 1,\n "score": {"$meta": "vectorSearchScore"},\n }\n },\n]\n'})})})]}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"CODE_BLOCK_15"})}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Answer"}),(0,s.jsx)("div",{children:(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-python",children:"collection.aggregate(pipeline)\n"})})})]})]})}function h(e={}){const{wrapper:r}={...(0,t.R)(),...e.components};return r?(0,s.jsx)(r,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},8453:(e,r,n)=>{n.d(r,{R:()=>o,x:()=>a});var s=n(6540);const t={},c=s.createContext(t);function o(e){const r=s.useContext(c);return s.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function a(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:o(e.components),s.createElement(c.Provider,{value:r},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[260],{5285:(e,r,n)=>{n.r(r),n.d(r,{assets:()=>i,contentTitle:()=>o,default:()=>h,frontMatter:()=>c,metadata:()=>a,toc:()=>d});var s=n(4848),t=n(8453);const c={},o="\ud83d\udc50 Perform semantic search",a={id:"perform-semantic-search/vector-search",title:"\ud83d\udc50 Perform semantic search",description:"Now let's run some vector search queries against our data present in MongoDB.",source:"@site/docs/60-perform-semantic-search/3-vector-search.mdx",sourceDirName:"60-perform-semantic-search",slug:"/perform-semantic-search/vector-search",permalink:"/ai-rag-lab/docs/perform-semantic-search/vector-search",draft:!1,unlisted:!1,editUrl:"https://github.com/mongodb-developer/ai-rag-lab/blob/main/docs/60-perform-semantic-search/3-vector-search.mdx",tags:[],version:"current",sidebarPosition:3,frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udc50 Create a vector search index",permalink:"/ai-rag-lab/docs/perform-semantic-search/create-vector-index"},next:{title:"\ud83e\uddb9 Combine pre-filtering with vector search",permalink:"/ai-rag-lab/docs/perform-semantic-search/pre-filtering"}},i={},d=[];function l(e){const r={code:"code",h1:"h1",p:"p",pre:"pre",strong:"strong",...(0,t.R)(),...e.components},{Details:n}=r;return n||function(e,r){throw new Error("Expected "+(r?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.h1,{id:"-perform-semantic-search",children:"\ud83d\udc50 Perform semantic search"}),"\n",(0,s.jsx)(r.p,{children:"Now let's run some vector search queries against our data present in MongoDB."}),"\n",(0,s.jsxs)(r.p,{children:["Fill in any ",(0,s.jsx)(r.code,{children:""})," placeholders and run the cells under the ",(0,s.jsx)(r.strong,{children:"Step 8: Perform semantic search on your data"})," section in the notebook to run vector search queries against your data."]}),"\n",(0,s.jsx)(r.p,{children:"The answers for code blocks in this section are as follows:"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"CODE_BLOCK_15"})}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Answer"}),(0,s.jsx)("div",{children:(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-python",children:"get_embedding(user_query)\n"})})})]}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"CODE_BLOCK_16"})}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Answer"}),(0,s.jsx)("div",{children:(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-python",children:'[\n {\n "$vectorSearch": {\n "index": ATLAS_VECTOR_SEARCH_INDEX_NAME,\n "queryVector": query_embedding,\n "path": "embedding",\n "numCandidates": 150,\n "limit": 5,\n }\n },\n {\n "$project": {\n "_id": 0,\n "body": 1,\n "score": {"$meta": "vectorSearchScore"},\n }\n },\n]\n'})})})]}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"CODE_BLOCK_17"})}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Answer"}),(0,s.jsx)("div",{children:(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-python",children:"collection.aggregate(pipeline)\n"})})})]})]})}function h(e={}){const{wrapper:r}={...(0,t.R)(),...e.components};return r?(0,s.jsx)(r,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},8453:(e,r,n)=>{n.d(r,{R:()=>o,x:()=>a});var s=n(6540);const t={},c=s.createContext(t);function o(e){const r=s.useContext(c);return s.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function a(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:o(e.components),s.createElement(c.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/843aaef4.5e102587.js b/assets/js/843aaef4.5e102587.js new file mode 100644 index 0000000..2383590 --- /dev/null +++ b/assets/js/843aaef4.5e102587.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[507],{8529:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>o,contentTitle:()=>d,default:()=>h,frontMatter:()=>a,metadata:()=>c,toc:()=>i});var r=t(4848),s=t(8453);const a={},d="\ud83d\udc50 Chunk up the data",c={id:"prepare-the-data/chunk-data",title:"\ud83d\udc50 Chunk up the data",description:"Since we are working with large documents, we first need to break them up into smaller chunks before embedding and storing them in MongoDB.",source:"@site/docs/50-prepare-the-data/3-chunk-data.mdx",sourceDirName:"50-prepare-the-data",slug:"/prepare-the-data/chunk-data",permalink:"/ai-rag-lab/docs/prepare-the-data/chunk-data",draft:!1,unlisted:!1,editUrl:"https://github.com/mongodb-developer/ai-rag-lab/blob/main/docs/50-prepare-the-data/3-chunk-data.mdx",tags:[],version:"current",sidebarPosition:3,frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udc50 Load the dataset",permalink:"/ai-rag-lab/docs/prepare-the-data/load-data"},next:{title:"\ud83d\udc50 Generate embeddings",permalink:"/ai-rag-lab/docs/prepare-the-data/embed-data"}},o={},i=[];function l(e){const n={code:"code",h1:"h1",p:"p",pre:"pre",strong:"strong",...(0,s.R)(),...e.components},{Details:t}=n;return t||function(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{id:"-chunk-up-the-data",children:"\ud83d\udc50 Chunk up the data"}),"\n",(0,r.jsx)(n.p,{children:"Since we are working with large documents, we first need to break them up into smaller chunks before embedding and storing them in MongoDB."}),"\n",(0,r.jsxs)(n.p,{children:["Fill in any ",(0,r.jsx)(n.code,{children:""})," placeholders and run the cells under the ",(0,r.jsx)(n.strong,{children:"Step 4: Chunk up the data"})," section in the notebook to chunk up the articles we loaded."]}),"\n",(0,r.jsx)(n.p,{children:"The answers for code blocks in this section are as follows:"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"CODE_BLOCK_3"})}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:'RecursiveCharacterTextSplitter.from_tiktoken_encoder(\n encoding_name="cl100k_base", separators=separators, chunk_size=200, chunk_overlap=30\n)\n'})})})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"CODE_BLOCK_4"})}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"doc[text_field]\n"})})})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"CODE_BLOCK_5"})}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"text_splitter.split_text(text)\n"})})})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"CODE_BLOCK_6"})}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"for chunk in chunks:\n temp = doc.copy()\n temp[text_field] = chunk\n chunked_data.append(temp)\n"})})})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"CODE_BLOCK_7"})}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:'for doc in docs:\n chunks = get_chunks(doc, "body")\n split_docs.extend(chunks)\n'})})})]})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>d,x:()=>c});var r=t(6540);const s={},a=r.createContext(s);function d(e){const n=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:d(e.components),r.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/843aaef4.943b71c4.js b/assets/js/843aaef4.943b71c4.js deleted file mode 100644 index fb2f8a1..0000000 --- a/assets/js/843aaef4.943b71c4.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[507],{8529:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>i,contentTitle:()=>o,default:()=>h,frontMatter:()=>s,metadata:()=>d,toc:()=>c});var r=t(4848),a=t(8453);const s={},o="\ud83d\udc50 Chunk up the data",d={id:"prepare-the-data/chunk-data",title:"\ud83d\udc50 Chunk up the data",description:"Since we are working with large documents, we first need to break them up into smaller chunks before embedding and storing them in MongoDB.",source:"@site/docs/50-prepare-the-data/3-chunk-data.mdx",sourceDirName:"50-prepare-the-data",slug:"/prepare-the-data/chunk-data",permalink:"/ai-rag-lab/docs/prepare-the-data/chunk-data",draft:!1,unlisted:!1,editUrl:"https://github.com/mongodb-developer/ai-rag-lab/blob/main/docs/50-prepare-the-data/3-chunk-data.mdx",tags:[],version:"current",sidebarPosition:3,frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udc50 Load the dataset",permalink:"/ai-rag-lab/docs/prepare-the-data/load-data"},next:{title:"\ud83d\udc50 Generate embeddings",permalink:"/ai-rag-lab/docs/prepare-the-data/embed-data"}},i={},c=[];function l(e){const n={code:"code",h1:"h1",p:"p",pre:"pre",strong:"strong",...(0,a.R)(),...e.components},{Details:t}=n;return t||function(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{id:"-chunk-up-the-data",children:"\ud83d\udc50 Chunk up the data"}),"\n",(0,r.jsx)(n.p,{children:"Since we are working with large documents, we first need to break them up into smaller chunks before embedding and storing them in MongoDB."}),"\n",(0,r.jsxs)(n.p,{children:["Fill in any ",(0,r.jsx)(n.code,{children:""})," placeholders and run the cells under the ",(0,r.jsx)(n.strong,{children:"Step 4: Chunk up the data"})," section in the notebook to chunk up the documents we loaded."]}),"\n",(0,r.jsx)(n.p,{children:"The answers for code blocks in this section are as follows:"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"CODE_BLOCK_3"})}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:'RecursiveCharacterTextSplitter.from_tiktoken_encoder(\n encoding_name="cl100k_base", chunk_size=200, chunk_overlap=30\n)\n'})})})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"CODE_BLOCK_4"})}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"text_splitter.split_documents(docs)\n"})})})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"CODE_BLOCK_5"})}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"doc.dict() for doc in split_docs\n"})})})]})]})}function h(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>d});var r=t(6540);const a={},s=r.createContext(a);function o(e){const n=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:o(e.components),r.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/86a88343.06af0347.js b/assets/js/86a88343.06af0347.js deleted file mode 100644 index d3638c4..0000000 --- a/assets/js/86a88343.06af0347.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[186],{6742:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>a,contentTitle:()=>s,default:()=>h,frontMatter:()=>c,metadata:()=>o,toc:()=>d});var t=r(4848),i=r(8453);const c={},s="\ud83e\uddb9 Combine pre-filtering with vector search",o={id:"perform-semantic-search/pre-filtering",title:"\ud83e\uddb9 Combine pre-filtering with vector search",description:"Pre-filtering a technique to optimize vector search by only considering documents that match certain criteria during vector search.",source:"@site/docs/60-perform-semantic-search/4-pre-filtering.mdx",sourceDirName:"60-perform-semantic-search",slug:"/perform-semantic-search/pre-filtering",permalink:"/ai-rag-lab/docs/perform-semantic-search/pre-filtering",draft:!1,unlisted:!1,editUrl:"https://github.com/mongodb-developer/ai-rag-lab/blob/main/docs/60-perform-semantic-search/4-pre-filtering.mdx",tags:[],version:"current",sidebarPosition:4,frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udc50 Perform semantic search",permalink:"/ai-rag-lab/docs/perform-semantic-search/vector-search"},next:{title:"Build the RAG Application",permalink:"/ai-rag-lab/docs/category/build-the-rag-application"}},a={},d=[];function l(e){const n={admonition:"admonition",code:"code",h1:"h1",p:"p",pre:"pre",strong:"strong",...(0,i.R)(),...e.components},{Details:r}=n;return r||function(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{id:"-combine-pre-filtering-with-vector-search",children:"\ud83e\uddb9 Combine pre-filtering with vector search"}),"\n",(0,t.jsx)(n.p,{children:"Pre-filtering a technique to optimize vector search by only considering documents that match certain criteria during vector search."}),"\n",(0,t.jsxs)(n.p,{children:["Fill in any ",(0,t.jsx)(n.code,{children:""})," placeholders and run the cells under the ",(0,t.jsx)(n.strong,{children:"\ud83e\uddb9\u200d\u2640\ufe0f Combine pre-filtering with vector search"})," section in the notebook to get a sense of how to combine pre-filtering with MongoDB Atlas Vector Search."]}),"\n",(0,t.jsx)(n.admonition,{type:"caution",children:(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"DO NOT"})," actually modify the existing vector index definitions in the Atlas UI, or the existing pipeline definitions in the code."]})}),"\n",(0,t.jsx)(n.p,{children:"The answers for code blocks in this section are as follows:"}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"CODE_BLOCK_16"})}),"\n",(0,t.jsxs)(r,{children:[(0,t.jsx)("summary",{children:"Answer"}),(0,t.jsx)("div",{children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:'{\n "fields": [\n {\n "numDimensions": 1024,\n "path": "embedding",\n "similarity": "cosine",\n "type": "vector"\n },\n {\n "path": "metadata.language"\n "type": "filter"\n }\n ]\n}\n'})})})]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"CODE_BLOCK_17"})}),"\n",(0,t.jsxs)(r,{children:[(0,t.jsx)("summary",{children:"Answer"}),(0,t.jsx)("div",{children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:'[\n {\n "$vectorSearch": {\n "index": ATLAS_VECTOR_SEARCH_INDEX_NAME,\n "queryVector": query_embedding,\n "path": "embedding",\n "numCandidates": 150,\n "limit": 5,\n "filter": {"metadata.language": "en"}\n }\n },\n {\n "$project": {\n "_id": 0,\n "page_content": 1,\n "score": {"$meta": "vectorSearchScore"}\n }\n }\n]\n'})})})]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"CODE_BLOCK_18"})}),"\n",(0,t.jsxs)(r,{children:[(0,t.jsx)("summary",{children:"Answer"}),(0,t.jsx)("div",{children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:'{\n "fields": [\n {\n "numDimensions": 1024,\n "path": "embedding",\n "similarity": "cosine",\n "type": "vector"\n },\n {\n "path": "metadata.language"\n "type": "filter"\n },\n {\n "path": "type"\n "type": "filter"\n }\n ]\n}\n'})})})]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"CODE_BLOCK_19"})}),"\n",(0,t.jsxs)(r,{children:[(0,t.jsx)("summary",{children:"Answer"}),(0,t.jsx)("div",{children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:'[\n {\n "$vectorSearch": {\n "index": ATLAS_VECTOR_SEARCH_INDEX_NAME,\n "queryVector": query_embedding,\n "path": "embedding",\n "numCandidates": 150,\n "limit": 5,\n "filter": {\n "$and": [\n {"metadata.language": "en"},\n {"type": "Document"}\n ]\n }\n }\n },\n {\n "$project": {\n "_id": 0,\n "page_content": 1,\n "score": {"$meta": "vectorSearchScore"}\n }\n }\n]\n'})})})]})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}},8453:(e,n,r)=>{r.d(n,{R:()=>s,x:()=>o});var t=r(6540);const i={},c=t.createContext(i);function s(e){const n=t.useContext(c);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),t.createElement(c.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/86a88343.2b454e08.js b/assets/js/86a88343.2b454e08.js new file mode 100644 index 0000000..207ae92 --- /dev/null +++ b/assets/js/86a88343.2b454e08.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[186],{6742:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>a,contentTitle:()=>c,default:()=>h,frontMatter:()=>o,metadata:()=>s,toc:()=>d});var t=r(4848),i=r(8453);const o={},c="\ud83e\uddb9 Combine pre-filtering with vector search",s={id:"perform-semantic-search/pre-filtering",title:"\ud83e\uddb9 Combine pre-filtering with vector search",description:"Pre-filtering a technique to optimize vector search by only considering documents that match certain criteria during vector search.",source:"@site/docs/60-perform-semantic-search/4-pre-filtering.mdx",sourceDirName:"60-perform-semantic-search",slug:"/perform-semantic-search/pre-filtering",permalink:"/ai-rag-lab/docs/perform-semantic-search/pre-filtering",draft:!1,unlisted:!1,editUrl:"https://github.com/mongodb-developer/ai-rag-lab/blob/main/docs/60-perform-semantic-search/4-pre-filtering.mdx",tags:[],version:"current",sidebarPosition:4,frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udc50 Perform semantic search",permalink:"/ai-rag-lab/docs/perform-semantic-search/vector-search"},next:{title:"Build the RAG Application",permalink:"/ai-rag-lab/docs/category/build-the-rag-application"}},a={},d=[];function l(e){const n={admonition:"admonition",code:"code",h1:"h1",p:"p",pre:"pre",strong:"strong",...(0,i.R)(),...e.components},{Details:r}=n;return r||function(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{id:"-combine-pre-filtering-with-vector-search",children:"\ud83e\uddb9 Combine pre-filtering with vector search"}),"\n",(0,t.jsx)(n.p,{children:"Pre-filtering a technique to optimize vector search by only considering documents that match certain criteria during vector search."}),"\n",(0,t.jsxs)(n.p,{children:["Fill in any ",(0,t.jsx)(n.code,{children:""})," placeholders and run the cells under the ",(0,t.jsx)(n.strong,{children:"\ud83e\uddb9\u200d\u2640\ufe0f Combine pre-filtering with vector search"})," section in the notebook to get a sense of how to combine pre-filtering with MongoDB Atlas Vector Search."]}),"\n",(0,t.jsx)(n.admonition,{type:"caution",children:(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"DO NOT"})," actually modify the existing vector index definitions in the Atlas UI, or the existing pipeline definitions in the code."]})}),"\n",(0,t.jsx)(n.p,{children:"The answers for code blocks in this section are as follows:"}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"CODE_BLOCK_18"})}),"\n",(0,t.jsxs)(r,{children:[(0,t.jsx)("summary",{children:"Answer"}),(0,t.jsx)("div",{children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:'{\n "fields": [\n {\n "numDimensions": 1024,\n "path": "embedding",\n "similarity": "cosine",\n "type": "vector"\n },\n {\n "path": "metadata.contentType",\n "type": "filter"\n }\n ]\n}\n'})})})]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"CODE_BLOCK_19"})}),"\n",(0,t.jsxs)(r,{children:[(0,t.jsx)("summary",{children:"Answer"}),(0,t.jsx)("div",{children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:'[\n {\n "$vectorSearch": {\n "index": ATLAS_VECTOR_SEARCH_INDEX_NAME,\n "queryVector": query_embedding,\n "path": "embedding",\n "numCandidates": 150,\n "limit": 5,\n "filter": {"metadata.contentType": "Video"}\n }\n },\n {\n "$project": {\n "_id": 0,\n "body": 1,\n "score": {"$meta": "vectorSearchScore"}\n }\n }\n]\n'})})})]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"CODE_BLOCK_20"})}),"\n",(0,t.jsxs)(r,{children:[(0,t.jsx)("summary",{children:"Answer"}),(0,t.jsx)("div",{children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:'{\n "fields": [\n {\n "numDimensions": 1024,\n "path": "embedding",\n "similarity": "cosine",\n "type": "vector"\n },\n {\n "path": "metadata.contentType",\n "type": "filter"\n },\n {\n "path": "updated",\n "type": "filter"\n }\n ]\n}\n'})})})]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"CODE_BLOCK_21"})}),"\n",(0,t.jsxs)(r,{children:[(0,t.jsx)("summary",{children:"Answer"}),(0,t.jsx)("div",{children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:'[\n {\n "$vectorSearch": {\n "index": ATLAS_VECTOR_SEARCH_INDEX_NAME,\n "queryVector": query_embedding,\n "path": "embedding",\n "numCandidates": 150,\n "limit": 5,\n "filter": {\n "$and": [\n {"metadata.contentType": "Video"},\n {"updated": {"$gte": "2024-05-20"}}\n ]\n }\n }\n },\n {\n "$project": {\n "_id": 0,\n "body": 1,\n "score": {"$meta": "vectorSearchScore"}\n }\n }\n]\n'})})})]})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}},8453:(e,n,r)=>{r.d(n,{R:()=>c,x:()=>s});var t=r(6540);const i={},o=t.createContext(i);function c(e){const n=t.useContext(o);return t.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:c(e.components),t.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/935f2afb.79ee8854.js b/assets/js/935f2afb.3e6e8bd4.js similarity index 92% rename from assets/js/935f2afb.79ee8854.js rename to assets/js/935f2afb.3e6e8bd4.js index 600d570..d8cf0db 100644 --- a/assets/js/935f2afb.79ee8854.js +++ b/assets/js/935f2afb.3e6e8bd4.js @@ -1 +1 @@ -"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[581],{5610:e=>{e.exports=JSON.parse('{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"tutorialSidebar":[{"type":"link","label":"Introduction","href":"/ai-rag-lab/docs/intro","docId":"intro","unlisted":false},{"type":"category","label":"Retrieval Augmented Generation","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"\ud83d\udcd8 What is RAG?","href":"/ai-rag-lab/docs/rag/what-is-rag","docId":"rag/what-is-rag","unlisted":false},{"type":"link","label":"\ud83d\udcd8 RAG use cases","href":"/ai-rag-lab/docs/rag/rag-usecases","docId":"rag/rag-usecases","unlisted":false},{"type":"link","label":"\ud83d\udcd8 Components of a RAG system","href":"/ai-rag-lab/docs/rag/components-of-rag","docId":"rag/components-of-rag","unlisted":false}],"href":"/ai-rag-lab/docs/category/retrieval-augmented-generation"},{"type":"category","label":"MongoDB Atlas","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"\ud83d\udc50 Create your account","href":"/ai-rag-lab/docs/mongodb-atlas/create-account","docId":"mongodb-atlas/create-account","unlisted":false},{"type":"link","label":"\ud83d\udc50 Deploy a database cluster","href":"/ai-rag-lab/docs/mongodb-atlas/create-cluster","docId":"mongodb-atlas/create-cluster","unlisted":false},{"type":"link","label":"\ud83d\udc50 Get your connection string","href":"/ai-rag-lab/docs/mongodb-atlas/get-connection-string","docId":"mongodb-atlas/get-connection-string","unlisted":false}],"href":"/ai-rag-lab/docs/category/mongodb-atlas"},{"type":"category","label":"Fireworks AI","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"\ud83d\udc50 Create an account","href":"/ai-rag-lab/docs/fireworks-ai/create-account","docId":"fireworks-ai/create-account","unlisted":false},{"type":"link","label":"\ud83d\udc50 Create an API key","href":"/ai-rag-lab/docs/fireworks-ai/create-api-key","docId":"fireworks-ai/create-api-key","unlisted":false}],"href":"/ai-rag-lab/docs/category/fireworks-ai"},{"type":"category","label":"Dev Environment","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"\ud83d\udc50 Setup dev environment","href":"/ai-rag-lab/docs/dev-env/dev-setup","docId":"dev-env/dev-setup","unlisted":false},{"type":"link","label":"\ud83d\udc50 Setup prerequisites","href":"/ai-rag-lab/docs/dev-env/setup-pre-reqs","docId":"dev-env/setup-pre-reqs","unlisted":false}],"href":"/ai-rag-lab/docs/category/dev-environment"},{"type":"category","label":"Prepare the Data","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"\ud83d\udcd8 Tools, libraries, and concepts","href":"/ai-rag-lab/docs/prepare-the-data/concepts","docId":"prepare-the-data/concepts","unlisted":false},{"type":"link","label":"\ud83d\udc50 Load the dataset","href":"/ai-rag-lab/docs/prepare-the-data/load-data","docId":"prepare-the-data/load-data","unlisted":false},{"type":"link","label":"\ud83d\udc50 Chunk up the data","href":"/ai-rag-lab/docs/prepare-the-data/chunk-data","docId":"prepare-the-data/chunk-data","unlisted":false},{"type":"link","label":"\ud83d\udc50 Generate embeddings","href":"/ai-rag-lab/docs/prepare-the-data/embed-data","docId":"prepare-the-data/embed-data","unlisted":false},{"type":"link","label":"\ud83d\udc50 Ingest data into MongoDB","href":"/ai-rag-lab/docs/prepare-the-data/ingest-data","docId":"prepare-the-data/ingest-data","unlisted":false}],"href":"/ai-rag-lab/docs/category/prepare-the-data"},{"type":"category","label":"Perform Semantic Search on Your Data","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"\ud83d\udcd8 Tools, libraries, and concepts","href":"/ai-rag-lab/docs/perform-semantic-search/concepts","docId":"perform-semantic-search/concepts","unlisted":false},{"type":"link","label":"\ud83d\udc50 Create a vector search index","href":"/ai-rag-lab/docs/perform-semantic-search/create-vector-index","docId":"perform-semantic-search/create-vector-index","unlisted":false},{"type":"link","label":"\ud83d\udc50 Perform semantic search","href":"/ai-rag-lab/docs/perform-semantic-search/vector-search","docId":"perform-semantic-search/vector-search","unlisted":false},{"type":"link","label":"\ud83e\uddb9 Combine pre-filtering with vector search","href":"/ai-rag-lab/docs/perform-semantic-search/pre-filtering","docId":"perform-semantic-search/pre-filtering","unlisted":false}],"href":"/ai-rag-lab/docs/category/perform-semantic-search-on-your-data"},{"type":"category","label":"Build the RAG Application","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"\ud83d\udcd8 Tools, libraries, and concepts","href":"/ai-rag-lab/docs/build-rag-app/concepts","docId":"build-rag-app/concepts","unlisted":false},{"type":"link","label":"\ud83d\udc50 Build the RAG application","href":"/ai-rag-lab/docs/build-rag-app/build-rag-app","docId":"build-rag-app/build-rag-app","unlisted":false},{"type":"link","label":"\ud83e\uddb9 Stream responses from the RAG application","href":"/ai-rag-lab/docs/build-rag-app/stream-responses","docId":"build-rag-app/stream-responses","unlisted":false}],"href":"/ai-rag-lab/docs/category/build-the-rag-application"},{"type":"category","label":"Add memory to the RAG application","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"\ud83d\udcd8 Tools, libraries, and concepts","href":"/ai-rag-lab/docs/add-memory/concepts","docId":"add-memory/concepts","unlisted":false},{"type":"link","label":"\ud83d\udc50 Add memory to the RAG application","href":"/ai-rag-lab/docs/add-memory/add-memory","docId":"add-memory/add-memory","unlisted":false}],"href":"/ai-rag-lab/docs/category/add-memory-to-the-rag-application"},{"type":"link","label":"\ud83c\udfaf Summary","href":"/ai-rag-lab/docs/summary","docId":"summary","unlisted":false}]},"docs":{"add-memory/add-memory":{"id":"add-memory/add-memory","title":"\ud83d\udc50 Add memory to the RAG application","description":"In many Q&A applications we want to allow the user to have a back-and-forth conversation with the LLM, meaning the application needs some sort of \\"memory\\" of past questions and answers, and some logic for incorporating those into its current thinking. In this section, you will retrieve chat message history from MongoDB and incorporate it in your RAG application.","sidebar":"tutorialSidebar"},"add-memory/concepts":{"id":"add-memory/concepts","title":"\ud83d\udcd8 Tools, libraries, and concepts","description":"TO-DO","sidebar":"tutorialSidebar"},"build-rag-app/build-rag-app":{"id":"build-rag-app/build-rag-app","title":"\ud83d\udc50 Build the RAG application","description":"Let\'s create a simple RAG application that takes in a user query, retrieves contextually relevant documents from MongoDB Atlas, and passes the query and retrieved context to the Llama 3 8B Instruct model to generate an answer to the user question.","sidebar":"tutorialSidebar"},"build-rag-app/concepts":{"id":"build-rag-app/concepts","title":"\ud83d\udcd8 Tools, libraries, and concepts","description":"TO-DO","sidebar":"tutorialSidebar"},"build-rag-app/stream-responses":{"id":"build-rag-app/stream-responses","title":"\ud83e\uddb9 Stream responses from the RAG application","description":"By default, generation results are return once the generation is completed. Another option is to stream the results, which is useful for chat use cases where the user can incrementally see results as each token is generated.","sidebar":"tutorialSidebar"},"dev-env/dev-setup":{"id":"dev-env/dev-setup","title":"\ud83d\udc50 Setup dev environment","description":"You will be working in a Jupyter Notebook throughout this lab. The easiest and recommended way to run the lab notebook is using Google Colab.","sidebar":"tutorialSidebar"},"dev-env/setup-pre-reqs":{"id":"dev-env/setup-pre-reqs","title":"\ud83d\udc50 Setup prerequisites","description":"Fill in any `` placeholders and run the cells under the Step 1 Setup prerequisites sections in the notebook.","sidebar":"tutorialSidebar"},"fireworks-ai/create-account":{"id":"fireworks-ai/create-account","title":"\ud83d\udc50 Create an account","description":"In this lab, we will use the Llama 3 8B Instruct model hosted by Fireworks AI. Fireworks gives you $1 credit upon sign up which is plenty to experiment with industry-leading models on their platform.","sidebar":"tutorialSidebar"},"fireworks-ai/create-api-key":{"id":"fireworks-ai/create-api-key","title":"\ud83d\udc50 Create an API key","description":"If you just created a new account or want to use an existing API key, skip to the last step to copy the API key.","sidebar":"tutorialSidebar"},"intro":{"id":"intro","title":"Introduction","description":"|Lab goals|Learn how to build a RAG application from scratch|","sidebar":"tutorialSidebar"},"mongodb-atlas/create-account":{"id":"mongodb-atlas/create-account","title":"\ud83d\udc50 Create your account","description":"In this lab, you will learn how to use MongoDB Atlas as a knowledge base as well as a memory provider for RAG applications.","sidebar":"tutorialSidebar"},"mongodb-atlas/create-cluster":{"id":"mongodb-atlas/create-cluster","title":"\ud83d\udc50 Deploy a database cluster","description":"Now that you have a MongoDB Atlas account, you can create your first cluster for free.","sidebar":"tutorialSidebar"},"mongodb-atlas/get-connection-string":{"id":"mongodb-atlas/get-connection-string","title":"\ud83d\udc50 Get your connection string","description":"In order to ingest data into your cluster later in the lab, you will need to get the connection string for your cluster.","sidebar":"tutorialSidebar"},"perform-semantic-search/concepts":{"id":"perform-semantic-search/concepts","title":"\ud83d\udcd8 Tools, libraries, and concepts","description":"TO-DO","sidebar":"tutorialSidebar"},"perform-semantic-search/create-vector-index":{"id":"perform-semantic-search/create-vector-index","title":"\ud83d\udc50 Create a vector search index","description":"To retrieve documents from MongoDB using vector search, you must configure a vector search index on the collection into which you ingested your data.","sidebar":"tutorialSidebar"},"perform-semantic-search/pre-filtering":{"id":"perform-semantic-search/pre-filtering","title":"\ud83e\uddb9 Combine pre-filtering with vector search","description":"Pre-filtering a technique to optimize vector search by only considering documents that match certain criteria during vector search.","sidebar":"tutorialSidebar"},"perform-semantic-search/vector-search":{"id":"perform-semantic-search/vector-search","title":"\ud83d\udc50 Perform semantic search","description":"Now let\'s run some vector search queries against our data present in MongoDB.","sidebar":"tutorialSidebar"},"prepare-the-data/chunk-data":{"id":"prepare-the-data/chunk-data","title":"\ud83d\udc50 Chunk up the data","description":"Since we are working with large documents, we first need to break them up into smaller chunks before embedding and storing them in MongoDB.","sidebar":"tutorialSidebar"},"prepare-the-data/concepts":{"id":"prepare-the-data/concepts","title":"\ud83d\udcd8 Tools, libraries, and concepts","description":"TO-DO","sidebar":"tutorialSidebar"},"prepare-the-data/embed-data":{"id":"prepare-the-data/embed-data","title":"\ud83d\udc50 Generate embeddings","description":"To perform vector search on our data, we need to embed it (i.e. generate embedding vectors) before ingesting it into MongoDB.","sidebar":"tutorialSidebar"},"prepare-the-data/ingest-data":{"id":"prepare-the-data/ingest-data","title":"\ud83d\udc50 Ingest data into MongoDB","description":"The final step to build a MongoDB vector store for our RAG application is to ingest the embedded documents into MongoDB.","sidebar":"tutorialSidebar"},"prepare-the-data/load-data":{"id":"prepare-the-data/load-data","title":"\ud83d\udc50 Load the dataset","description":"First, let\'s download the dataset for our lab. We\'ll use four RAG-focused blogs from our Developer Center as the source data for our RAG application.","sidebar":"tutorialSidebar"},"rag/components-of-rag":{"id":"rag/components-of-rag","title":"\ud83d\udcd8 Components of a RAG system","description":"TO-DO","sidebar":"tutorialSidebar"},"rag/rag-usecases":{"id":"rag/rag-usecases","title":"\ud83d\udcd8 RAG use cases","description":"TO-DO","sidebar":"tutorialSidebar"},"rag/what-is-rag":{"id":"rag/what-is-rag","title":"\ud83d\udcd8 What is RAG?","description":"TO-DO","sidebar":"tutorialSidebar"},"summary":{"id":"summary","title":"\ud83c\udfaf Summary","description":"Congratulations! Following this lab, you have successfully:","sidebar":"tutorialSidebar"}}}')}}]); \ No newline at end of file +"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[581],{5610:e=>{e.exports=JSON.parse('{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"tutorialSidebar":[{"type":"link","label":"Introduction","href":"/ai-rag-lab/docs/intro","docId":"intro","unlisted":false},{"type":"category","label":"Retrieval Augmented Generation","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"\ud83d\udcd8 What is RAG?","href":"/ai-rag-lab/docs/rag/what-is-rag","docId":"rag/what-is-rag","unlisted":false},{"type":"link","label":"\ud83d\udcd8 RAG use cases","href":"/ai-rag-lab/docs/rag/rag-usecases","docId":"rag/rag-usecases","unlisted":false},{"type":"link","label":"\ud83d\udcd8 Components of a RAG system","href":"/ai-rag-lab/docs/rag/components-of-rag","docId":"rag/components-of-rag","unlisted":false}],"href":"/ai-rag-lab/docs/category/retrieval-augmented-generation"},{"type":"category","label":"MongoDB Atlas","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"\ud83d\udc50 Create your account","href":"/ai-rag-lab/docs/mongodb-atlas/create-account","docId":"mongodb-atlas/create-account","unlisted":false},{"type":"link","label":"\ud83d\udc50 Deploy a database cluster","href":"/ai-rag-lab/docs/mongodb-atlas/create-cluster","docId":"mongodb-atlas/create-cluster","unlisted":false},{"type":"link","label":"\ud83d\udc50 Get your connection string","href":"/ai-rag-lab/docs/mongodb-atlas/get-connection-string","docId":"mongodb-atlas/get-connection-string","unlisted":false}],"href":"/ai-rag-lab/docs/category/mongodb-atlas"},{"type":"category","label":"Fireworks AI","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"\ud83d\udc50 Create an account","href":"/ai-rag-lab/docs/fireworks-ai/create-account","docId":"fireworks-ai/create-account","unlisted":false},{"type":"link","label":"\ud83d\udc50 Create an API key","href":"/ai-rag-lab/docs/fireworks-ai/create-api-key","docId":"fireworks-ai/create-api-key","unlisted":false}],"href":"/ai-rag-lab/docs/category/fireworks-ai"},{"type":"category","label":"Dev Environment","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"\ud83d\udc50 Setup dev environment","href":"/ai-rag-lab/docs/dev-env/dev-setup","docId":"dev-env/dev-setup","unlisted":false},{"type":"link","label":"\ud83d\udc50 Setup prerequisites","href":"/ai-rag-lab/docs/dev-env/setup-pre-reqs","docId":"dev-env/setup-pre-reqs","unlisted":false}],"href":"/ai-rag-lab/docs/category/dev-environment"},{"type":"category","label":"Prepare the Data","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"\ud83d\udcd8 Tools, libraries, and concepts","href":"/ai-rag-lab/docs/prepare-the-data/concepts","docId":"prepare-the-data/concepts","unlisted":false},{"type":"link","label":"\ud83d\udc50 Load the dataset","href":"/ai-rag-lab/docs/prepare-the-data/load-data","docId":"prepare-the-data/load-data","unlisted":false},{"type":"link","label":"\ud83d\udc50 Chunk up the data","href":"/ai-rag-lab/docs/prepare-the-data/chunk-data","docId":"prepare-the-data/chunk-data","unlisted":false},{"type":"link","label":"\ud83d\udc50 Generate embeddings","href":"/ai-rag-lab/docs/prepare-the-data/embed-data","docId":"prepare-the-data/embed-data","unlisted":false},{"type":"link","label":"\ud83d\udc50 Ingest data into MongoDB","href":"/ai-rag-lab/docs/prepare-the-data/ingest-data","docId":"prepare-the-data/ingest-data","unlisted":false}],"href":"/ai-rag-lab/docs/category/prepare-the-data"},{"type":"category","label":"Perform Semantic Search on Your Data","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"\ud83d\udcd8 Tools, libraries, and concepts","href":"/ai-rag-lab/docs/perform-semantic-search/concepts","docId":"perform-semantic-search/concepts","unlisted":false},{"type":"link","label":"\ud83d\udc50 Create a vector search index","href":"/ai-rag-lab/docs/perform-semantic-search/create-vector-index","docId":"perform-semantic-search/create-vector-index","unlisted":false},{"type":"link","label":"\ud83d\udc50 Perform semantic search","href":"/ai-rag-lab/docs/perform-semantic-search/vector-search","docId":"perform-semantic-search/vector-search","unlisted":false},{"type":"link","label":"\ud83e\uddb9 Combine pre-filtering with vector search","href":"/ai-rag-lab/docs/perform-semantic-search/pre-filtering","docId":"perform-semantic-search/pre-filtering","unlisted":false}],"href":"/ai-rag-lab/docs/category/perform-semantic-search-on-your-data"},{"type":"category","label":"Build the RAG Application","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"\ud83d\udcd8 Tools, libraries, and concepts","href":"/ai-rag-lab/docs/build-rag-app/concepts","docId":"build-rag-app/concepts","unlisted":false},{"type":"link","label":"\ud83d\udc50 Build the RAG application","href":"/ai-rag-lab/docs/build-rag-app/build-rag-app","docId":"build-rag-app/build-rag-app","unlisted":false},{"type":"link","label":"\ud83e\uddb9 Stream responses from the RAG application","href":"/ai-rag-lab/docs/build-rag-app/stream-responses","docId":"build-rag-app/stream-responses","unlisted":false}],"href":"/ai-rag-lab/docs/category/build-the-rag-application"},{"type":"category","label":"Add memory to the RAG application","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"\ud83d\udcd8 Tools, libraries, and concepts","href":"/ai-rag-lab/docs/add-memory/concepts","docId":"add-memory/concepts","unlisted":false},{"type":"link","label":"\ud83d\udc50 Add memory to the RAG application","href":"/ai-rag-lab/docs/add-memory/add-memory","docId":"add-memory/add-memory","unlisted":false}],"href":"/ai-rag-lab/docs/category/add-memory-to-the-rag-application"},{"type":"link","label":"\ud83c\udfaf Summary","href":"/ai-rag-lab/docs/summary","docId":"summary","unlisted":false}]},"docs":{"add-memory/add-memory":{"id":"add-memory/add-memory","title":"\ud83d\udc50 Add memory to the RAG application","description":"In many Q&A applications we want to allow the user to have a back-and-forth conversation with the LLM, meaning the application needs some sort of \\"memory\\" of past questions and answers, and some logic for incorporating those into its current thinking. In this section, you will retrieve chat message history from MongoDB and incorporate it in your RAG application.","sidebar":"tutorialSidebar"},"add-memory/concepts":{"id":"add-memory/concepts","title":"\ud83d\udcd8 Tools, libraries, and concepts","description":"TO-DO","sidebar":"tutorialSidebar"},"build-rag-app/build-rag-app":{"id":"build-rag-app/build-rag-app","title":"\ud83d\udc50 Build the RAG application","description":"Let\'s create a simple RAG application that takes in a user query, retrieves contextually relevant documents from MongoDB Atlas, and passes the query and retrieved context to the Llama 3 8B Instruct model to generate an answer to the user question.","sidebar":"tutorialSidebar"},"build-rag-app/concepts":{"id":"build-rag-app/concepts","title":"\ud83d\udcd8 Tools, libraries, and concepts","description":"TO-DO","sidebar":"tutorialSidebar"},"build-rag-app/stream-responses":{"id":"build-rag-app/stream-responses","title":"\ud83e\uddb9 Stream responses from the RAG application","description":"By default, generation results are return once the generation is completed. Another option is to stream the results, which is useful for chat use cases where the user can incrementally see results as each token is generated.","sidebar":"tutorialSidebar"},"dev-env/dev-setup":{"id":"dev-env/dev-setup","title":"\ud83d\udc50 Setup dev environment","description":"You will be working in a Jupyter Notebook throughout this lab. The easiest and recommended way to run the lab notebook is using Google Colab.","sidebar":"tutorialSidebar"},"dev-env/setup-pre-reqs":{"id":"dev-env/setup-pre-reqs","title":"\ud83d\udc50 Setup prerequisites","description":"Fill in any `` placeholders and run the cells under the Step 1 Setup prerequisites sections in the notebook.","sidebar":"tutorialSidebar"},"fireworks-ai/create-account":{"id":"fireworks-ai/create-account","title":"\ud83d\udc50 Create an account","description":"In this lab, we will use the Llama 3 8B Instruct model hosted by Fireworks AI. Fireworks gives you $1 credit upon sign up which is plenty to experiment with industry-leading models on their platform.","sidebar":"tutorialSidebar"},"fireworks-ai/create-api-key":{"id":"fireworks-ai/create-api-key","title":"\ud83d\udc50 Create an API key","description":"If you just created a new account or want to use an existing API key, skip to the last step to copy the API key.","sidebar":"tutorialSidebar"},"intro":{"id":"intro","title":"Introduction","description":"|Lab goals|Learn how to build a RAG application from scratch|","sidebar":"tutorialSidebar"},"mongodb-atlas/create-account":{"id":"mongodb-atlas/create-account","title":"\ud83d\udc50 Create your account","description":"In this lab, you will learn how to use MongoDB Atlas as a knowledge base as well as a memory provider for RAG applications.","sidebar":"tutorialSidebar"},"mongodb-atlas/create-cluster":{"id":"mongodb-atlas/create-cluster","title":"\ud83d\udc50 Deploy a database cluster","description":"Now that you have a MongoDB Atlas account, you can create your first cluster for free.","sidebar":"tutorialSidebar"},"mongodb-atlas/get-connection-string":{"id":"mongodb-atlas/get-connection-string","title":"\ud83d\udc50 Get your connection string","description":"In order to ingest data into your cluster later in the lab, you will need to get the connection string for your cluster.","sidebar":"tutorialSidebar"},"perform-semantic-search/concepts":{"id":"perform-semantic-search/concepts","title":"\ud83d\udcd8 Tools, libraries, and concepts","description":"TO-DO","sidebar":"tutorialSidebar"},"perform-semantic-search/create-vector-index":{"id":"perform-semantic-search/create-vector-index","title":"\ud83d\udc50 Create a vector search index","description":"To retrieve documents from MongoDB using vector search, you must configure a vector search index on the collection into which you ingested your data.","sidebar":"tutorialSidebar"},"perform-semantic-search/pre-filtering":{"id":"perform-semantic-search/pre-filtering","title":"\ud83e\uddb9 Combine pre-filtering with vector search","description":"Pre-filtering a technique to optimize vector search by only considering documents that match certain criteria during vector search.","sidebar":"tutorialSidebar"},"perform-semantic-search/vector-search":{"id":"perform-semantic-search/vector-search","title":"\ud83d\udc50 Perform semantic search","description":"Now let\'s run some vector search queries against our data present in MongoDB.","sidebar":"tutorialSidebar"},"prepare-the-data/chunk-data":{"id":"prepare-the-data/chunk-data","title":"\ud83d\udc50 Chunk up the data","description":"Since we are working with large documents, we first need to break them up into smaller chunks before embedding and storing them in MongoDB.","sidebar":"tutorialSidebar"},"prepare-the-data/concepts":{"id":"prepare-the-data/concepts","title":"\ud83d\udcd8 Tools, libraries, and concepts","description":"TO-DO","sidebar":"tutorialSidebar"},"prepare-the-data/embed-data":{"id":"prepare-the-data/embed-data","title":"\ud83d\udc50 Generate embeddings","description":"To perform vector search on our data, we need to embed it (i.e. generate embedding vectors) before ingesting it into MongoDB.","sidebar":"tutorialSidebar"},"prepare-the-data/ingest-data":{"id":"prepare-the-data/ingest-data","title":"\ud83d\udc50 Ingest data into MongoDB","description":"The final step to build a MongoDB vector store for our RAG application is to ingest the embedded article chunks into MongoDB.","sidebar":"tutorialSidebar"},"prepare-the-data/load-data":{"id":"prepare-the-data/load-data","title":"\ud83d\udc50 Load the dataset","description":"First, let\'s download the dataset for our lab. We\'ll use a subset of articles from the MongoDB Developer Center as the source data for our RAG application.","sidebar":"tutorialSidebar"},"rag/components-of-rag":{"id":"rag/components-of-rag","title":"\ud83d\udcd8 Components of a RAG system","description":"TO-DO","sidebar":"tutorialSidebar"},"rag/rag-usecases":{"id":"rag/rag-usecases","title":"\ud83d\udcd8 RAG use cases","description":"TO-DO","sidebar":"tutorialSidebar"},"rag/what-is-rag":{"id":"rag/what-is-rag","title":"\ud83d\udcd8 What is RAG?","description":"TO-DO","sidebar":"tutorialSidebar"},"summary":{"id":"summary","title":"\ud83c\udfaf Summary","description":"Congratulations! Following this lab, you have successfully:","sidebar":"tutorialSidebar"}}}')}}]); \ No newline at end of file diff --git a/assets/js/b4a30052.817119b7.js b/assets/js/b4a30052.55a38f09.js similarity index 69% rename from assets/js/b4a30052.817119b7.js rename to assets/js/b4a30052.55a38f09.js index 7669591..ea42827 100644 --- a/assets/js/b4a30052.817119b7.js +++ b/assets/js/b4a30052.55a38f09.js @@ -1 +1 @@ -"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[244],{3864:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>o,default:()=>p,frontMatter:()=>a,metadata:()=>i,toc:()=>c});var r=t(4848),s=t(8453);const a={},o="\ud83d\udc50 Build the RAG application",i={id:"build-rag-app/build-rag-app",title:"\ud83d\udc50 Build the RAG application",description:"Let's create a simple RAG application that takes in a user query, retrieves contextually relevant documents from MongoDB Atlas, and passes the query and retrieved context to the Llama 3 8B Instruct model to generate an answer to the user question.",source:"@site/docs/70-build-rag-app/2-build-rag-app.mdx",sourceDirName:"70-build-rag-app",slug:"/build-rag-app/build-rag-app",permalink:"/ai-rag-lab/docs/build-rag-app/build-rag-app",draft:!1,unlisted:!1,editUrl:"https://github.com/mongodb-developer/ai-rag-lab/blob/main/docs/70-build-rag-app/2-build-rag-app.mdx",tags:[],version:"current",sidebarPosition:2,frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udcd8 Tools, libraries, and concepts",permalink:"/ai-rag-lab/docs/build-rag-app/concepts"},next:{title:"\ud83e\uddb9 Stream responses from the RAG application",permalink:"/ai-rag-lab/docs/build-rag-app/stream-responses"}},l={},c=[];function d(e){const n={code:"code",em:"em",h1:"h1",p:"p",pre:"pre",strong:"strong",...(0,s.R)(),...e.components},{Details:t}=n;return t||function(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{id:"-build-the-rag-application",children:"\ud83d\udc50 Build the RAG application"}),"\n",(0,r.jsxs)(n.p,{children:["Let's create a simple RAG application that takes in a user query, retrieves contextually relevant documents from MongoDB Atlas, and passes the query and retrieved context to the ",(0,r.jsx)(n.em,{children:"Llama 3 8B Instruct"})," model to generate an answer to the user question."]}),"\n",(0,r.jsxs)(n.p,{children:["Fill in any ",(0,r.jsx)(n.code,{children:""})," placeholders and run the cells under the ",(0,r.jsx)(n.strong,{children:"Step 9: Build the RAG application"})," section in the notebook to build the RAG application."]}),"\n",(0,r.jsx)(n.p,{children:"The answers for code blocks in this section are as follows:"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"CODE_BLOCK_20"})}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"vector_search(user_query)\n"})})})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"CODE_BLOCK_21"})}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:'"\\n\\n".join([d.get("page_content", "") for d in context])\n'})})})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"CODE_BLOCK_22"})}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:'response = fw_client.chat.completions.create(\n model=model,\n temperature=0,\n messages=[\n {\n "role": "user",\n "content": create_prompt(user_query),\n }\n ],\n)\nprint(response.choices[0].message.content)\n'})})})]})]})}function p(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>i});var r=t(6540);const s={},a=r.createContext(s);function o(e){const n=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),r.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[244],{3864:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>o,default:()=>p,frontMatter:()=>a,metadata:()=>i,toc:()=>c});var r=t(4848),s=t(8453);const a={},o="\ud83d\udc50 Build the RAG application",i={id:"build-rag-app/build-rag-app",title:"\ud83d\udc50 Build the RAG application",description:"Let's create a simple RAG application that takes in a user query, retrieves contextually relevant documents from MongoDB Atlas, and passes the query and retrieved context to the Llama 3 8B Instruct model to generate an answer to the user question.",source:"@site/docs/70-build-rag-app/2-build-rag-app.mdx",sourceDirName:"70-build-rag-app",slug:"/build-rag-app/build-rag-app",permalink:"/ai-rag-lab/docs/build-rag-app/build-rag-app",draft:!1,unlisted:!1,editUrl:"https://github.com/mongodb-developer/ai-rag-lab/blob/main/docs/70-build-rag-app/2-build-rag-app.mdx",tags:[],version:"current",sidebarPosition:2,frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udcd8 Tools, libraries, and concepts",permalink:"/ai-rag-lab/docs/build-rag-app/concepts"},next:{title:"\ud83e\uddb9 Stream responses from the RAG application",permalink:"/ai-rag-lab/docs/build-rag-app/stream-responses"}},l={},c=[];function d(e){const n={code:"code",em:"em",h1:"h1",p:"p",pre:"pre",strong:"strong",...(0,s.R)(),...e.components},{Details:t}=n;return t||function(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{id:"-build-the-rag-application",children:"\ud83d\udc50 Build the RAG application"}),"\n",(0,r.jsxs)(n.p,{children:["Let's create a simple RAG application that takes in a user query, retrieves contextually relevant documents from MongoDB Atlas, and passes the query and retrieved context to the ",(0,r.jsx)(n.em,{children:"Llama 3 8B Instruct"})," model to generate an answer to the user question."]}),"\n",(0,r.jsxs)(n.p,{children:["Fill in any ",(0,r.jsx)(n.code,{children:""})," placeholders and run the cells under the ",(0,r.jsx)(n.strong,{children:"Step 9: Build the RAG application"})," section in the notebook to build the RAG application."]}),"\n",(0,r.jsx)(n.p,{children:"The answers for code blocks in this section are as follows:"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"CODE_BLOCK_22"})}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"vector_search(user_query)\n"})})})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"CODE_BLOCK_23"})}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:'"\\n\\n".join([d.get("body", "") for d in context])\n'})})})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"CODE_BLOCK_24"})}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:'response = fw_client.chat.completions.create(\n model=model,\n temperature=0,\n messages=[\n {\n "role": "user",\n "content": create_prompt(user_query),\n }\n ],\n)\nprint(response.choices[0].message.content)\n'})})})]})]})}function p(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>i});var r=t(6540);const s={},a=r.createContext(s);function o(e){const n=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),r.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e962eb68.1ca3324e.js b/assets/js/e962eb68.1ca3324e.js new file mode 100644 index 0000000..2d0d9de --- /dev/null +++ b/assets/js/e962eb68.1ca3324e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[214],{1634:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>o,default:()=>h,frontMatter:()=>a,metadata:()=>i,toc:()=>d});var s=t(4848),r=t(8453);t(1179);const a={},o="\ud83d\udc50 Ingest data into MongoDB",i={id:"prepare-the-data/ingest-data",title:"\ud83d\udc50 Ingest data into MongoDB",description:"The final step to build a MongoDB vector store for our RAG application is to ingest the embedded article chunks into MongoDB.",source:"@site/docs/50-prepare-the-data/5-ingest-data.mdx",sourceDirName:"50-prepare-the-data",slug:"/prepare-the-data/ingest-data",permalink:"/ai-rag-lab/docs/prepare-the-data/ingest-data",draft:!1,unlisted:!1,editUrl:"https://github.com/mongodb-developer/ai-rag-lab/blob/main/docs/50-prepare-the-data/5-ingest-data.mdx",tags:[],version:"current",sidebarPosition:5,frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udc50 Generate embeddings",permalink:"/ai-rag-lab/docs/prepare-the-data/embed-data"},next:{title:"Perform Semantic Search on Your Data",permalink:"/ai-rag-lab/docs/category/perform-semantic-search-on-your-data"}},c={},d=[];function l(e){const n={code:"code",h1:"h1",p:"p",pre:"pre",strong:"strong",...(0,r.R)(),...e.components},{Details:t}=n;return t||function(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{id:"-ingest-data-into-mongodb",children:"\ud83d\udc50 Ingest data into MongoDB"}),"\n",(0,s.jsx)(n.p,{children:"The final step to build a MongoDB vector store for our RAG application is to ingest the embedded article chunks into MongoDB."}),"\n",(0,s.jsxs)(n.p,{children:["Fill in any ",(0,s.jsx)(n.code,{children:""})," placeholders and run the cells under the ",(0,s.jsx)(n.strong,{children:"Step 6: Ingest data into MongoDB"})," section in the notebook to ingest the embedded documents into MongoDB."]}),"\n",(0,s.jsx)(n.p,{children:"The answers for code blocks in this section are as follows:"}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"CODE_BLOCK_11"})}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Answer"}),(0,s.jsx)("div",{children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"MongoClient(MONGODB_URI)\n"})})})]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"CODE_BLOCK_12"})}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Answer"}),(0,s.jsx)("div",{children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"mongo_client[DB_NAME][COLLECTION_NAME]\n"})})})]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"CODE_BLOCK_13"})}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Answer"}),(0,s.jsx)("div",{children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"collection.delete_many({})\n"})})})]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"CODE_BLOCK_14"})}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Answer"}),(0,s.jsx)("div",{children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"collection.insert_many(embedded_docs)\n"})})})]})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},1179:(e,n,t)=>{t.d(n,{A:()=>o});t(6540);var s=t(4848);function r(e){const n=e.url||"http://localhost:3000";return(0,s.jsxs)("div",{className:"browser container",children:[(0,s.jsxs)("div",{className:"row",children:[(0,s.jsxs)("div",{className:"column left",children:[(0,s.jsx)("span",{className:"dot",style:{background:"#ED594A"}}),(0,s.jsx)("span",{className:"dot",style:{background:"#FDD800"}}),(0,s.jsx)("span",{className:"dot",style:{background:"#5AC05A"}})]}),(0,s.jsx)("div",{className:"column middle",children:(0,s.jsx)("input",{type:"text",value:n})}),(0,s.jsx)("div",{className:"column right",children:(0,s.jsxs)("div",{style:{float:"right"},children:[(0,s.jsx)("span",{className:"bar"}),(0,s.jsx)("span",{className:"bar"}),(0,s.jsx)("span",{className:"bar"})]})})]}),(0,s.jsx)("div",{className:"content",children:e.children})]})}var a=t(8180);function o(e){return(0,s.jsx)(r,{...e,children:(0,s.jsx)("img",{src:(0,a.A)(e.src),alt:e.alt})})}},8453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>i});var s=t(6540);const r={},a=s.createContext(r);function o(e){const n=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),s.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e962eb68.553a252a.js b/assets/js/e962eb68.553a252a.js deleted file mode 100644 index 6bc4a8b..0000000 --- a/assets/js/e962eb68.553a252a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[214],{1634:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>o,default:()=>h,frontMatter:()=>a,metadata:()=>i,toc:()=>c});var s=t(4848),r=t(8453);t(1179);const a={},o="\ud83d\udc50 Ingest data into MongoDB",i={id:"prepare-the-data/ingest-data",title:"\ud83d\udc50 Ingest data into MongoDB",description:"The final step to build a MongoDB vector store for our RAG application is to ingest the embedded documents into MongoDB.",source:"@site/docs/50-prepare-the-data/5-ingest-data.mdx",sourceDirName:"50-prepare-the-data",slug:"/prepare-the-data/ingest-data",permalink:"/ai-rag-lab/docs/prepare-the-data/ingest-data",draft:!1,unlisted:!1,editUrl:"https://github.com/mongodb-developer/ai-rag-lab/blob/main/docs/50-prepare-the-data/5-ingest-data.mdx",tags:[],version:"current",sidebarPosition:5,frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udc50 Generate embeddings",permalink:"/ai-rag-lab/docs/prepare-the-data/embed-data"},next:{title:"Perform Semantic Search on Your Data",permalink:"/ai-rag-lab/docs/category/perform-semantic-search-on-your-data"}},d={},c=[];function l(e){const n={code:"code",h1:"h1",p:"p",pre:"pre",strong:"strong",...(0,r.R)(),...e.components},{Details:t}=n;return t||function(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{id:"-ingest-data-into-mongodb",children:"\ud83d\udc50 Ingest data into MongoDB"}),"\n",(0,s.jsx)(n.p,{children:"The final step to build a MongoDB vector store for our RAG application is to ingest the embedded documents into MongoDB."}),"\n",(0,s.jsxs)(n.p,{children:["Fill in any ",(0,s.jsx)(n.code,{children:""})," placeholders and run the cells under the ",(0,s.jsx)(n.strong,{children:"Step 6: Ingest data into MongoDB"})," section in the notebook to ingest the embedded documents into MongoDB."]}),"\n",(0,s.jsx)(n.p,{children:"The answers for code blocks in this section are as follows:"}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"CODE_BLOCK_9"})}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Answer"}),(0,s.jsx)("div",{children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"MongoClient(MONGODB_URI)\n"})})})]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"CODE_BLOCK_10"})}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Answer"}),(0,s.jsx)("div",{children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"mongo_client[DB_NAME][COLLECTION_NAME]\n"})})})]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"CODE_BLOCK_11"})}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Answer"}),(0,s.jsx)("div",{children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"collection.delete_many({})\n"})})})]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"CODE_BLOCK_12"})}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Answer"}),(0,s.jsx)("div",{children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"collection.insert_many(embedded_docs)\n"})})})]})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},1179:(e,n,t)=>{t.d(n,{A:()=>o});t(6540);var s=t(4848);function r(e){const n=e.url||"http://localhost:3000";return(0,s.jsxs)("div",{className:"browser container",children:[(0,s.jsxs)("div",{className:"row",children:[(0,s.jsxs)("div",{className:"column left",children:[(0,s.jsx)("span",{className:"dot",style:{background:"#ED594A"}}),(0,s.jsx)("span",{className:"dot",style:{background:"#FDD800"}}),(0,s.jsx)("span",{className:"dot",style:{background:"#5AC05A"}})]}),(0,s.jsx)("div",{className:"column middle",children:(0,s.jsx)("input",{type:"text",value:n})}),(0,s.jsx)("div",{className:"column right",children:(0,s.jsxs)("div",{style:{float:"right"},children:[(0,s.jsx)("span",{className:"bar"}),(0,s.jsx)("span",{className:"bar"}),(0,s.jsx)("span",{className:"bar"})]})})]}),(0,s.jsx)("div",{className:"content",children:e.children})]})}var a=t(8180);function o(e){return(0,s.jsx)(r,{...e,children:(0,s.jsx)("img",{src:(0,a.A)(e.src),alt:e.alt})})}},8453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>i});var s=t(6540);const r={},a=s.createContext(r);function o(e){const n=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),s.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/runtime~main.2f67ed2d.js b/assets/js/runtime~main.2f67ed2d.js new file mode 100644 index 0000000..4ed0a12 --- /dev/null +++ b/assets/js/runtime~main.2f67ed2d.js @@ -0,0 +1 @@ +(()=>{"use strict";var e,a,r,t,f,d={},b={};function o(e){var a=b[e];if(void 0!==a)return a.exports;var r=b[e]={exports:{}};return d[e].call(r.exports,r,r.exports,o),r.exports}o.m=d,e=[],o.O=(a,r,t,f)=>{if(!r){var d=1/0;for(i=0;i=f)&&Object.keys(o.O).every((e=>o.O[e](r[c])))?r.splice(c--,1):(b=!1,f0&&e[i-1][2]>f;i--)e[i]=e[i-1];e[i]=[r,t,f]},o.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return o.d(a,{a:a}),a},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if("object"==typeof e&&e){if(4&t&&e.__esModule)return e;if(16&t&&"function"==typeof e.then)return e}var f=Object.create(null);o.r(f);var d={};a=a||[null,r({}),r([]),r(r)];for(var b=2&t&&e;"object"==typeof b&&!~a.indexOf(b);b=r(b))Object.getOwnPropertyNames(b).forEach((a=>d[a]=()=>e[a]));return d.default=()=>e,o.d(f,d),f},o.d=(e,a)=>{for(var r in a)o.o(a,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:a[r]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce(((a,r)=>(o.f[r](e,a),a)),[])),o.u=e=>"assets/js/"+({24:"0e16189c",48:"a94703ab",93:"3aaaf183",98:"a7bd4aaa",142:"d6501d9d",186:"86a88343",199:"412449fd",214:"e962eb68",244:"b4a30052",254:"400dfa73",256:"72d756b8",260:"798f680c",262:"8be1a27a",290:"a17e1ad5",301:"6e787a66",350:"45b31a90",401:"17896441",426:"a541a3e1",454:"47cd1b4f",458:"2a2ea0d2",459:"f23f5105",462:"3bf69056",507:"843aaef4",548:"49a3b57d",581:"935f2afb",634:"c4f5d8e4",647:"5e95c892",676:"e6ef851e",710:"d09226b2",711:"7a749954",723:"c8620672",730:"6bb24948",799:"aac38d6b",807:"350ab7ce",839:"6effaccf",850:"36d48778",888:"ade674ed",902:"fa1a64f0",903:"f8409a7e",906:"bac890e3",969:"14eb3368",970:"88870176",983:"88a0bd0a",988:"36c22dfc"}[e]||e)+"."+{24:"a1f4e1c8",48:"d13df985",93:"43320edc",98:"80c64d81",142:"30b1cff3",186:"2b454e08",199:"40d85668",214:"1ca3324e",244:"55a38f09",254:"c1d11f2d",256:"6f853c74",260:"a41a8674",262:"32bf80d7",290:"e3ab0070",301:"9d388fff",350:"1e1e7bb2",401:"a68ad7e9",426:"f78ba885",454:"824505db",458:"3e29ed5c",459:"a61891e2",462:"c197860e",507:"5e102587",548:"9434d500",560:"a9c1cb91",581:"3e6e8bd4",634:"f3a98f32",647:"ad038dcd",676:"5c9e4a8a",710:"3ce758ff",711:"9ff7b4ad",723:"afc66b2e",730:"a8c7173d",799:"f6a68545",807:"e4dd0929",839:"e37cfb28",850:"2c5dfe77",888:"52ec81a8",902:"de0e697b",903:"dfa7efb2",904:"497d6008",906:"7998ec6f",969:"f8033aa7",970:"6337458e",983:"6aa81761",988:"b38987cc"}[e]+".js",o.miniCssF=e=>{},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),t={},f="ai-rag-lab:",o.l=(e,a,r,d)=>{if(t[e])t[e].push(a);else{var b,c;if(void 0!==r)for(var n=document.getElementsByTagName("script"),i=0;i{b.onerror=b.onload=null,clearTimeout(s);var f=t[e];if(delete t[e],b.parentNode&&b.parentNode.removeChild(b),f&&f.forEach((e=>e(r))),a)return a(r)},s=setTimeout(u.bind(null,void 0,{type:"timeout",target:b}),12e4);b.onerror=u.bind(null,b.onerror),b.onload=u.bind(null,b.onload),c&&document.head.appendChild(b)}},o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.p="/ai-rag-lab/",o.gca=function(e){return e={17896441:"401",88870176:"970","0e16189c":"24",a94703ab:"48","3aaaf183":"93",a7bd4aaa:"98",d6501d9d:"142","86a88343":"186","412449fd":"199",e962eb68:"214",b4a30052:"244","400dfa73":"254","72d756b8":"256","798f680c":"260","8be1a27a":"262",a17e1ad5:"290","6e787a66":"301","45b31a90":"350",a541a3e1:"426","47cd1b4f":"454","2a2ea0d2":"458",f23f5105:"459","3bf69056":"462","843aaef4":"507","49a3b57d":"548","935f2afb":"581",c4f5d8e4:"634","5e95c892":"647",e6ef851e:"676",d09226b2:"710","7a749954":"711",c8620672:"723","6bb24948":"730",aac38d6b:"799","350ab7ce":"807","6effaccf":"839","36d48778":"850",ade674ed:"888",fa1a64f0:"902",f8409a7e:"903",bac890e3:"906","14eb3368":"969","88a0bd0a":"983","36c22dfc":"988"}[e]||e,o.p+o.u(e)},(()=>{var e={354:0,869:0};o.f.j=(a,r)=>{var t=o.o(e,a)?e[a]:void 0;if(0!==t)if(t)r.push(t[2]);else if(/^(354|869)$/.test(a))e[a]=0;else{var f=new Promise(((r,f)=>t=e[a]=[r,f]));r.push(t[2]=f);var d=o.p+o.u(a),b=new Error;o.l(d,(r=>{if(o.o(e,a)&&(0!==(t=e[a])&&(e[a]=void 0),t)){var f=r&&("load"===r.type?"missing":r.type),d=r&&r.target&&r.target.src;b.message="Loading chunk "+a+" failed.\n("+f+": "+d+")",b.name="ChunkLoadError",b.type=f,b.request=d,t[1](b)}}),"chunk-"+a,a)}},o.O.j=a=>0===e[a];var a=(a,r)=>{var t,f,d=r[0],b=r[1],c=r[2],n=0;if(d.some((a=>0!==e[a]))){for(t in b)o.o(b,t)&&(o.m[t]=b[t]);if(c)var i=c(o)}for(a&&a(r);n{"use strict";var e,a,r,t,f,b={},c={};function d(e){var a=c[e];if(void 0!==a)return a.exports;var r=c[e]={exports:{}};return b[e].call(r.exports,r,r.exports,d),r.exports}d.m=b,e=[],d.O=(a,r,t,f)=>{if(!r){var b=1/0;for(i=0;i=f)&&Object.keys(d.O).every((e=>d.O[e](r[o])))?r.splice(o--,1):(c=!1,f0&&e[i-1][2]>f;i--)e[i]=e[i-1];e[i]=[r,t,f]},d.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return d.d(a,{a:a}),a},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,d.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if("object"==typeof e&&e){if(4&t&&e.__esModule)return e;if(16&t&&"function"==typeof e.then)return e}var f=Object.create(null);d.r(f);var b={};a=a||[null,r({}),r([]),r(r)];for(var c=2&t&&e;"object"==typeof c&&!~a.indexOf(c);c=r(c))Object.getOwnPropertyNames(c).forEach((a=>b[a]=()=>e[a]));return b.default=()=>e,d.d(f,b),f},d.d=(e,a)=>{for(var r in a)d.o(a,r)&&!d.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:a[r]})},d.f={},d.e=e=>Promise.all(Object.keys(d.f).reduce(((a,r)=>(d.f[r](e,a),a)),[])),d.u=e=>"assets/js/"+({24:"0e16189c",48:"a94703ab",93:"3aaaf183",98:"a7bd4aaa",142:"d6501d9d",186:"86a88343",199:"412449fd",214:"e962eb68",244:"b4a30052",254:"400dfa73",256:"72d756b8",260:"798f680c",262:"8be1a27a",290:"a17e1ad5",301:"6e787a66",350:"45b31a90",401:"17896441",426:"a541a3e1",454:"47cd1b4f",458:"2a2ea0d2",459:"f23f5105",462:"3bf69056",507:"843aaef4",548:"49a3b57d",581:"935f2afb",634:"c4f5d8e4",647:"5e95c892",676:"e6ef851e",710:"d09226b2",711:"7a749954",723:"c8620672",730:"6bb24948",799:"aac38d6b",807:"350ab7ce",839:"6effaccf",850:"36d48778",888:"ade674ed",902:"fa1a64f0",903:"f8409a7e",906:"bac890e3",969:"14eb3368",970:"88870176",983:"88a0bd0a",988:"36c22dfc"}[e]||e)+"."+{24:"a1f4e1c8",48:"d13df985",93:"43320edc",98:"80c64d81",142:"30b1cff3",186:"06af0347",199:"af4de671",214:"553a252a",244:"817119b7",254:"066bb592",256:"6f853c74",260:"25be884e",262:"32bf80d7",290:"e3ab0070",301:"a2076857",350:"1e1e7bb2",401:"a68ad7e9",426:"f78ba885",454:"824505db",458:"3e29ed5c",459:"a61891e2",462:"c197860e",507:"943b71c4",548:"9434d500",560:"a9c1cb91",581:"79ee8854",634:"f3a98f32",647:"ad038dcd",676:"5c9e4a8a",710:"3ce758ff",711:"9ff7b4ad",723:"afc66b2e",730:"a8c7173d",799:"f6a68545",807:"e4dd0929",839:"1662c470",850:"2c5dfe77",888:"52ec81a8",902:"de0e697b",903:"dfa7efb2",904:"497d6008",906:"7998ec6f",969:"f8033aa7",970:"6337458e",983:"6aa81761",988:"b38987cc"}[e]+".js",d.miniCssF=e=>{},d.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),d.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),t={},f="ai-rag-lab:",d.l=(e,a,r,b)=>{if(t[e])t[e].push(a);else{var c,o;if(void 0!==r)for(var n=document.getElementsByTagName("script"),i=0;i{c.onerror=c.onload=null,clearTimeout(s);var f=t[e];if(delete t[e],c.parentNode&&c.parentNode.removeChild(c),f&&f.forEach((e=>e(r))),a)return a(r)},s=setTimeout(u.bind(null,void 0,{type:"timeout",target:c}),12e4);c.onerror=u.bind(null,c.onerror),c.onload=u.bind(null,c.onload),o&&document.head.appendChild(c)}},d.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},d.p="/ai-rag-lab/",d.gca=function(e){return e={17896441:"401",88870176:"970","0e16189c":"24",a94703ab:"48","3aaaf183":"93",a7bd4aaa:"98",d6501d9d:"142","86a88343":"186","412449fd":"199",e962eb68:"214",b4a30052:"244","400dfa73":"254","72d756b8":"256","798f680c":"260","8be1a27a":"262",a17e1ad5:"290","6e787a66":"301","45b31a90":"350",a541a3e1:"426","47cd1b4f":"454","2a2ea0d2":"458",f23f5105:"459","3bf69056":"462","843aaef4":"507","49a3b57d":"548","935f2afb":"581",c4f5d8e4:"634","5e95c892":"647",e6ef851e:"676",d09226b2:"710","7a749954":"711",c8620672:"723","6bb24948":"730",aac38d6b:"799","350ab7ce":"807","6effaccf":"839","36d48778":"850",ade674ed:"888",fa1a64f0:"902",f8409a7e:"903",bac890e3:"906","14eb3368":"969","88a0bd0a":"983","36c22dfc":"988"}[e]||e,d.p+d.u(e)},(()=>{var e={354:0,869:0};d.f.j=(a,r)=>{var t=d.o(e,a)?e[a]:void 0;if(0!==t)if(t)r.push(t[2]);else if(/^(354|869)$/.test(a))e[a]=0;else{var f=new Promise(((r,f)=>t=e[a]=[r,f]));r.push(t[2]=f);var b=d.p+d.u(a),c=new Error;d.l(b,(r=>{if(d.o(e,a)&&(0!==(t=e[a])&&(e[a]=void 0),t)){var f=r&&("load"===r.type?"missing":r.type),b=r&&r.target&&r.target.src;c.message="Loading chunk "+a+" failed.\n("+f+": "+b+")",c.name="ChunkLoadError",c.type=f,c.request=b,t[1](c)}}),"chunk-"+a,a)}},d.O.j=a=>0===e[a];var a=(a,r)=>{var t,f,b=r[0],c=r[1],o=r[2],n=0;if(b.some((a=>0!==e[a]))){for(t in c)d.o(c,t)&&(d.m[t]=c[t]);if(o)var i=o(d)}for(a&&a(r);n - + @@ -15,21 +15,21 @@

In many Q&A applications we want to allow the user to have a back-and-forth conversation with the LLM, meaning the application needs some sort of "memory" of past questions and answers, and some logic for incorporating those into its current thinking. In this section, you will retrieve chat message history from MongoDB and incorporate it in your RAG application.

Fill in any <CODE_BLOCK_N> placeholders and run the cells under the Step 10: Add memory to the RAG application section in the notebook to add memory to the RAG application.

The answers for code blocks in this section are as follows:

-

CODE_BLOCK_25

-
Answer
history_collection.create_index("session_id")
-

CODE_BLOCK_26

-
Answer
{
"session_id": session_id,
"role": role,
"content": content,
"timestamp": datetime.now(),
}

CODE_BLOCK_27

-
Answer
history_collection.insert_one(message)
+
Answer
history_collection.create_index("session_id")

CODE_BLOCK_28

-
Answer
history_collection.find({"session_id": session_id}).sort("timestamp", 1)
+
Answer
{
"session_id": session_id,
"role": role,
"content": content,
"timestamp": datetime.now(),
}

CODE_BLOCK_29

-
Answer
{"role": msg["role"], "content": msg["content"]} for msg in cursor
+
Answer
history_collection.insert_one(message)

CODE_BLOCK_30

-
Answer
message_history = retrieve_session_history(session_id)
messages += message_history
+
Answer
history_collection.find({"session_id": session_id}).sort("timestamp", 1)

CODE_BLOCK_31

-
Answer
user_message = {"role": "user", "content": user_query}
messages.append(user_message)
+
Answer
{"role": msg["role"], "content": msg["content"]} for msg in cursor

CODE_BLOCK_32

+
Answer
message_history = retrieve_session_history(session_id)
messages.extend(message_history)
+

CODE_BLOCK_33

+
Answer
user_message = {"role": "user", "content": user_query}
messages.append(user_message)
+

CODE_BLOCK_34

Answer
store_chat_message(session_id, "user", user_query)
store_chat_message(session_id, "assistant", answer)
\ No newline at end of file diff --git a/docs/add-memory/concepts.html b/docs/add-memory/concepts.html index b3c93ae..ed615d2 100644 --- a/docs/add-memory/concepts.html +++ b/docs/add-memory/concepts.html @@ -7,7 +7,7 @@ - + diff --git a/docs/build-rag-app/build-rag-app.html b/docs/build-rag-app/build-rag-app.html index 84863ea..43bcf16 100644 --- a/docs/build-rag-app/build-rag-app.html +++ b/docs/build-rag-app/build-rag-app.html @@ -7,7 +7,7 @@ - + @@ -15,11 +15,11 @@

Let's create a simple RAG application that takes in a user query, retrieves contextually relevant documents from MongoDB Atlas, and passes the query and retrieved context to the Llama 3 8B Instruct model to generate an answer to the user question.

Fill in any <CODE_BLOCK_N> placeholders and run the cells under the Step 9: Build the RAG application section in the notebook to build the RAG application.

The answers for code blocks in this section are as follows:

-

CODE_BLOCK_20

-
Answer
vector_search(user_query)
-

CODE_BLOCK_21

-
Answer
"\n\n".join([d.get("page_content", "") for d in context])

CODE_BLOCK_22

+
Answer
vector_search(user_query)
+

CODE_BLOCK_23

+
Answer
"\n\n".join([d.get("body", "") for d in context])
+

CODE_BLOCK_24

Answer
response = fw_client.chat.completions.create(
model=model,
temperature=0,
messages=[
{
"role": "user",
"content": create_prompt(user_query),
}
],
)
print(response.choices[0].message.content)
\ No newline at end of file diff --git a/docs/build-rag-app/concepts.html b/docs/build-rag-app/concepts.html index 4d7e42b..793e8a7 100644 --- a/docs/build-rag-app/concepts.html +++ b/docs/build-rag-app/concepts.html @@ -7,7 +7,7 @@ - + diff --git a/docs/build-rag-app/stream-responses.html b/docs/build-rag-app/stream-responses.html index 9866616..bad2bfa 100644 --- a/docs/build-rag-app/stream-responses.html +++ b/docs/build-rag-app/stream-responses.html @@ -7,7 +7,7 @@ - + @@ -15,9 +15,9 @@

By default, generation results are return once the generation is completed. Another option is to stream the results, which is useful for chat use cases where the user can incrementally see results as each token is generated.

Fill in any <CODE_BLOCK_N> placeholders and run the cells under the 🦹‍♀️ Return streaming responses section in the notebook to stream the results from your RAG application.

The answers for code blocks in this section are as follows:

-

CODE_BLOCK_23

+

CODE_BLOCK_25

Answer
fw_client.chat.completions.create(
model=model,
temperature=0,
stream=True,
messages=[
{
"role": "user",
"content": create_prompt(user_query),
}
],
)
-

CODE_BLOCK_24

+

CODE_BLOCK_26

Answer
for chunk in response:
if chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="")
\ No newline at end of file diff --git a/docs/category/add-memory-to-the-rag-application.html b/docs/category/add-memory-to-the-rag-application.html index 37a9602..7aebf7a 100644 --- a/docs/category/add-memory-to-the-rag-application.html +++ b/docs/category/add-memory-to-the-rag-application.html @@ -7,7 +7,7 @@ - + diff --git a/docs/category/build-the-rag-application.html b/docs/category/build-the-rag-application.html index 719c1cd..2efd200 100644 --- a/docs/category/build-the-rag-application.html +++ b/docs/category/build-the-rag-application.html @@ -7,7 +7,7 @@ - + diff --git a/docs/category/dev-environment.html b/docs/category/dev-environment.html index 51ce1a8..12454a7 100644 --- a/docs/category/dev-environment.html +++ b/docs/category/dev-environment.html @@ -7,7 +7,7 @@ - + diff --git a/docs/category/fireworks-ai.html b/docs/category/fireworks-ai.html index 4c5a040..ece273c 100644 --- a/docs/category/fireworks-ai.html +++ b/docs/category/fireworks-ai.html @@ -7,7 +7,7 @@ - + diff --git a/docs/category/mongodb-atlas.html b/docs/category/mongodb-atlas.html index 6374e7f..04c3004 100644 --- a/docs/category/mongodb-atlas.html +++ b/docs/category/mongodb-atlas.html @@ -7,7 +7,7 @@ - + diff --git a/docs/category/perform-semantic-search-on-your-data.html b/docs/category/perform-semantic-search-on-your-data.html index 272a5f8..e55d6f5 100644 --- a/docs/category/perform-semantic-search-on-your-data.html +++ b/docs/category/perform-semantic-search-on-your-data.html @@ -7,7 +7,7 @@ - + diff --git a/docs/category/prepare-the-data.html b/docs/category/prepare-the-data.html index 36f4a79..88500a2 100644 --- a/docs/category/prepare-the-data.html +++ b/docs/category/prepare-the-data.html @@ -7,10 +7,10 @@ - + - + \ No newline at end of file diff --git a/docs/category/retrieval-augmented-generation.html b/docs/category/retrieval-augmented-generation.html index af98d94..3efa2cd 100644 --- a/docs/category/retrieval-augmented-generation.html +++ b/docs/category/retrieval-augmented-generation.html @@ -7,7 +7,7 @@ - + diff --git a/docs/dev-env/dev-setup.html b/docs/dev-env/dev-setup.html index 7b629e2..18a93a8 100644 --- a/docs/dev-env/dev-setup.html +++ b/docs/dev-env/dev-setup.html @@ -7,7 +7,7 @@ - + diff --git a/docs/dev-env/setup-pre-reqs.html b/docs/dev-env/setup-pre-reqs.html index 69fe244..2a94071 100644 --- a/docs/dev-env/setup-pre-reqs.html +++ b/docs/dev-env/setup-pre-reqs.html @@ -7,7 +7,7 @@ - + diff --git a/docs/fireworks-ai/create-account.html b/docs/fireworks-ai/create-account.html index 54f2aee..beb5c00 100644 --- a/docs/fireworks-ai/create-account.html +++ b/docs/fireworks-ai/create-account.html @@ -7,7 +7,7 @@ - + diff --git a/docs/fireworks-ai/create-api-key.html b/docs/fireworks-ai/create-api-key.html index 9670f0f..ec27244 100644 --- a/docs/fireworks-ai/create-api-key.html +++ b/docs/fireworks-ai/create-api-key.html @@ -7,7 +7,7 @@ - + diff --git a/docs/intro.html b/docs/intro.html index 804d352..530fb0e 100644 --- a/docs/intro.html +++ b/docs/intro.html @@ -7,7 +7,7 @@ - + diff --git a/docs/mongodb-atlas/create-account.html b/docs/mongodb-atlas/create-account.html index d99faf5..2cef017 100644 --- a/docs/mongodb-atlas/create-account.html +++ b/docs/mongodb-atlas/create-account.html @@ -7,7 +7,7 @@ - + diff --git a/docs/mongodb-atlas/create-cluster.html b/docs/mongodb-atlas/create-cluster.html index eb35fe0..8f65c17 100644 --- a/docs/mongodb-atlas/create-cluster.html +++ b/docs/mongodb-atlas/create-cluster.html @@ -7,7 +7,7 @@ - + diff --git a/docs/mongodb-atlas/get-connection-string.html b/docs/mongodb-atlas/get-connection-string.html index 27d1bab..278ec7c 100644 --- a/docs/mongodb-atlas/get-connection-string.html +++ b/docs/mongodb-atlas/get-connection-string.html @@ -7,7 +7,7 @@ - + diff --git a/docs/perform-semantic-search/concepts.html b/docs/perform-semantic-search/concepts.html index 138d06f..d5de1e6 100644 --- a/docs/perform-semantic-search/concepts.html +++ b/docs/perform-semantic-search/concepts.html @@ -7,7 +7,7 @@ - + diff --git a/docs/perform-semantic-search/create-vector-index.html b/docs/perform-semantic-search/create-vector-index.html index 47f7ae1..f5b958d 100644 --- a/docs/perform-semantic-search/create-vector-index.html +++ b/docs/perform-semantic-search/create-vector-index.html @@ -7,7 +7,7 @@ - + diff --git a/docs/perform-semantic-search/pre-filtering.html b/docs/perform-semantic-search/pre-filtering.html index 748399f..14ff806 100644 --- a/docs/perform-semantic-search/pre-filtering.html +++ b/docs/perform-semantic-search/pre-filtering.html @@ -7,7 +7,7 @@ - + @@ -16,13 +16,13 @@

Fill in any <CODE_BLOCK_N> placeholders and run the cells under the 🦹‍♀️ Combine pre-filtering with vector search section in the notebook to get a sense of how to combine pre-filtering with MongoDB Atlas Vector Search.

caution

DO NOT actually modify the existing vector index definitions in the Atlas UI, or the existing pipeline definitions in the code.

The answers for code blocks in this section are as follows:

-

CODE_BLOCK_16

-
Answer
{
"fields": [
{
"numDimensions": 1024,
"path": "embedding",
"similarity": "cosine",
"type": "vector"
},
{
"path": "metadata.language"
"type": "filter"
}
]
}
-

CODE_BLOCK_17

-
Answer
[
{
"$vectorSearch": {
"index": ATLAS_VECTOR_SEARCH_INDEX_NAME,
"queryVector": query_embedding,
"path": "embedding",
"numCandidates": 150,
"limit": 5,
"filter": {"metadata.language": "en"}
}
},
{
"$project": {
"_id": 0,
"page_content": 1,
"score": {"$meta": "vectorSearchScore"}
}
}
]

CODE_BLOCK_18

-
Answer
{
"fields": [
{
"numDimensions": 1024,
"path": "embedding",
"similarity": "cosine",
"type": "vector"
},
{
"path": "metadata.language"
"type": "filter"
},
{
"path": "type"
"type": "filter"
}
]
}
+
Answer
{
"fields": [
{
"numDimensions": 1024,
"path": "embedding",
"similarity": "cosine",
"type": "vector"
},
{
"path": "metadata.contentType",
"type": "filter"
}
]
}

CODE_BLOCK_19

-
Answer
[
{
"$vectorSearch": {
"index": ATLAS_VECTOR_SEARCH_INDEX_NAME,
"queryVector": query_embedding,
"path": "embedding",
"numCandidates": 150,
"limit": 5,
"filter": {
"$and": [
{"metadata.language": "en"},
{"type": "Document"}
]
}
}
},
{
"$project": {
"_id": 0,
"page_content": 1,
"score": {"$meta": "vectorSearchScore"}
}
}
]
+
Answer
[
{
"$vectorSearch": {
"index": ATLAS_VECTOR_SEARCH_INDEX_NAME,
"queryVector": query_embedding,
"path": "embedding",
"numCandidates": 150,
"limit": 5,
"filter": {"metadata.contentType": "Video"}
}
},
{
"$project": {
"_id": 0,
"body": 1,
"score": {"$meta": "vectorSearchScore"}
}
}
]
+

CODE_BLOCK_20

+
Answer
{
"fields": [
{
"numDimensions": 1024,
"path": "embedding",
"similarity": "cosine",
"type": "vector"
},
{
"path": "metadata.contentType",
"type": "filter"
},
{
"path": "updated",
"type": "filter"
}
]
}
+

CODE_BLOCK_21

+
Answer
[
{
"$vectorSearch": {
"index": ATLAS_VECTOR_SEARCH_INDEX_NAME,
"queryVector": query_embedding,
"path": "embedding",
"numCandidates": 150,
"limit": 5,
"filter": {
"$and": [
{"metadata.contentType": "Video"},
{"updated": {"$gte": "2024-05-20"}}
]
}
}
},
{
"$project": {
"_id": 0,
"body": 1,
"score": {"$meta": "vectorSearchScore"}
}
}
]
\ No newline at end of file diff --git a/docs/perform-semantic-search/vector-search.html b/docs/perform-semantic-search/vector-search.html index 65ca3eb..7954901 100644 --- a/docs/perform-semantic-search/vector-search.html +++ b/docs/perform-semantic-search/vector-search.html @@ -7,7 +7,7 @@ - + @@ -15,11 +15,11 @@

Now let's run some vector search queries against our data present in MongoDB.

Fill in any <CODE_BLOCK_N> placeholders and run the cells under the Step 8: Perform semantic search on your data section in the notebook to run vector search queries against your data.

The answers for code blocks in this section are as follows:

-

CODE_BLOCK_13

-
Answer
get_embedding(user_query)
-

CODE_BLOCK_14

-
Answer
[
{
"$vectorSearch": {
"index": ATLAS_VECTOR_SEARCH_INDEX_NAME,
"queryVector": query_embedding,
"path": "embedding",
"numCandidates": 150,
"limit": 5,
}
},
{
"$project": {
"_id": 0,
"page_content": 1,
"score": {"$meta": "vectorSearchScore"},
}
},
]

CODE_BLOCK_15

+
Answer
get_embedding(user_query)
+

CODE_BLOCK_16

+
Answer
[
{
"$vectorSearch": {
"index": ATLAS_VECTOR_SEARCH_INDEX_NAME,
"queryVector": query_embedding,
"path": "embedding",
"numCandidates": 150,
"limit": 5,
}
},
{
"$project": {
"_id": 0,
"body": 1,
"score": {"$meta": "vectorSearchScore"},
}
},
]
+

CODE_BLOCK_17

Answer
collection.aggregate(pipeline)
\ No newline at end of file diff --git a/docs/prepare-the-data/chunk-data.html b/docs/prepare-the-data/chunk-data.html index 3319d82..652c17a 100644 --- a/docs/prepare-the-data/chunk-data.html +++ b/docs/prepare-the-data/chunk-data.html @@ -7,19 +7,23 @@ - +

👐 Chunk up the data

Since we are working with large documents, we first need to break them up into smaller chunks before embedding and storing them in MongoDB.

-

Fill in any <CODE_BLOCK_N> placeholders and run the cells under the Step 4: Chunk up the data section in the notebook to chunk up the documents we loaded.

+

Fill in any <CODE_BLOCK_N> placeholders and run the cells under the Step 4: Chunk up the data section in the notebook to chunk up the articles we loaded.

The answers for code blocks in this section are as follows:

CODE_BLOCK_3

-
Answer
RecursiveCharacterTextSplitter.from_tiktoken_encoder(
encoding_name="cl100k_base", chunk_size=200, chunk_overlap=30
)
+
Answer
RecursiveCharacterTextSplitter.from_tiktoken_encoder(
encoding_name="cl100k_base", separators=separators, chunk_size=200, chunk_overlap=30
)

CODE_BLOCK_4

-
Answer
text_splitter.split_documents(docs)
+
Answer
doc[text_field]

CODE_BLOCK_5

-
Answer
doc.dict() for doc in split_docs
+
Answer
text_splitter.split_text(text)
+

CODE_BLOCK_6

+
Answer
for chunk in chunks:
temp = doc.copy()
temp[text_field] = chunk
chunked_data.append(temp)
+

CODE_BLOCK_7

+
Answer
for doc in docs:
chunks = get_chunks(doc, "body")
split_docs.extend(chunks)
\ No newline at end of file diff --git a/docs/prepare-the-data/concepts.html b/docs/prepare-the-data/concepts.html index e55577c..d372968 100644 --- a/docs/prepare-the-data/concepts.html +++ b/docs/prepare-the-data/concepts.html @@ -7,7 +7,7 @@ - + diff --git a/docs/prepare-the-data/embed-data.html b/docs/prepare-the-data/embed-data.html index 91313b1..b700820 100644 --- a/docs/prepare-the-data/embed-data.html +++ b/docs/prepare-the-data/embed-data.html @@ -7,19 +7,19 @@ - +

👐 Generate embeddings

To perform vector search on our data, we need to embed it (i.e. generate embedding vectors) before ingesting it into MongoDB.

-

Fill in any <CODE_BLOCK_N> placeholders and run the cells under the Step 5: Generate embeddings section in the notebook to generate embeddings for the chunked documents.

+

Fill in any <CODE_BLOCK_N> placeholders and run the cells under the Step 5: Generate embeddings section in the notebook to embed the chunked articles.

The answers for code blocks in this section are as follows:

-

CODE_BLOCK_6

+

CODE_BLOCK_8

Answer
SentenceTransformer("mixedbread-ai/mxbai-embed-large-v1")
-

CODE_BLOCK_7

+

CODE_BLOCK_9

Answer
embedding = embedding_model.encode(text)
return embedding.tolist()
-

CODE_BLOCK_8

-
Answer
for doc in split_docs:
temp = doc.copy()
temp["embedding"] = get_embedding(temp["page_content"])
embedded_docs.append(temp)
+

CODE_BLOCK_10

+
Answer
for doc in split_docs:
temp = doc.copy()
temp["embedding"] = get_embedding(temp["body"])
embedded_docs.append(temp)
\ No newline at end of file diff --git a/docs/prepare-the-data/ingest-data.html b/docs/prepare-the-data/ingest-data.html index a7fcc65..b1cbcac 100644 --- a/docs/prepare-the-data/ingest-data.html +++ b/docs/prepare-the-data/ingest-data.html @@ -3,25 +3,25 @@ -👐 Ingest data into MongoDB | Build RAG Applications using MongoDB +👐 Ingest data into MongoDB | Build RAG Applications using MongoDB - +

👐 Ingest data into MongoDB

-

The final step to build a MongoDB vector store for our RAG application is to ingest the embedded documents into MongoDB.

+

The final step to build a MongoDB vector store for our RAG application is to ingest the embedded article chunks into MongoDB.

Fill in any <CODE_BLOCK_N> placeholders and run the cells under the Step 6: Ingest data into MongoDB section in the notebook to ingest the embedded documents into MongoDB.

The answers for code blocks in this section are as follows:

-

CODE_BLOCK_9

+

CODE_BLOCK_11

Answer
MongoClient(MONGODB_URI)
-

CODE_BLOCK_10

+

CODE_BLOCK_12

Answer
mongo_client[DB_NAME][COLLECTION_NAME]
-

CODE_BLOCK_11

+

CODE_BLOCK_13

Answer
collection.delete_many({})
-

CODE_BLOCK_12

+

CODE_BLOCK_14

Answer
collection.insert_many(embedded_docs)
\ No newline at end of file diff --git a/docs/prepare-the-data/load-data.html b/docs/prepare-the-data/load-data.html index 765f56a..a634372 100644 --- a/docs/prepare-the-data/load-data.html +++ b/docs/prepare-the-data/load-data.html @@ -3,16 +3,16 @@ -👐 Load the dataset | Build RAG Applications using MongoDB +👐 Load the dataset | Build RAG Applications using MongoDB - + +

First, let's download the dataset for our lab. We'll use a subset of articles from the MongoDB Developer Center as the source data for our RAG application.

+

Run all the cells under the Step 3: Load the dataset section in the notebook to load the articles as a list of Python objects consisting of the content and relevant metadata.

\ No newline at end of file diff --git a/docs/rag/components-of-rag.html b/docs/rag/components-of-rag.html index da77f53..e761838 100644 --- a/docs/rag/components-of-rag.html +++ b/docs/rag/components-of-rag.html @@ -7,7 +7,7 @@ - + diff --git a/docs/rag/rag-usecases.html b/docs/rag/rag-usecases.html index 157c671..ea9899e 100644 --- a/docs/rag/rag-usecases.html +++ b/docs/rag/rag-usecases.html @@ -7,7 +7,7 @@ - + diff --git a/docs/rag/what-is-rag.html b/docs/rag/what-is-rag.html index 5c2eb54..f2e120e 100644 --- a/docs/rag/what-is-rag.html +++ b/docs/rag/what-is-rag.html @@ -7,7 +7,7 @@ - + diff --git a/docs/summary.html b/docs/summary.html index f33428b..1cd02c6 100644 --- a/docs/summary.html +++ b/docs/summary.html @@ -7,7 +7,7 @@ - + diff --git a/helloWorld.html b/helloWorld.html index 68e2983..d372639 100644 --- a/helloWorld.html +++ b/helloWorld.html @@ -7,7 +7,7 @@ - + diff --git a/index.html b/index.html index e5e6ec0..6f0ff6b 100644 --- a/index.html +++ b/index.html @@ -7,7 +7,7 @@ - + diff --git a/search-index-docs-default-current.json b/search-index-docs-default-current.json index e53fd8b..1e35f65 100644 --- a/search-index-docs-default-current.json +++ b/search-index-docs-default-current.json @@ -1 +1 @@ -{"documents":[{"id":17,"pageTitle":"👐 Add memory to the RAG application","sectionTitle":"👐 Add memory to the RAG application","sectionRoute":"/ai-rag-lab/docs/add-memory/add-memory","type":"docs"},{"id":1,"pageTitle":"📘 Tools, libraries, and concepts","sectionTitle":"📘 Tools, libraries, and concepts","sectionRoute":"/ai-rag-lab/docs/add-memory/concepts","type":"docs"},{"id":2,"pageTitle":"👐 Build the RAG application","sectionTitle":"👐 Build the RAG application","sectionRoute":"/ai-rag-lab/docs/build-rag-app/build-rag-app","type":"docs"},{"id":3,"pageTitle":"📘 Tools, libraries, and concepts","sectionTitle":"📘 Tools, libraries, and concepts","sectionRoute":"/ai-rag-lab/docs/build-rag-app/concepts","type":"docs"},{"id":4,"pageTitle":"🦹 Stream responses from the RAG application","sectionTitle":"🦹 Stream responses from the RAG application","sectionRoute":"/ai-rag-lab/docs/build-rag-app/stream-responses","type":"docs"},{"id":8,"pageTitle":"","sectionTitle":"📄️ 📘 Tools, libraries, and concepts","sectionRoute":"/ai-rag-lab/docs/category/add-memory-to-the-rag-application","type":"docs"},{"id":9,"pageTitle":"","sectionTitle":"📄️ 👐 Add memory to the RAG application","sectionRoute":"/ai-rag-lab/docs/category/add-memory-to-the-rag-application","type":"docs"},{"id":5,"pageTitle":"","sectionTitle":"📄️ 📘 Tools, libraries, and concepts","sectionRoute":"/ai-rag-lab/docs/category/build-the-rag-application","type":"docs"},{"id":6,"pageTitle":"","sectionTitle":"📄️ 👐 Build the RAG application","sectionRoute":"/ai-rag-lab/docs/category/build-the-rag-application","type":"docs"},{"id":7,"pageTitle":"","sectionTitle":"📄️ 🦹 Stream responses from the RAG application","sectionRoute":"/ai-rag-lab/docs/category/build-the-rag-application","type":"docs"},{"id":10,"pageTitle":"","sectionTitle":"📄️ 👐 Setup dev environment","sectionRoute":"/ai-rag-lab/docs/category/dev-environment","type":"docs"},{"id":11,"pageTitle":"","sectionTitle":"📄️ 👐 Setup prerequisites","sectionRoute":"/ai-rag-lab/docs/category/dev-environment","type":"docs"},{"id":15,"pageTitle":"","sectionTitle":"📄️ 👐 Create an account","sectionRoute":"/ai-rag-lab/docs/category/fireworks-ai","type":"docs"},{"id":16,"pageTitle":"","sectionTitle":"📄️ 👐 Create an API key","sectionRoute":"/ai-rag-lab/docs/category/fireworks-ai","type":"docs"},{"id":12,"pageTitle":"","sectionTitle":"📄️ 👐 Create your account","sectionRoute":"/ai-rag-lab/docs/category/mongodb-atlas","type":"docs"},{"id":13,"pageTitle":"","sectionTitle":"📄️ 👐 Deploy a database cluster","sectionRoute":"/ai-rag-lab/docs/category/mongodb-atlas","type":"docs"},{"id":14,"pageTitle":"","sectionTitle":"📄️ 👐 Get your connection string","sectionRoute":"/ai-rag-lab/docs/category/mongodb-atlas","type":"docs"},{"id":18,"pageTitle":"","sectionTitle":"📄️ 📘 Tools, libraries, and concepts","sectionRoute":"/ai-rag-lab/docs/category/perform-semantic-search-on-your-data","type":"docs"},{"id":19,"pageTitle":"","sectionTitle":"📄️ 👐 Create a vector search index","sectionRoute":"/ai-rag-lab/docs/category/perform-semantic-search-on-your-data","type":"docs"},{"id":20,"pageTitle":"","sectionTitle":"📄️ 👐 Perform semantic search","sectionRoute":"/ai-rag-lab/docs/category/perform-semantic-search-on-your-data","type":"docs"},{"id":21,"pageTitle":"","sectionTitle":"📄️ 🦹 Combine pre-filtering with vector search","sectionRoute":"/ai-rag-lab/docs/category/perform-semantic-search-on-your-data","type":"docs"},{"id":22,"pageTitle":"","sectionTitle":"📄️ 📘 Tools, libraries, and concepts","sectionRoute":"/ai-rag-lab/docs/category/prepare-the-data","type":"docs"},{"id":23,"pageTitle":"","sectionTitle":"📄️ 👐 Load the dataset","sectionRoute":"/ai-rag-lab/docs/category/prepare-the-data","type":"docs"},{"id":24,"pageTitle":"","sectionTitle":"📄️ 👐 Chunk up the data","sectionRoute":"/ai-rag-lab/docs/category/prepare-the-data","type":"docs"},{"id":25,"pageTitle":"","sectionTitle":"📄️ 👐 Generate embeddings","sectionRoute":"/ai-rag-lab/docs/category/prepare-the-data","type":"docs"},{"id":26,"pageTitle":"","sectionTitle":"📄️ 👐 Ingest data into MongoDB","sectionRoute":"/ai-rag-lab/docs/category/prepare-the-data","type":"docs"},{"id":27,"pageTitle":"","sectionTitle":"📄️ 📘 What is RAG?","sectionRoute":"/ai-rag-lab/docs/category/retrieval-augmented-generation","type":"docs"},{"id":28,"pageTitle":"","sectionTitle":"📄️ 📘 RAG use cases","sectionRoute":"/ai-rag-lab/docs/category/retrieval-augmented-generation","type":"docs"},{"id":29,"pageTitle":"","sectionTitle":"📄️ 📘 Components of a RAG system","sectionRoute":"/ai-rag-lab/docs/category/retrieval-augmented-generation","type":"docs"},{"id":30,"pageTitle":"👐 Setup dev environment","sectionTitle":"👐 Setup dev environment","sectionRoute":"/ai-rag-lab/docs/dev-env/dev-setup","type":"docs"},{"id":31,"pageTitle":"👐 Setup dev environment","sectionTitle":"Local setup","sectionRoute":"/ai-rag-lab/docs/dev-env/dev-setup#local-setup","type":"docs"},{"id":32,"pageTitle":"👐 Setup prerequisites","sectionTitle":"👐 Setup prerequisites","sectionRoute":"/ai-rag-lab/docs/dev-env/setup-pre-reqs","type":"docs"},{"id":33,"pageTitle":"👐 Create an account","sectionTitle":"👐 Create an account","sectionRoute":"/ai-rag-lab/docs/fireworks-ai/create-account","type":"docs"},{"id":34,"pageTitle":"👐 Create an API key","sectionTitle":"👐 Create an API key","sectionRoute":"/ai-rag-lab/docs/fireworks-ai/create-api-key","type":"docs"},{"id":45,"pageTitle":"Introduction","sectionTitle":"Introduction","sectionRoute":"/ai-rag-lab/docs/intro","type":"docs"},{"id":35,"pageTitle":"👐 Create your account","sectionTitle":"👐 Create your account","sectionRoute":"/ai-rag-lab/docs/mongodb-atlas/create-account","type":"docs"},{"id":36,"pageTitle":"👐 Create your account","sectionTitle":"Sign up for MongoDB Atlas","sectionRoute":"/ai-rag-lab/docs/mongodb-atlas/create-account#sign-up-for-mongodb-atlas","type":"docs"},{"id":37,"pageTitle":"👐 Create your account","sectionTitle":"Verify your email address","sectionRoute":"/ai-rag-lab/docs/mongodb-atlas/create-account#verify-your-email-address","type":"docs"},{"id":38,"pageTitle":"👐 Create your account","sectionTitle":"Finish the onboarding","sectionRoute":"/ai-rag-lab/docs/mongodb-atlas/create-account#finish-the-onboarding","type":"docs"},{"id":39,"pageTitle":"👐 Deploy a database cluster","sectionTitle":"👐 Deploy a database cluster","sectionRoute":"/ai-rag-lab/docs/mongodb-atlas/create-cluster","type":"docs"},{"id":40,"pageTitle":"👐 Deploy a database cluster","sectionTitle":"Security quickstart","sectionRoute":"/ai-rag-lab/docs/mongodb-atlas/create-cluster#security-quickstart","type":"docs"},{"id":41,"pageTitle":"👐 Deploy a database cluster","sectionTitle":"Network access","sectionRoute":"/ai-rag-lab/docs/mongodb-atlas/create-cluster#network-access","type":"docs"},{"id":42,"pageTitle":"👐 Deploy a database cluster","sectionTitle":"Database user","sectionRoute":"/ai-rag-lab/docs/mongodb-atlas/create-cluster#database-user","type":"docs"},{"id":43,"pageTitle":"👐 Deploy a database cluster","sectionTitle":"Manual network access configuration","sectionRoute":"/ai-rag-lab/docs/mongodb-atlas/create-cluster#manual-network-access-configuration","type":"docs"},{"id":44,"pageTitle":"👐 Deploy a database cluster","sectionTitle":"That's all!","sectionRoute":"/ai-rag-lab/docs/mongodb-atlas/create-cluster#thats-all","type":"docs"},{"id":46,"pageTitle":"👐 Get your connection string","sectionTitle":"👐 Get your connection string","sectionRoute":"/ai-rag-lab/docs/mongodb-atlas/get-connection-string","type":"docs"},{"id":47,"pageTitle":"📘 Tools, libraries, and concepts","sectionTitle":"📘 Tools, libraries, and concepts","sectionRoute":"/ai-rag-lab/docs/perform-semantic-search/concepts","type":"docs"},{"id":55,"pageTitle":"👐 Create a vector search index","sectionTitle":"👐 Create a vector search index","sectionRoute":"/ai-rag-lab/docs/perform-semantic-search/create-vector-index","type":"docs"},{"id":49,"pageTitle":"🦹 Combine pre-filtering with vector search","sectionTitle":"🦹 Combine pre-filtering with vector search","sectionRoute":"/ai-rag-lab/docs/perform-semantic-search/pre-filtering","type":"docs"},{"id":56,"pageTitle":"👐 Perform semantic search","sectionTitle":"👐 Perform semantic search","sectionRoute":"/ai-rag-lab/docs/perform-semantic-search/vector-search","type":"docs"},{"id":48,"pageTitle":"👐 Chunk up the data","sectionTitle":"👐 Chunk up the data","sectionRoute":"/ai-rag-lab/docs/prepare-the-data/chunk-data","type":"docs"},{"id":50,"pageTitle":"📘 Tools, libraries, and concepts","sectionTitle":"📘 Tools, libraries, and concepts","sectionRoute":"/ai-rag-lab/docs/prepare-the-data/concepts","type":"docs"},{"id":51,"pageTitle":"👐 Generate embeddings","sectionTitle":"👐 Generate embeddings","sectionRoute":"/ai-rag-lab/docs/prepare-the-data/embed-data","type":"docs"},{"id":52,"pageTitle":"👐 Ingest data into MongoDB","sectionTitle":"👐 Ingest data into MongoDB","sectionRoute":"/ai-rag-lab/docs/prepare-the-data/ingest-data","type":"docs"},{"id":53,"pageTitle":"👐 Load the dataset","sectionTitle":"👐 Load the dataset","sectionRoute":"/ai-rag-lab/docs/prepare-the-data/load-data","type":"docs"},{"id":54,"pageTitle":"📘 Components of a RAG system","sectionTitle":"📘 Components of a RAG system","sectionRoute":"/ai-rag-lab/docs/rag/components-of-rag","type":"docs"},{"id":59,"pageTitle":"📘 RAG use cases","sectionTitle":"📘 RAG use cases","sectionRoute":"/ai-rag-lab/docs/rag/rag-usecases","type":"docs"},{"id":57,"pageTitle":"📘 What is RAG?","sectionTitle":"📘 What is RAG?","sectionRoute":"/ai-rag-lab/docs/rag/what-is-rag","type":"docs"},{"id":58,"pageTitle":"🎯 Summary","sectionTitle":"🎯 Summary","sectionRoute":"/ai-rag-lab/docs/summary","type":"docs"}],"index":{"version":"2.3.9","fields":["title","content","tags"],"fieldVectors":[["title/17",[0,0.225,1,1.669,2,1.496,3,0.426,4,0.706]],["content/17",[0,0.349,1,1.908,2,2.077,3,0.591,4,1.184,5,1.923,6,1.923,7,1.247,8,1.617,9,2.077,10,1.923,11,1.923,12,1.923,13,1.923,14,1.617,15,0.796,16,1.923,17,1.617,18,1.407,19,2.1,20,1.923,21,2.942,22,1.923,23,1.923,24,1.923,25,1.413,26,1.01,27,1.407,28,2.474,29,1.923,30,0.318,31,1.062,32,1.247,33,1.118,34,0.796,35,1.062,36,0.916,37,0.634,38,2.497,39,0.961,40,1.18,41,1.323,42,0.916,43,2.497,44,2.497,45,2.497,46,3.819,47,3.572,48,3.364,49,2.497,50,2.497,51,2.497,52,2.497,53,2.497,54,2.497,55,2.497,56,1.247,57,2.497,58,2.497,59,2.497,60,2.497,61,2.497,62,2.497,63,2.497,64,2.497,65,2.497,66,2.497,67,2.497,68,2.497,69,3.819,70,2.497,71,2.497,72,2.497,73,2.497,74,2.497]],["tags/17",[]],["title/1",[0,0.248,75,0.979,76,0.936,77,0.979]],["content/1",[]],["tags/1",[]],["title/2",[0,0.248,3,0.469,4,0.779,78,1.489]],["content/2",[0,0.428,3,0.668,4,1.109,9,2.348,18,1.73,19,1.801,25,1.357,26,1.801,28,1.988,30,0.391,31,1.305,32,1.533,33,1.374,34,0.979,35,1.305,36,1.126,37,0.78,39,1.181,40,1.45,41,1.626,42,1.126,47,2.364,48,1.988,78,1.801,79,1.126,80,0.51,81,1.849,82,2.155,83,2.104,84,2.155,85,2.155,86,0.893,87,0.979,88,2.155,89,3.127,90,1.73,91,1.626,92,1.73,93,1.73,94,1.626,95,1.126,96,3.069,97,3.069,98,3.069,99,3.069,100,3.069,101,3.069,102,3.069,103,3.069,104,3.069,105,2.644,106,2.644,107,2.644,108,3.069]],["tags/2",[]],["title/3",[0,0.248,75,0.979,76,0.936,77,0.979]],["content/3",[]],["tags/3",[]],["title/4",[0,0.225,3,0.426,4,0.706,109,2.012,110,2.012]],["content/4",[0,0.419,3,0.412,4,0.683,9,2.07,19,1.306,25,1.408,27,1.821,28,2.093,31,1.374,32,1.614,33,1.447,34,1.03,35,1.374,36,1.185,39,1.244,40,1.526,41,1.712,42,1.185,47,2.489,48,2.093,95,1.98,105,2.783,106,2.783,107,2.783,109,3.251,110,2.785,111,2.093,112,4.135,113,2.994,114,2.093,115,1.821,116,2.269,117,2.093,118,0.556,119,1.526,120,2.269,121,1.614,122,2.269,123,2.269,124,3.231,125,3.231,126,3.231,127,3.231,128,2.783,129,1.526,130,3.231,131,3.231,132,3.231]],["tags/4",[]],["title/8",[0,0.318,75,0.888,76,0.849,77,0.888]],["content/8",[0,0.427,1,1.918,2,2.334,3,0.664,4,1.342,5,2.957,6,2.957,7,1.918,8,2.486,9,1.719,10,2.957,11,2.957,12,2.957,13,2.957,14,2.486,15,1.224,16,2.957,17,2.486,18,2.164,19,1.552,20,2.957,21,4.015,22,2.957,23,2.957,24,2.957,25,1.169,26,1.552,27,2.164,28,2.486,29,2.957,30,0.489,75,1.021,76,0.975,77,1.021]],["tags/8",[]],["title/9",[0,0.298,1,1.527,2,1.369,3,0.389,4,0.646]],["content/9",[0,0.427,1,1.918,2,2.334,3,0.664,4,1.342,5,2.957,6,2.957,7,1.918,8,2.486,9,1.719,10,2.957,11,2.957,12,2.957,13,2.957,14,2.486,15,1.224,16,2.957,17,2.486,18,2.164,19,1.552,20,2.957,21,4.015,22,2.957,23,2.957,24,2.957,25,1.169,26,1.552,27,2.164,28,2.486,29,2.957,30,0.489,75,1.021,76,0.975,77,1.021]],["tags/9",[]],["title/5",[0,0.318,75,0.888,76,0.849,77,0.888]],["content/5",[0,0.435,3,0.685,4,1.136,9,2.406,18,1.808,19,1.297,26,1.859,27,1.808,30,0.409,75,0.853,76,0.815,77,0.853,78,1.297,79,1.177,80,0.533,81,1.932,82,2.252,83,2.172,84,2.252,85,2.252,86,0.934,87,1.023,88,2.252,89,2.252,90,1.808,91,1.699,92,1.808,93,1.808,94,1.699,95,2.154,109,2.77,110,1.932,111,2.077,112,3.773,113,2.077,114,2.077,115,1.808,116,2.252,117,2.077,118,0.553,119,1.515,120,2.252,121,1.602,122,2.252,123,2.252]],["tags/5",[]],["title/6",[0,0.318,3,0.426,4,0.706,78,1.351]],["content/6",[0,0.435,3,0.685,4,1.136,9,2.406,18,1.808,19,1.297,26,1.859,27,1.808,30,0.409,75,0.853,76,0.815,77,0.853,78,1.297,79,1.177,80,0.533,81,1.932,82,2.252,83,2.172,84,2.252,85,2.252,86,0.934,87,1.023,88,2.252,89,2.252,90,1.808,91,1.699,92,1.808,93,1.808,94,1.699,95,2.154,109,2.77,110,1.932,111,2.077,112,3.773,113,2.077,114,2.077,115,1.808,116,2.252,117,2.077,118,0.553,119,1.515,120,2.252,121,1.602,122,2.252,123,2.252]],["tags/6",[]],["title/7",[0,0.298,3,0.389,4,0.646,109,1.841,110,1.841]],["content/7",[0,0.435,3,0.685,4,1.136,9,2.406,18,1.808,19,1.297,26,1.859,27,1.808,30,0.409,75,0.853,76,0.815,77,0.853,78,1.297,79,1.177,80,0.533,81,1.932,82,2.252,83,2.172,84,2.252,85,2.252,86,0.934,87,1.023,88,2.252,89,2.252,90,1.808,91,1.699,92,1.808,93,1.808,94,1.699,95,2.154,109,2.77,110,1.932,111,2.077,112,3.773,113,2.077,114,2.077,115,1.808,116,2.252,117,2.077,118,0.553,119,1.515,120,2.252,121,1.602,122,2.252,123,2.252]],["tags/7",[]],["title/10",[0,0.318,133,1.669,134,2.345,135,2.012]],["content/10",[0,0.457,25,1.26,31,1.758,33,1.852,34,1.747,35,1.758,36,1.517,37,1.051,39,2.365,56,2.066,118,0.497,133,3.07,134,2.903,135,2.491,136,1.954,137,2.903,138,3.185,139,1.33,140,2.903,141,3.185,142,2.678,143,2.903,144,3.185,145,3.549]],["tags/10",[]],["title/11",[0,0.341,133,1.84,145,2.385]],["content/11",[0,0.457,25,1.26,31,1.758,33,1.852,34,1.747,35,1.758,36,1.517,37,1.051,39,2.365,56,2.066,118,0.497,133,3.07,134,2.903,135,2.491,136,1.954,137,2.903,138,3.185,139,1.33,140,2.903,141,3.185,142,2.678,143,2.903,144,3.185,145,3.549]],["tags/11",[]],["title/15",[0,0.341,80,0.612,146,1.351]],["content/15",[0,0.422,7,1.868,37,0.95,56,1.868,80,0.97,90,2.107,91,1.98,92,2.107,93,2.107,94,2.712,118,0.616,139,0.908,146,1.878,147,2.879,148,3.316,149,2.421,150,2.879,151,2.625,152,2.625,153,2.625,154,1.439,155,2.879,156,2.879,157,2.879,158,2.879,159,2.879,160,3.517,161,3.517,162,2.421,163,2.625,164,2.421,165,2.879,166,2.421]],["tags/15",[]],["title/16",[0,0.318,80,0.555,160,2.012,161,2.012]],["content/16",[0,0.422,7,1.868,37,0.95,56,1.868,80,0.97,90,2.107,91,1.98,92,2.107,93,2.107,94,2.712,118,0.616,139,0.908,146,1.878,147,2.879,148,3.316,149,2.421,150,2.879,151,2.625,152,2.625,153,2.625,154,1.439,155,2.879,156,2.879,157,2.879,158,2.879,159,2.879,160,3.517,161,3.517,162,2.421,163,2.625,164,2.421,165,2.879,166,2.421]],["tags/16",[]],["title/12",[0,0.341,80,0.612,146,1.351]],["content/12",[0,0.46,2,1.719,3,0.489,4,0.812,15,1.224,30,0.664,80,0.866,87,1.662,118,0.462,139,1.265,146,1.912,167,2.313,168,2.486,169,2.695,170,2.486,171,2.486,172,1.918,173,1.632,174,3.363,175,1.918,176,1.552,177,2.313,178,2.761,179,3.14,180,2.695,181,1.224,182,0.89,183,2.313]],["tags/12",[]],["title/13",[0,0.318,172,1.669,173,1.42,174,1.769]],["content/13",[0,0.46,2,1.719,3,0.489,4,0.812,15,1.224,30,0.664,80,0.866,87,1.662,118,0.462,139,1.265,146,1.912,167,2.313,168,2.486,169,2.695,170,2.486,171,2.486,172,1.918,173,1.632,174,3.363,175,1.918,176,1.552,177,2.313,178,2.761,179,3.14,180,2.695,181,1.224,182,0.89,183,2.313]],["tags/13",[]],["title/14",[0,0.341,178,1.951,179,2.219]],["content/14",[0,0.46,2,1.719,3,0.489,4,0.812,15,1.224,30,0.664,80,0.866,87,1.662,118,0.462,139,1.265,146,1.912,167,2.313,168,2.486,169,2.695,170,2.486,171,2.486,172,1.918,173,1.632,174,3.363,175,1.918,176,1.552,177,2.313,178,2.761,179,3.14,180,2.695,181,1.224,182,0.89,183,2.313]],["tags/14",[]],["title/18",[0,0.318,75,0.888,76,0.849,77,0.888]],["content/18",[0,0.463,26,1.347,30,0.602,34,1.062,75,0.886,76,0.846,77,0.886,79,1.222,80,0.554,83,1.574,86,1.375,118,0.401,175,1.664,181,1.062,182,1.096,184,2.052,185,1.914,186,2.36,187,1.878,188,2.158,189,1.222,190,1.664,191,2.007,192,2.158,193,1.878,194,2.502,195,2.663,196,2.158,197,2.158,198,2.158,199,2.007,200,2.158,201,2.158,202,1.878]],["tags/18",[]],["title/19",[0,0.298,80,0.508,184,0.931,185,0.85,186,1.527]],["content/19",[0,0.463,26,1.347,30,0.602,34,1.062,75,0.886,76,0.846,77,0.886,79,1.222,80,0.554,83,1.574,86,1.375,118,0.401,175,1.664,181,1.062,182,1.096,184,2.052,185,1.914,186,2.36,187,1.878,188,2.158,189,1.222,190,1.664,191,2.007,192,2.158,193,1.878,194,2.502,195,2.663,196,2.158,197,2.158,198,2.158,199,2.007,200,2.158,201,2.158,202,1.878]],["tags/19",[]],["title/20",[0,0.318,185,0.929,189,1.226,190,1.669]],["content/20",[0,0.463,26,1.347,30,0.602,34,1.062,75,0.886,76,0.846,77,0.886,79,1.222,80,0.554,83,1.574,86,1.375,118,0.401,175,1.664,181,1.062,182,1.096,184,2.052,185,1.914,186,2.36,187,1.878,188,2.158,189,1.222,190,1.664,191,2.007,192,2.158,193,1.878,194,2.502,195,2.663,196,2.158,197,2.158,198,2.158,199,2.007,200,2.158,201,2.158,202,1.878]],["tags/20",[]],["title/21",[0,0.281,184,0.858,185,0.784,193,1.588,194,1.492,195,1.588]],["content/21",[0,0.463,26,1.347,30,0.602,34,1.062,75,0.886,76,0.846,77,0.886,79,1.222,80,0.554,83,1.574,86,1.375,118,0.401,175,1.664,181,1.062,182,1.096,184,2.052,185,1.914,186,2.36,187,1.878,188,2.158,189,1.222,190,1.664,191,2.007,192,2.158,193,1.878,194,2.502,195,2.663,196,2.158,197,2.158,198,2.158,199,2.007,200,2.158,201,2.158,202,1.878]],["tags/21",[]],["title/22",[0,0.318,75,0.888,76,0.849,77,0.888]],["content/22",[0,0.463,3,0.649,4,0.909,15,1.371,30,0.763,37,0.743,75,0.777,76,0.743,77,0.777,78,1.182,79,1.072,86,1.251,95,1.577,118,0.351,129,2.03,136,1.381,139,0.71,154,1.654,176,1.738,181,1.626,182,1.303,184,1.553,185,0.813,189,1.072,203,1.46,204,2.147,205,1.761,206,1.761,207,1.761,208,1.761,209,1.761,210,1.647,211,1.647,212,1.548,213,1.548,214,1.761,215,1.761,216,2.422,217,2.272,218,2.277,219,1.647,220,1.761,221,1.647]],["tags/22",[]],["title/23",[0,0.341,203,1.84,204,1.84]],["content/23",[0,0.463,3,0.649,4,0.909,15,1.371,30,0.763,37,0.743,75,0.777,76,0.743,77,0.777,78,1.182,79,1.072,86,1.251,95,1.577,118,0.351,129,2.03,136,1.381,139,0.71,154,1.654,176,1.738,181,1.626,182,1.303,184,1.553,185,0.813,189,1.072,203,1.46,204,2.147,205,1.761,206,1.761,207,1.761,208,1.761,209,1.761,210,1.647,211,1.647,212,1.548,213,1.548,214,1.761,215,1.761,216,2.422,217,2.272,218,2.277,219,1.647,220,1.761,221,1.647]],["tags/23",[]],["title/24",[0,0.318,129,1.578,154,1.286,182,0.775]],["content/24",[0,0.463,3,0.649,4,0.909,15,1.371,30,0.763,37,0.743,75,0.777,76,0.743,77,0.777,78,1.182,79,1.072,86,1.251,95,1.577,118,0.351,129,2.03,136,1.381,139,0.71,154,1.654,176,1.738,181,1.626,182,1.303,184,1.553,185,0.813,189,1.072,203,1.46,204,2.147,205,1.761,206,1.761,207,1.761,208,1.761,209,1.761,210,1.647,211,1.647,212,1.548,213,1.548,214,1.761,215,1.761,216,2.422,217,2.272,218,2.277,219,1.647,220,1.761,221,1.647]],["tags/24",[]],["title/25",[0,0.341,95,1.351,217,1.489]],["content/25",[0,0.463,3,0.649,4,0.909,15,1.371,30,0.763,37,0.743,75,0.777,76,0.743,77,0.777,78,1.182,79,1.072,86,1.251,95,1.577,118,0.351,129,2.03,136,1.381,139,0.71,154,1.654,176,1.738,181,1.626,182,1.303,184,1.553,185,0.813,189,1.072,203,1.46,204,2.147,205,1.761,206,1.761,207,1.761,208,1.761,209,1.761,210,1.647,211,1.647,212,1.548,213,1.548,214,1.761,215,1.761,216,2.422,217,2.272,218,2.277,219,1.647,220,1.761,221,1.647]],["tags/25",[]],["title/26",[0,0.318,30,0.426,181,1.065,182,0.775]],["content/26",[0,0.463,3,0.649,4,0.909,15,1.371,30,0.763,37,0.743,75,0.777,76,0.743,77,0.777,78,1.182,79,1.072,86,1.251,95,1.577,118,0.351,129,2.03,136,1.381,139,0.71,154,1.654,176,1.738,181,1.626,182,1.303,184,1.553,185,0.813,189,1.072,203,1.46,204,2.147,205,1.761,206,1.761,207,1.761,208,1.761,209,1.761,210,1.647,211,1.647,212,1.548,213,1.548,214,1.761,215,1.761,216,2.422,217,2.272,218,2.277,219,1.647,220,1.761,221,1.647]],["tags/26",[]],["title/27",[0,0.366,3,0.523]],["content/27",[0,0.5,3,0.875,118,0.631,119,2.48,222,3.162,223,3.162]],["tags/27",[]],["title/28",[0,0.318,3,0.426,118,0.402,119,1.578]],["content/28",[0,0.5,3,0.875,118,0.631,119,2.48,222,3.162,223,3.162]],["tags/28",[]],["title/29",[0,0.318,3,0.426,222,2.012,223,2.012]],["content/29",[0,0.5,3,0.875,118,0.631,119,2.48,222,3.162,223,3.162]],["tags/29",[]],["title/30",[0,0.248,133,1.84,134,2.586,135,2.219]],["content/30",[34,1.097,39,2.547,40,1.624,117,2.227,118,0.414,136,1.624,137,2.414,138,2.648,139,1.356,140,2.414,141,2.648,142,2.227,143,3.921,144,4.665,166,3.129,202,1.938,224,2.414,225,2.962,226,1.462,227,4.301,228,3.438,229,3.438,230,2.414,231,3.438,232,3.438,233,3.438,234,4.161,235,3.438,236,2.962,237,2.962,238,3.438,239,2.962,240,2.962,241,2.414,242,3.438,243,3.438,244,3.438,245,2.648,246,2.648,247,2.962]],["tags/30",[]],["title/31",[133,2.314,248,3.991]],["content/31",[3,0.75,7,1.614,30,0.589,34,1.03,37,0.821,39,2.496,42,1.696,80,0.537,135,1.947,137,3.245,139,1.43,149,3.495,154,1.244,212,1.712,225,2.783,227,2.489,248,2.783,249,2.489,250,5.396,251,3.231,252,3.231,253,3.231,254,3.231,255,3.231,256,3.231,257,3.231,258,3.231,259,4.622,260,3.231,261,3.231,262,4.622,263,2.783,264,3.231,265,3.231,266,3.231,267,3.982,268,3.231,269,3.231,270,3.231,271,2.269,272,3.231,273,2.269,274,3.231]],["tags/31",[]],["title/32",[0,0.276,133,2.05,145,2.658]],["content/32",[25,1.543,31,2.153,32,2.529,33,2.267,34,1.615,35,2.153,36,1.858,37,1.584,39,1.949,56,2.529,76,1.286,133,2.529,145,3.28,267,4.362,275,5.063]],["tags/32",[]],["title/33",[0,0.276,80,0.682,146,1.506]],["content/33",[15,1.008,25,0.963,37,0.803,42,1.159,56,1.578,80,0.756,90,1.781,91,1.674,92,1.781,93,1.781,94,2.823,118,0.547,139,0.767,140,2.218,142,2.047,143,3.194,146,2.267,147,2.434,148,4.167,149,2.946,150,2.434,151,2.218,152,2.218,153,2.218,154,1.216,155,2.434,156,2.434,157,2.434,158,2.434,159,2.434,160,2.74,161,1.903,162,2.047,164,2.047,176,1.278,177,1.903,224,2.218,226,1.934,276,3.159,277,2.218,278,2.722,279,1.903,280,3.503,281,3.159,282,2.722,283,1.781,284,3.159,285,3.159,286,2.722]],["tags/33",[]],["title/34",[0,0.248,80,0.612,160,2.219,161,2.219]],["content/34",[7,2.36,17,2.158,37,1.2,42,1.222,80,1.048,118,0.401,146,1.733,148,2.158,152,2.339,160,4.145,161,4.217,162,3.06,163,2.339,164,2.158,165,2.566,166,3.555,226,2.539,249,2.566,271,2.339,273,2.339,277,2.339,279,2.007,282,2.87,283,2.663,287,2.87,288,2.87,289,3.331,290,3.331,291,2.87,292,2.87,293,2.87]],["tags/34",[]],["title/45",[294,5.318]],["content/45",[0,0.365,1,1.358,2,1.217,3,0.74,4,0.861,14,2.638,30,0.346,37,0.691,42,1.494,48,3.163,78,1.647,81,1.638,83,1.284,86,1.186,87,1.299,115,1.532,118,0.49,136,1.284,139,1.186,148,1.761,149,1.761,167,2.942,184,0.828,185,1.133,189,0.997,190,1.358,202,1.532,222,1.638,223,2.454,224,1.909,239,2.342,246,2.094,247,2.342,277,1.909,295,2.718,296,2.718,297,2.342,298,2.718,299,2.718,300,2.718,301,2.718,302,2.718,303,1.909,304,2.718,305,4.073,306,2.342,307,2.718,308,2.718,309,2.718,310,2.718,311,2.718,312,2.718,313,2.718,314,2.718,315,4.073,316,4.884,317,2.718,318,2.718,319,2.718,320,2.718,321,2.342,322,2.342,323,2.718]],["tags/45",[]],["title/35",[0,0.276,80,0.682,146,1.506]],["content/35",[2,2.007,3,0.571,4,0.948,15,1.429,25,1.365,30,0.736,37,1.138,42,1.644,80,0.745,87,1.841,118,0.694,139,1.088,146,2.118,164,2.902,167,2.699,168,2.902,169,3.146,170,2.902,171,2.902,277,3.146,278,3.86,279,2.699,280,3.451]],["tags/35",[]],["title/36",[30,0.469,87,1.175,153,2.586,154,1.418]],["content/36",[30,0.685,80,1.007,87,1.714,115,2.265,118,0.647,139,0.976,146,2.222,151,2.822,177,2.421,226,1.709,230,2.822,241,2.822,249,3.095,280,3.095,283,2.265,324,3.462,325,4.018,326,4.018,327,4.018,328,4.018,329,4.631,330,3.095,331,3.462,332,4.018,333,5.375,334,4.018,335,3.095,336,2.603,337,4.018]],["tags/36",[]],["title/37",[335,3.161,336,2.658,338,3.535]],["content/37",[30,0.596,226,1.988,322,4.029,335,5.45,336,3.844,338,5.112,339,5.933,340,4.676,341,4.676,342,3.602,343,4.676,344,4.676,345,4.676,346,4.676,347,4.676,348,4.676]],["tags/37",[]],["title/38",[349,3.991,350,3.991]],["content/38",[30,0.694,31,2.317,87,1.738,226,2.317,329,4.694,349,4.694,350,4.694,351,4.694,352,5.449,353,5.449]],["tags/38",[]],["title/39",[0,0.248,172,1.84,173,1.566,174,1.951]],["content/39",[0,0.179,7,1.333,30,0.34,37,0.678,80,0.893,87,0.851,114,2.601,118,0.321,133,1.333,139,0.975,146,0.979,154,1.027,171,2.601,172,1.333,174,3.053,175,1.333,176,1.079,177,2.909,182,0.619,183,1.607,204,2.006,218,1.413,221,1.504,226,1.707,240,3.459,241,1.873,246,2.055,273,2.82,279,1.607,283,2.263,287,2.298,303,2.82,351,2.298,354,2.298,355,4.015,356,2.668,357,4.015,358,4.015,359,2.055,360,4.829,361,2.298,362,2.668,363,2.668,364,4.829,365,2.668,366,2.668,367,2.668,368,4.015,369,2.668,370,3.128,371,2.055,372,2.298,373,2.668,374,2.668,375,2.298,376,2.055,377,2.668,378,2.668,379,2.668,380,2.668,381,2.668,382,2.668,383,2.668,384,2.055]],["tags/39",[]],["title/40",[370,3.001,384,3.568]],["content/40",[9,2.117,15,1.508,30,0.602,80,0.786,87,1.508,111,3.062,115,2.665,121,2.362,172,2.985,173,2.01,187,2.665,286,4.073,370,3.062,371,3.642,384,3.642,385,4.728,386,4.728,387,3.062,388,3.062,389,4.728,390,4.073]],["tags/40",[]],["title/41",[387,3.001,388,3.001]],["content/41",[1,2.652,8,2.555,14,2.555,118,0.474,121,1.971,135,3.198,139,0.958,173,2.257,176,1.595,178,2.09,194,2.09,226,1.677,263,3.398,336,4.158,342,3.038,387,2.555,388,2.555,391,3.398,392,3.038,393,3.944,394,5.53,395,3.398,396,3.944,397,3.944,398,3.944,399,3.944,400,3.944,401,3.944,402,3.944,403,3.944,404,3.944]],["tags/41",[]],["title/42",[9,2.075,173,1.97]],["content/42",[7,2.469,9,2.751,15,1.576,80,1.073,81,2.14,87,1.576,118,0.594,119,1.678,146,1.813,173,2.416,178,1.882,183,2.14,199,2.14,226,1.51,230,2.494,234,3.06,237,3.06,241,2.494,279,2.14,297,3.06,321,3.06,361,3.06,370,2.301,405,5.682,406,5.292,407,3.552,408,3.552,409,3.552,410,4.941,411,3.552,412,3.552,413,3.552]],["tags/42",[]],["title/43",[187,2.076,372,3.173,387,2.385,388,2.385]],["content/43",[1,2.865,8,2.872,25,1.351,36,1.627,121,2.215,226,2.439,271,3.114,283,3.233,324,3.82,336,3.715,370,2.872,387,2.872,388,3.715,390,3.82,391,3.82,394,4.941,395,3.82,414,3.82,415,4.434,416,4.434,417,4.434,418,4.434]],["tags/43",[]],["title/44",[245,4.097]],["content/44",[25,1.543,36,1.858,80,0.841,121,2.529,162,3.28,170,3.28,172,2.529,173,2.652,174,3.303,245,3.9,271,3.555,419,5.063,420,5.063,421,5.063]],["tags/44",[]],["title/46",[0,0.276,178,2.174,179,2.472]],["content/46",[15,0.986,17,2.002,25,0.942,80,0.744,87,0.986,118,0.372,121,1.544,139,0.75,142,2.9,166,2.9,173,1.314,174,3.245,178,3.489,179,3.69,180,2.17,181,0.986,182,1.038,183,1.862,224,2.17,226,1.904,230,2.17,279,1.862,283,1.742,288,2.663,291,2.663,292,2.663,293,2.663,303,2.17,354,2.663,371,2.381,375,2.663,376,3.449,406,3.857,414,2.663,422,2.381,423,3.091,424,3.091,425,4.477,426,3.091,427,3.091,428,3.091,429,4.477,430,3.091,431,3.091,432,3.091,433,3.091,434,3.091]],["tags/46",[]],["title/47",[0,0.248,75,0.979,76,0.936,77,0.979]],["content/47",[]],["tags/47",[]],["title/55",[0,0.225,80,0.555,184,1.018,185,0.929,186,1.669]],["content/55",[0,0.408,1,1.341,26,1.085,30,0.342,36,1.48,42,0.985,80,0.806,86,0.781,87,1.546,94,1.422,95,0.985,118,0.485,139,0.652,168,1.739,172,1.341,173,1.715,181,0.856,182,0.623,184,1.642,185,1.607,186,3.146,187,1.513,188,2.613,212,1.422,213,1.422,217,1.631,219,1.513,226,1.715,227,3.108,236,2.313,273,1.885,283,1.513,303,1.885,330,2.068,331,2.313,359,2.068,376,3.108,392,2.068,422,2.068,435,2.684,436,2.684,437,2.684,438,4.034,439,4.034,440,2.684,441,2.684,442,3.476,443,2.068,444,2.313,445,3.476,446,2.313,447,2.684,448,2.684,449,2.684,450,2.684,451,2.684,452,2.313]],["tags/55",[]],["title/49",[0,0.205,184,0.931,185,0.85,193,1.723,194,1.619,195,1.723]],["content/49",[0,0.499,19,1.901,25,0.878,30,0.223,31,0.745,32,0.875,33,0.784,34,0.559,35,0.745,36,0.643,39,0.674,40,1.361,41,0.928,42,0.643,56,1.44,86,0.839,87,0.919,163,2.023,184,1.628,185,1.183,186,1.834,193,1.624,194,1.945,195,3.146,196,1.135,197,1.135,198,1.135,199,1.055,200,1.135,201,1.135,202,0.987,217,1.72,330,2.22,342,1.349,359,4.116,392,2.22,422,1.349,442,2.482,443,4.116,444,2.482,445,2.482,446,2.482,453,1.752,454,1.752,455,1.752,456,1.752,457,1.752,458,4.253,459,1.752,460,2.482,461,2.482,462,2.482,463,2.482,464,2.482,465,2.482,466,2.482,467,2.22,468,2.881,469,2.482,470,2.482,471,2.482,472,2.482,473,2.482,474,2.482,475,2.482,476,1.752,477,1.752]],["tags/49",[]],["title/56",[0,0.248,185,1.025,189,1.351,190,1.84]],["content/56",[0,0.463,19,1.82,25,1.371,30,0.397,31,1.324,32,1.556,33,1.394,34,1.686,35,1.324,36,1.142,37,0.791,39,1.199,40,1.471,41,1.649,42,1.142,56,1.556,79,1.142,83,2.126,175,1.556,182,1.226,184,1.371,185,1.47,186,1.556,189,1.142,190,1.556,191,2.711,192,2.017,217,1.259,443,2.398,460,2.682,461,2.682,462,2.682,463,2.682,464,2.682,465,2.682,466,2.682,467,2.398,469,2.682,470,2.682,471,2.682,472,2.682,473,2.682,474,2.682,475,2.682,478,3.113,479,3.113,480,3.113,481,3.113,482,3.113,483,3.113]],["tags/56",[]],["title/48",[0,0.248,129,1.74,154,1.418,182,0.854]],["content/48",[0,0.249,15,1.182,19,1.498,25,1.55,30,0.472,31,1.576,32,1.851,33,1.66,34,1.182,35,1.576,36,1.36,37,0.942,39,1.427,40,1.751,41,1.963,42,1.36,86,1.481,129,2.745,136,1.751,154,2.237,176,1.498,182,0.86,203,1.851,213,1.963,214,2.233,215,2.233,216,2.089,217,1.498,218,1.963,484,3.706,485,3.706,486,3.706,487,3.706,488,3.706,489,3.706,490,3.706,491,3.706,492,3.706,493,3.706,494,3.192,495,3.192]],["tags/48",[]],["title/50",[0,0.248,75,0.979,76,0.936,77,0.979]],["content/50",[]],["tags/50",[]],["title/51",[0,0.276,95,1.506,217,1.659]],["content/51",[0,0.374,15,1.088,19,1.379,25,1.463,30,0.435,31,1.45,32,1.704,33,1.527,34,1.088,35,1.45,36,1.251,37,0.867,39,1.313,40,1.612,41,1.807,42,1.251,86,0.993,95,2.04,113,2.209,128,2.938,129,1.612,181,1.088,182,0.791,184,1.463,185,0.949,189,1.251,213,1.807,216,1.923,217,2.248,219,2.707,220,2.055,452,2.938,467,2.627,494,2.938,495,2.938,496,3.411,497,3.411,498,3.411,499,3.411,500,3.411,501,3.411,502,3.411,503,3.411,504,3.411,505,3.411,506,3.411,507,3.411,508,3.411]],["tags/51",[]],["title/52",[0,0.248,30,0.469,181,1.175,182,0.854]],["content/52",[3,0.493,4,0.819,19,1.566,25,1.598,30,0.812,31,1.647,32,1.935,33,1.734,34,1.235,35,1.647,36,1.421,37,1.332,39,1.491,40,1.83,41,2.052,42,1.421,78,1.566,86,1.527,181,1.896,182,0.898,184,1.18,217,2.12,218,2.052,221,2.183,509,3.873,510,3.873,511,3.873,512,3.873,513,3.873,514,3.873,515,3.873,516,3.873,517,3.873]],["tags/52",[]],["title/53",[0,0.276,203,2.05,204,2.05]],["content/53",[3,0.712,4,0.901,25,1.297,34,1.358,35,1.811,36,1.562,37,1.082,39,1.639,48,2.758,79,1.562,86,1.24,91,2.256,118,0.512,139,1.034,176,1.722,182,0.988,203,2.791,204,2.791,205,2.565,206,2.565,207,2.565,208,2.565,209,3.365,210,2.4,211,2.4,212,2.256,518,4.258,519,4.258]],["tags/53",[]],["title/54",[0,0.248,3,0.469,222,2.219,223,2.219]],["content/54",[]],["tags/54",[]],["title/59",[0,0.248,3,0.469,118,0.443,119,1.74]],["content/59",[]],["tags/59",[]],["title/57",[0,0.311,3,0.59]],["content/57",[]],["tags/57",[]],["title/58",[0,0.311,520,4.632]],["content/58",[2,1.75,3,0.815,4,1.116,26,1.58,30,0.672,40,1.847,42,1.434,95,1.434,118,0.47,139,0.949,167,3.598,182,0.907,185,1.087,189,1.434,190,1.953,191,2.355,210,2.203,211,2.203,306,3.367,521,3.908,522,3.908,523,3.908,524,3.908,525,3.908,526,3.908,527,3.908,528,3.908,529,3.908,530,5.276,531,3.908,532,3.908,533,3.908,534,3.908]],["tags/58",[]]],"invertedIndex":[["",{"_index":0,"title":{"1":{},"2":{},"3":{},"4":{},"5":{},"6":{},"7":{},"8":{},"9":{},"10":{},"11":{},"12":{},"13":{},"14":{},"15":{},"16":{},"17":{},"18":{},"19":{},"20":{},"21":{},"22":{},"23":{},"24":{},"25":{},"26":{},"27":{},"28":{},"29":{},"30":{},"32":{},"33":{},"34":{},"35":{},"39":{},"46":{},"47":{},"48":{},"49":{},"50":{},"51":{},"52":{},"53":{},"54":{},"55":{},"56":{},"57":{},"58":{},"59":{}},"content":{"2":{},"4":{},"5":{},"6":{},"7":{},"8":{},"9":{},"10":{},"11":{},"12":{},"13":{},"14":{},"15":{},"16":{},"17":{},"18":{},"19":{},"20":{},"21":{},"22":{},"23":{},"24":{},"25":{},"26":{},"27":{},"28":{},"29":{},"39":{},"45":{},"48":{},"49":{},"51":{},"55":{},"56":{}},"tags":{}}],["0",{"_index":471,"title":{},"content":{"49":{},"56":{}},"tags":{}}],["0.0.0.0/0",{"_index":395,"title":{},"content":{"41":{},"43":{}},"tags":{}}],["1",{"_index":56,"title":{},"content":{"10":{},"11":{},"15":{},"16":{},"17":{},"32":{},"33":{},"49":{},"56":{}},"tags":{}}],["10",{"_index":38,"title":{},"content":{"17":{}},"tags":{}}],["1024",{"_index":445,"title":{},"content":{"49":{},"55":{}},"tags":{}}],["150",{"_index":465,"title":{},"content":{"49":{},"56":{}},"tags":{}}],["2",{"_index":275,"title":{},"content":{"32":{}},"tags":{}}],["3",{"_index":91,"title":{},"content":{"2":{},"5":{},"6":{},"7":{},"15":{},"16":{},"33":{},"53":{}},"tags":{}}],["4",{"_index":484,"title":{},"content":{"48":{}},"tags":{}}],["5",{"_index":467,"title":{},"content":{"49":{},"51":{},"56":{}},"tags":{}}],["6",{"_index":509,"title":{},"content":{"52":{}},"tags":{}}],["8",{"_index":478,"title":{},"content":{"56":{}},"tags":{}}],["8b",{"_index":92,"title":{},"content":{"2":{},"5":{},"6":{},"7":{},"15":{},"16":{},"33":{}},"tags":{}}],["9",{"_index":96,"title":{},"content":{"2":{}},"tags":{}}],["90",{"_index":300,"title":{},"content":{"45":{}},"tags":{}}],["_id",{"_index":470,"title":{},"content":{"49":{},"56":{}},"tags":{}}],["a.k.a",{"_index":524,"title":{},"content":{"58":{}},"tags":{}}],["access",{"_index":388,"title":{"41":{},"43":{}},"content":{"40":{},"41":{},"43":{}},"tags":{}}],["account",{"_index":146,"title":{"12":{},"15":{},"33":{},"35":{}},"content":{"12":{},"13":{},"14":{},"15":{},"16":{},"33":{},"34":{},"35":{},"36":{},"39":{},"42":{}},"tags":{}}],["activ",{"_index":261,"title":{},"content":{"31":{}},"tags":{}}],["actual",{"_index":454,"title":{},"content":{"49":{}},"tags":{}}],["ad",{"_index":526,"title":{},"content":{"58":{}},"tags":{}}],["add",{"_index":1,"title":{"9":{},"17":{}},"content":{"8":{},"9":{},"17":{},"41":{},"43":{},"45":{},"55":{}},"tags":{}}],["address",{"_index":336,"title":{"37":{}},"content":{"36":{},"37":{},"41":{},"43":{}},"tags":{}}],["advanc",{"_index":318,"title":{},"content":{"45":{}},"tags":{}}],["against",{"_index":191,"title":{},"content":{"18":{},"19":{},"20":{},"21":{},"56":{},"58":{}},"tags":{}}],["ai",{"_index":149,"title":{},"content":{"15":{},"16":{},"31":{},"33":{},"45":{}},"tags":{}}],["ai'",{"_index":450,"title":{},"content":{"55":{}},"tags":{}}],["ai/mxbai",{"_index":498,"title":{},"content":{"51":{}},"tags":{}}],["allow",{"_index":8,"title":{},"content":{"8":{},"9":{},"17":{},"41":{},"43":{}},"tags":{}}],["allowlist",{"_index":397,"title":{},"content":{"41":{}},"tags":{}}],["along",{"_index":310,"title":{},"content":{"45":{}},"tags":{}}],["alreadi",{"_index":277,"title":{},"content":{"33":{},"34":{},"35":{},"45":{}},"tags":{}}],["anoth",{"_index":116,"title":{},"content":{"4":{},"5":{},"6":{},"7":{}},"tags":{}}],["answer",{"_index":19,"title":{},"content":{"2":{},"4":{},"5":{},"6":{},"7":{},"8":{},"9":{},"17":{},"48":{},"49":{},"51":{},"52":{},"56":{}},"tags":{}}],["answer\"\\n\\n\".join([d.get(\"page_cont",{"_index":100,"title":{},"content":{"2":{}},"tags":{}}],["answercollection.aggregate(pipelin",{"_index":483,"title":{},"content":{"56":{}},"tags":{}}],["answercollection.delete_mani",{"_index":515,"title":{},"content":{"52":{}},"tags":{}}],["answercollection.insert_many(embedded_doc",{"_index":517,"title":{},"content":{"52":{}},"tags":{}}],["answerdoc.dict",{"_index":493,"title":{},"content":{"48":{}},"tags":{}}],["answerembed",{"_index":500,"title":{},"content":{"51":{}},"tags":{}}],["answerfor",{"_index":128,"title":{},"content":{"4":{},"51":{}},"tags":{}}],["answerfw_client.chat.completions.cr",{"_index":125,"title":{},"content":{"4":{}},"tags":{}}],["answerget_embedding(user_queri",{"_index":480,"title":{},"content":{"56":{}},"tags":{}}],["answerhistory_collection.create_index(\"session_id",{"_index":44,"title":{},"content":{"17":{}},"tags":{}}],["answerhistory_collection.find({\"session_id",{"_index":54,"title":{},"content":{"17":{}},"tags":{}}],["answerhistory_collection.insert_one(messag",{"_index":52,"title":{},"content":{"17":{}},"tags":{}}],["answermessage_histori",{"_index":64,"title":{},"content":{"17":{}},"tags":{}}],["answermongo_client[db_name][collection_nam",{"_index":513,"title":{},"content":{"52":{}},"tags":{}}],["answermongoclient(mongodb_uri",{"_index":511,"title":{},"content":{"52":{}},"tags":{}}],["answerrecursivecharactertextsplitter.from_tiktoken_encod",{"_index":486,"title":{},"content":{"48":{}},"tags":{}}],["answerrespons",{"_index":103,"title":{},"content":{"2":{}},"tags":{}}],["answersentencetransformer(\"mixedbread",{"_index":497,"title":{},"content":{"51":{}},"tags":{}}],["answerstore_chat_message(session_id",{"_index":72,"title":{},"content":{"17":{}},"tags":{}}],["answertext_splitter.split_documents(doc",{"_index":491,"title":{},"content":{"48":{}},"tags":{}}],["answeruser_messag",{"_index":68,"title":{},"content":{"17":{}},"tags":{}}],["answervector_search(user_queri",{"_index":98,"title":{},"content":{"2":{}},"tags":{}}],["answer{\"rol",{"_index":58,"title":{},"content":{"17":{}},"tags":{}}],["anywher",{"_index":391,"title":{},"content":{"41":{},"43":{}},"tags":{}}],["api",{"_index":160,"title":{"16":{},"34":{}},"content":{"15":{},"16":{},"33":{},"34":{}},"tags":{}}],["appear",{"_index":289,"title":{},"content":{"34":{}},"tags":{}}],["applic",{"_index":4,"title":{"2":{},"4":{},"6":{},"7":{},"9":{},"17":{}},"content":{"2":{},"4":{},"5":{},"6":{},"7":{},"8":{},"9":{},"12":{},"13":{},"14":{},"17":{},"22":{},"23":{},"24":{},"25":{},"26":{},"35":{},"45":{},"52":{},"53":{},"58":{}},"tags":{}}],["ask",{"_index":340,"title":{},"content":{"37":{}},"tags":{}}],["assign",{"_index":365,"title":{},"content":{"39":{}},"tags":{}}],["assist",{"_index":74,"title":{},"content":{"17":{}},"tags":{}}],["atla",{"_index":87,"title":{"36":{}},"content":{"2":{},"5":{},"6":{},"7":{},"12":{},"13":{},"14":{},"35":{},"36":{},"38":{},"39":{},"40":{},"42":{},"45":{},"46":{},"49":{},"55":{}},"tags":{}}],["atlas_vector_search_index_nam",{"_index":461,"title":{},"content":{"49":{},"56":{}},"tags":{}}],["augment",{"_index":523,"title":{},"content":{"58":{}},"tags":{}}],["authent",{"_index":285,"title":{},"content":{"33":{}},"tags":{}}],["autom",{"_index":369,"title":{},"content":{"39":{}},"tags":{}}],["automat",{"_index":407,"title":{},"content":{"42":{}},"tags":{}}],["back",{"_index":10,"title":{},"content":{"8":{},"9":{},"17":{}},"tags":{}}],["badg",{"_index":228,"title":{},"content":{"30":{}},"tags":{}}],["bar",{"_index":302,"title":{},"content":{"45":{}},"tags":{}}],["base",{"_index":169,"title":{},"content":{"12":{},"13":{},"14":{},"35":{}},"tags":{}}],["be",{"_index":389,"title":{},"content":{"40":{}},"tags":{}}],["befor",{"_index":216,"title":{},"content":{"22":{},"23":{},"24":{},"25":{},"26":{},"48":{},"51":{}},"tags":{}}],["below",{"_index":249,"title":{},"content":{"31":{},"34":{},"36":{}},"tags":{}}],["block",{"_index":41,"title":{},"content":{"2":{},"4":{},"17":{},"48":{},"49":{},"51":{},"52":{},"56":{}},"tags":{}}],["blog",{"_index":209,"title":{},"content":{"22":{},"23":{},"24":{},"25":{},"26":{},"53":{}},"tags":{}}],["box",{"_index":364,"title":{},"content":{"39":{}},"tags":{}}],["break",{"_index":214,"title":{},"content":{"22":{},"23":{},"24":{},"25":{},"26":{},"48":{}},"tags":{}}],["browser",{"_index":270,"title":{},"content":{"31":{}},"tags":{}}],["build",{"_index":78,"title":{"2":{},"6":{}},"content":{"2":{},"5":{},"6":{},"7":{},"22":{},"23":{},"24":{},"25":{},"26":{},"45":{},"52":{}},"tags":{}}],["built",{"_index":525,"title":{},"content":{"58":{}},"tags":{}}],["button",{"_index":283,"title":{},"content":{"33":{},"34":{},"36":{},"39":{},"43":{},"46":{},"55":{}},"tags":{}}],["captcha",{"_index":383,"title":{},"content":{"39":{}},"tags":{}}],["card",{"_index":327,"title":{},"content":{"36":{}},"tags":{}}],["case",{"_index":119,"title":{"28":{},"59":{}},"content":{"4":{},"5":{},"6":{},"7":{},"27":{},"28":{},"29":{},"42":{}},"tags":{}}],["caution",{"_index":342,"title":{},"content":{"37":{},"41":{},"49":{}},"tags":{}}],["cd",{"_index":259,"title":{},"content":{"31":{}},"tags":{}}],["cell",{"_index":35,"title":{},"content":{"2":{},"4":{},"10":{},"11":{},"17":{},"32":{},"48":{},"49":{},"51":{},"52":{},"53":{},"56":{}},"tags":{}}],["center",{"_index":211,"title":{},"content":{"22":{},"23":{},"24":{},"25":{},"26":{},"53":{},"58":{}},"tags":{}}],["certain",{"_index":200,"title":{},"content":{"18":{},"19":{},"20":{},"21":{},"49":{}},"tags":{}}],["chang",{"_index":236,"title":{},"content":{"30":{},"55":{}},"tags":{}}],["chat",{"_index":27,"title":{},"content":{"4":{},"5":{},"6":{},"7":{},"8":{},"9":{},"17":{}},"tags":{}}],["check",{"_index":322,"title":{},"content":{"37":{},"45":{}},"tags":{}}],["choos",{"_index":240,"title":{},"content":{"30":{},"39":{}},"tags":{}}],["chunk",{"_index":129,"title":{"24":{},"48":{}},"content":{"4":{},"22":{},"23":{},"24":{},"25":{},"26":{},"48":{},"51":{}},"tags":{}}],["chunk.choices[0].delta.cont",{"_index":130,"title":{},"content":{"4":{}},"tags":{}}],["chunk_overlap=30",{"_index":489,"title":{},"content":{"48":{}},"tags":{}}],["chunk_size=200",{"_index":488,"title":{},"content":{"48":{}},"tags":{}}],["click",{"_index":226,"title":{},"content":{"30":{},"33":{},"34":{},"36":{},"37":{},"38":{},"39":{},"41":{},"42":{},"43":{},"46":{},"55":{}},"tags":{}}],["clipboard",{"_index":291,"title":{},"content":{"34":{},"46":{}},"tags":{}}],["clone",{"_index":250,"title":{},"content":{"31":{}},"tags":{}}],["close",{"_index":415,"title":{},"content":{"43":{}},"tags":{}}],["closest",{"_index":378,"title":{},"content":{"39":{}},"tags":{}}],["cloud",{"_index":357,"title":{},"content":{"39":{}},"tags":{}}],["cluster",{"_index":174,"title":{"13":{},"39":{}},"content":{"12":{},"13":{},"14":{},"39":{},"44":{},"46":{}},"tags":{}}],["code",{"_index":40,"title":{},"content":{"2":{},"4":{},"17":{},"30":{},"48":{},"49":{},"51":{},"52":{},"56":{},"58":{}},"tags":{}}],["code_block_10",{"_index":512,"title":{},"content":{"52":{}},"tags":{}}],["code_block_11",{"_index":514,"title":{},"content":{"52":{}},"tags":{}}],["code_block_12",{"_index":516,"title":{},"content":{"52":{}},"tags":{}}],["code_block_13",{"_index":479,"title":{},"content":{"56":{}},"tags":{}}],["code_block_14",{"_index":481,"title":{},"content":{"56":{}},"tags":{}}],["code_block_15",{"_index":482,"title":{},"content":{"56":{}},"tags":{}}],["code_block_16",{"_index":457,"title":{},"content":{"49":{}},"tags":{}}],["code_block_17",{"_index":459,"title":{},"content":{"49":{}},"tags":{}}],["code_block_18",{"_index":476,"title":{},"content":{"49":{}},"tags":{}}],["code_block_19",{"_index":477,"title":{},"content":{"49":{}},"tags":{}}],["code_block_20",{"_index":97,"title":{},"content":{"2":{}},"tags":{}}],["code_block_21",{"_index":99,"title":{},"content":{"2":{}},"tags":{}}],["code_block_22",{"_index":102,"title":{},"content":{"2":{}},"tags":{}}],["code_block_23",{"_index":124,"title":{},"content":{"4":{}},"tags":{}}],["code_block_24",{"_index":127,"title":{},"content":{"4":{}},"tags":{}}],["code_block_25",{"_index":43,"title":{},"content":{"17":{}},"tags":{}}],["code_block_26",{"_index":45,"title":{},"content":{"17":{}},"tags":{}}],["code_block_27",{"_index":51,"title":{},"content":{"17":{}},"tags":{}}],["code_block_28",{"_index":53,"title":{},"content":{"17":{}},"tags":{}}],["code_block_29",{"_index":57,"title":{},"content":{"17":{}},"tags":{}}],["code_block_3",{"_index":485,"title":{},"content":{"48":{}},"tags":{}}],["code_block_30",{"_index":63,"title":{},"content":{"17":{}},"tags":{}}],["code_block_31",{"_index":67,"title":{},"content":{"17":{}},"tags":{}}],["code_block_32",{"_index":71,"title":{},"content":{"17":{}},"tags":{}}],["code_block_4",{"_index":490,"title":{},"content":{"48":{}},"tags":{}}],["code_block_5",{"_index":492,"title":{},"content":{"48":{}},"tags":{}}],["code_block_6",{"_index":496,"title":{},"content":{"51":{}},"tags":{}}],["code_block_7",{"_index":499,"title":{},"content":{"51":{}},"tags":{}}],["code_block_8",{"_index":503,"title":{},"content":{"51":{}},"tags":{}}],["code_block_9",{"_index":510,"title":{},"content":{"52":{}},"tags":{}}],["code_block_n",{"_index":32,"title":{},"content":{"2":{},"4":{},"17":{},"32":{},"48":{},"49":{},"51":{},"52":{},"56":{}},"tags":{}}],["colab",{"_index":144,"title":{},"content":{"10":{},"11":{},"30":{}},"tags":{}}],["collect",{"_index":188,"title":{},"content":{"18":{},"19":{},"20":{},"21":{},"55":{}},"tags":{}}],["combin",{"_index":193,"title":{"21":{},"49":{}},"content":{"18":{},"19":{},"20":{},"21":{},"49":{}},"tags":{}}],["command",{"_index":253,"title":{},"content":{"31":{}},"tags":{}}],["commun",{"_index":533,"title":{},"content":{"58":{}},"tags":{}}],["compass",{"_index":425,"title":{},"content":{"46":{}},"tags":{}}],["complet",{"_index":115,"title":{},"content":{"4":{},"5":{},"6":{},"7":{},"36":{},"40":{},"45":{}},"tags":{}}],["compon",{"_index":222,"title":{"29":{},"54":{}},"content":{"27":{},"28":{},"29":{},"45":{}},"tags":{}}],["concept",{"_index":77,"title":{"1":{},"3":{},"5":{},"8":{},"18":{},"22":{},"47":{},"50":{}},"content":{"5":{},"6":{},"7":{},"8":{},"9":{},"18":{},"19":{},"20":{},"21":{},"22":{},"23":{},"24":{},"25":{},"26":{}},"tags":{}}],["configur",{"_index":187,"title":{"43":{}},"content":{"18":{},"19":{},"20":{},"21":{},"40":{},"55":{}},"tags":{}}],["confirm",{"_index":418,"title":{},"content":{"43":{}},"tags":{}}],["congratul",{"_index":521,"title":{},"content":{"58":{}},"tags":{}}],["connect",{"_index":178,"title":{"14":{},"46":{}},"content":{"12":{},"13":{},"14":{},"41":{},"42":{},"46":{}},"tags":{}}],["consid",{"_index":198,"title":{},"content":{"18":{},"19":{},"20":{},"21":{},"49":{}},"tags":{}}],["content",{"_index":48,"title":{},"content":{"2":{},"4":{},"17":{},"45":{},"53":{}},"tags":{}}],["context",{"_index":89,"title":{},"content":{"2":{},"5":{},"6":{},"7":{}},"tags":{}}],["contextu",{"_index":84,"title":{},"content":{"2":{},"5":{},"6":{},"7":{}},"tags":{}}],["continu",{"_index":353,"title":{},"content":{"38":{}},"tags":{}}],["convers",{"_index":12,"title":{},"content":{"8":{},"9":{},"17":{}},"tags":{}}],["copi",{"_index":166,"title":{},"content":{"15":{},"16":{},"30":{},"34":{},"46":{}},"tags":{}}],["corner",{"_index":437,"title":{},"content":{"55":{}},"tags":{}}],["cosin",{"_index":446,"title":{},"content":{"49":{},"55":{}},"tags":{}}],["cover",{"_index":315,"title":{},"content":{"45":{}},"tags":{}}],["creat",{"_index":80,"title":{"12":{},"15":{},"16":{},"19":{},"33":{},"34":{},"35":{},"55":{}},"content":{"2":{},"5":{},"6":{},"7":{},"12":{},"13":{},"14":{},"15":{},"16":{},"18":{},"19":{},"20":{},"21":{},"31":{},"33":{},"34":{},"35":{},"36":{},"39":{},"40":{},"42":{},"44":{},"46":{},"55":{}},"tags":{}}],["create_prompt(user_queri",{"_index":107,"title":{},"content":{"2":{},"4":{}},"tags":{}}],["creation",{"_index":356,"title":{},"content":{"39":{}},"tags":{}}],["credenti",{"_index":408,"title":{},"content":{"42":{}},"tags":{}}],["credit",{"_index":151,"title":{},"content":{"15":{},"16":{},"33":{},"36":{}},"tags":{}}],["criteria",{"_index":201,"title":{},"content":{"18":{},"19":{},"20":{},"21":{},"49":{}},"tags":{}}],["current",{"_index":23,"title":{},"content":{"8":{},"9":{},"17":{}},"tags":{}}],["cursor",{"_index":62,"title":{},"content":{"17":{}},"tags":{}}],["d",{"_index":101,"title":{},"content":{"2":{}},"tags":{}}],["danger",{"_index":398,"title":{},"content":{"41":{}},"tags":{}}],["data",{"_index":182,"title":{"24":{},"26":{},"48":{},"52":{}},"content":{"12":{},"13":{},"14":{},"18":{},"19":{},"20":{},"21":{},"22":{},"23":{},"24":{},"25":{},"26":{},"39":{},"46":{},"48":{},"51":{},"52":{},"53":{},"55":{},"56":{},"58":{}},"tags":{}}],["databas",{"_index":173,"title":{"13":{},"39":{},"42":{}},"content":{"12":{},"13":{},"14":{},"40":{},"41":{},"42":{},"44":{},"46":{},"55":{}},"tags":{}}],["dataset",{"_index":204,"title":{"23":{},"53":{}},"content":{"22":{},"23":{},"24":{},"25":{},"26":{},"39":{},"53":{}},"tags":{}}],["datetime.now",{"_index":50,"title":{},"content":{"17":{}},"tags":{}}],["default",{"_index":111,"title":{},"content":{"4":{},"5":{},"6":{},"7":{},"40":{}},"tags":{}}],["definit",{"_index":442,"title":{},"content":{"49":{},"55":{}},"tags":{}}],["deploy",{"_index":172,"title":{"13":{},"39":{}},"content":{"12":{},"13":{},"14":{},"39":{},"40":{},"44":{},"55":{}},"tags":{}}],["descript",{"_index":307,"title":{},"content":{"45":{}},"tags":{}}],["dev",{"_index":134,"title":{"10":{},"30":{}},"content":{"10":{},"11":{}},"tags":{}}],["develop",{"_index":210,"title":{},"content":{"22":{},"23":{},"24":{},"25":{},"26":{},"53":{},"58":{}},"tags":{}}],["developer/ai",{"_index":257,"title":{},"content":{"31":{}},"tags":{}}],["dialog",{"_index":390,"title":{},"content":{"40":{},"43":{}},"tags":{}}],["dimens",{"_index":448,"title":{},"content":{"55":{}},"tags":{}}],["directori",{"_index":260,"title":{},"content":{"31":{}},"tags":{}}],["display",{"_index":423,"title":{},"content":{"46":{}},"tags":{}}],["do",{"_index":332,"title":{},"content":{"36":{}},"tags":{}}],["doc",{"_index":494,"title":{},"content":{"48":{},"51":{}},"tags":{}}],["doc.copi",{"_index":505,"title":{},"content":{"51":{}},"tags":{}}],["document",{"_index":86,"title":{},"content":{"2":{},"5":{},"6":{},"7":{},"18":{},"19":{},"20":{},"21":{},"22":{},"23":{},"24":{},"25":{},"26":{},"45":{},"48":{},"49":{},"51":{},"52":{},"53":{},"55":{}},"tags":{}}],["don't",{"_index":414,"title":{},"content":{"43":{},"46":{}},"tags":{}}],["done",{"_index":379,"title":{},"content":{"39":{}},"tags":{}}],["down",{"_index":386,"title":{},"content":{"40":{}},"tags":{}}],["download",{"_index":205,"title":{},"content":{"22":{},"23":{},"24":{},"25":{},"26":{},"53":{}},"tags":{}}],["dure",{"_index":202,"title":{},"content":{"18":{},"19":{},"20":{},"21":{},"30":{},"45":{},"49":{}},"tags":{}}],["each",{"_index":122,"title":{},"content":{"4":{},"5":{},"6":{},"7":{}},"tags":{}}],["easi",{"_index":428,"title":{},"content":{"46":{}},"tags":{}}],["easiest",{"_index":140,"title":{},"content":{"10":{},"11":{},"30":{},"33":{}},"tags":{}}],["editor",{"_index":439,"title":{},"content":{"55":{}},"tags":{}}],["email",{"_index":335,"title":{"37":{}},"content":{"36":{},"37":{}},"tags":{}}],["emb",{"_index":219,"title":{},"content":{"22":{},"23":{},"24":{},"25":{},"26":{},"51":{},"55":{}},"tags":{}}],["embed",{"_index":217,"title":{"25":{},"51":{}},"content":{"22":{},"23":{},"24":{},"25":{},"26":{},"48":{},"49":{},"51":{},"52":{},"55":{},"56":{}},"tags":{}}],["embedded_docs.append(temp",{"_index":508,"title":{},"content":{"51":{}},"tags":{}}],["embedding.tolist",{"_index":502,"title":{},"content":{"51":{}},"tags":{}}],["embedding_model.encode(text",{"_index":501,"title":{},"content":{"51":{}},"tags":{}}],["en",{"_index":468,"title":{},"content":{"49":{}},"tags":{}}],["encoding_name=\"cl100k_bas",{"_index":487,"title":{},"content":{"48":{}},"tags":{}}],["end",{"_index":132,"title":{},"content":{"4":{}},"tags":{}}],["enter",{"_index":290,"title":{},"content":{"34":{}},"tags":{}}],["entir",{"_index":400,"title":{},"content":{"41":{}},"tags":{}}],["environ",{"_index":135,"title":{"10":{},"30":{}},"content":{"10":{},"11":{},"31":{},"41":{}},"tags":{}}],["event",{"_index":333,"title":{},"content":{"36":{}},"tags":{}}],["everyth",{"_index":419,"title":{},"content":{"44":{}},"tags":{}}],["exampl",{"_index":531,"title":{},"content":{"58":{}},"tags":{}}],["execut",{"_index":252,"title":{},"content":{"31":{}},"tags":{}}],["exist",{"_index":163,"title":{},"content":{"15":{},"16":{},"34":{},"49":{}},"tags":{}}],["experi",{"_index":156,"title":{},"content":{"15":{},"16":{},"33":{}},"tags":{}}],["expos",{"_index":399,"title":{},"content":{"41":{}},"tags":{}}],["favorit",{"_index":377,"title":{},"content":{"39":{}},"tags":{}}],["field",{"_index":392,"title":{},"content":{"41":{},"49":{},"55":{}},"tags":{}}],["file",{"_index":243,"title":{},"content":{"30":{}},"tags":{}}],["fill",{"_index":31,"title":{},"content":{"2":{},"4":{},"10":{},"11":{},"17":{},"32":{},"38":{},"48":{},"49":{},"51":{},"52":{},"56":{}},"tags":{}}],["filter",{"_index":195,"title":{"21":{},"49":{}},"content":{"18":{},"19":{},"20":{},"21":{},"49":{}},"tags":{}}],["final",{"_index":221,"title":{},"content":{"22":{},"23":{},"24":{},"25":{},"26":{},"39":{},"52":{}},"tags":{}}],["find",{"_index":528,"title":{},"content":{"58":{}},"tags":{}}],["finish",{"_index":349,"title":{"38":{}},"content":{"38":{}},"tags":{}}],["firework",{"_index":148,"title":{},"content":{"15":{},"16":{},"33":{},"34":{},"45":{}},"tags":{}}],["first",{"_index":176,"title":{},"content":{"12":{},"13":{},"14":{},"22":{},"23":{},"24":{},"25":{},"26":{},"33":{},"39":{},"41":{},"48":{},"53":{}},"tags":{}}],["focus",{"_index":208,"title":{},"content":{"22":{},"23":{},"24":{},"25":{},"26":{},"53":{}},"tags":{}}],["folder",{"_index":348,"title":{},"content":{"37":{}},"tags":{}}],["follow",{"_index":42,"title":{},"content":{"2":{},"4":{},"17":{},"31":{},"33":{},"34":{},"35":{},"45":{},"48":{},"49":{},"51":{},"52":{},"55":{},"56":{},"58":{}},"tags":{}}],["forget",{"_index":433,"title":{},"content":{"46":{}},"tags":{}}],["form",{"_index":329,"title":{},"content":{"36":{},"38":{}},"tags":{}}],["forth",{"_index":11,"title":{},"content":{"8":{},"9":{},"17":{}},"tags":{}}],["forum",{"_index":534,"title":{},"content":{"58":{}},"tags":{}}],["four",{"_index":207,"title":{},"content":{"22":{},"23":{},"24":{},"25":{},"26":{},"53":{}},"tags":{}}],["free",{"_index":177,"title":{},"content":{"12":{},"13":{},"14":{},"33":{},"36":{},"39":{}},"tags":{}}],["futur",{"_index":238,"title":{},"content":{"30":{}},"tags":{}}],["fw_client.chat.completions.cr",{"_index":104,"title":{},"content":{"2":{}},"tags":{}}],["genai",{"_index":530,"title":{},"content":{"58":{}},"tags":{}}],["gener",{"_index":95,"title":{"25":{},"51":{}},"content":{"2":{},"4":{},"5":{},"6":{},"7":{},"22":{},"23":{},"24":{},"25":{},"26":{},"51":{},"55":{},"58":{}},"tags":{}}],["get_embedding(temp[\"page_cont",{"_index":507,"title":{},"content":{"51":{}},"tags":{}}],["git",{"_index":255,"title":{},"content":{"31":{}},"tags":{}}],["github",{"_index":225,"title":{},"content":{"30":{},"31":{}},"tags":{}}],["give",{"_index":150,"title":{},"content":{"15":{},"16":{},"33":{}},"tags":{}}],["go",{"_index":324,"title":{},"content":{"36":{},"43":{}},"tags":{}}],["goal",{"_index":295,"title":{},"content":{"45":{}},"tags":{}}],["goe",{"_index":420,"title":{},"content":{"44":{}},"tags":{}}],["googl",{"_index":143,"title":{},"content":{"10":{},"11":{},"30":{},"33":{}},"tags":{}}],["green",{"_index":355,"title":{},"content":{"39":{}},"tags":{}}],["greet",{"_index":328,"title":{},"content":{"36":{}},"tags":{}}],["hand",{"_index":316,"title":{},"content":{"45":{}},"tags":{}}],["hardest",{"_index":380,"title":{},"content":{"39":{}},"tags":{}}],["haven't",{"_index":343,"title":{},"content":{"37":{}},"tags":{}}],["help",{"_index":529,"title":{},"content":{"58":{}},"tags":{}}],["here",{"_index":306,"title":{},"content":{"45":{},"58":{}},"tags":{}}],["histori",{"_index":29,"title":{},"content":{"8":{},"9":{},"17":{}},"tags":{}}],["homepag",{"_index":281,"title":{},"content":{"33":{}},"tags":{}}],["host",{"_index":147,"title":{},"content":{"15":{},"16":{},"33":{}},"tags":{}}],["https://github.com/mongodb",{"_index":256,"title":{},"content":{"31":{}},"tags":{}}],["i.",{"_index":220,"title":{},"content":{"22":{},"23":{},"24":{},"25":{},"26":{},"51":{}},"tags":{}}],["icon",{"_index":305,"title":{},"content":{"45":{}},"tags":{}}],["import",{"_index":375,"title":{},"content":{"39":{},"46":{}},"tags":{}}],["includ",{"_index":396,"title":{},"content":{"41":{}},"tags":{}}],["incorpor",{"_index":21,"title":{},"content":{"8":{},"9":{},"17":{}},"tags":{}}],["increment",{"_index":120,"title":{},"content":{"4":{},"5":{},"6":{},"7":{}},"tags":{}}],["index",{"_index":186,"title":{"19":{},"55":{}},"content":{"18":{},"19":{},"20":{},"21":{},"49":{},"55":{},"56":{}},"tags":{}}],["industri",{"_index":157,"title":{},"content":{"15":{},"16":{},"33":{}},"tags":{}}],["info",{"_index":331,"title":{},"content":{"36":{},"55":{}},"tags":{}}],["ingest",{"_index":181,"title":{"26":{},"52":{}},"content":{"12":{},"13":{},"14":{},"18":{},"19":{},"20":{},"21":{},"22":{},"23":{},"24":{},"25":{},"26":{},"46":{},"51":{},"52":{},"55":{}},"tags":{}}],["input",{"_index":363,"title":{},"content":{"39":{}},"tags":{}}],["instal",{"_index":267,"title":{},"content":{"31":{},"32":{}},"tags":{}}],["instruct",{"_index":93,"title":{},"content":{"2":{},"5":{},"6":{},"7":{},"15":{},"16":{},"33":{}},"tags":{}}],["instructor",{"_index":311,"title":{},"content":{"45":{}},"tags":{}}],["interest",{"_index":320,"title":{},"content":{"45":{}},"tags":{}}],["introduct",{"_index":294,"title":{"45":{}},"content":{},"tags":{}}],["ip",{"_index":394,"title":{},"content":{"41":{},"43":{}},"tags":{}}],["isn't",{"_index":319,"title":{},"content":{"45":{}},"tags":{}}],["it'",{"_index":427,"title":{},"content":{"46":{}},"tags":{}}],["json",{"_index":438,"title":{},"content":{"55":{}},"tags":{}}],["jupyt",{"_index":137,"title":{},"content":{"10":{},"11":{},"30":{},"31":{}},"tags":{}}],["keep",{"_index":235,"title":{},"content":{"30":{}},"tags":{}}],["key",{"_index":161,"title":{"16":{},"34":{}},"content":{"15":{},"16":{},"33":{},"34":{}},"tags":{}}],["knowledg",{"_index":168,"title":{},"content":{"12":{},"13":{},"14":{},"35":{},"55":{}},"tags":{}}],["lab",{"_index":139,"title":{},"content":{"10":{},"11":{},"12":{},"13":{},"14":{},"15":{},"16":{},"22":{},"23":{},"24":{},"25":{},"26":{},"30":{},"31":{},"33":{},"35":{},"36":{},"39":{},"41":{},"45":{},"46":{},"53":{},"55":{},"58":{}},"tags":{}}],["lab/bin/activ",{"_index":266,"title":{},"content":{"31":{}},"tags":{}}],["langchain",{"_index":518,"title":{},"content":{"53":{}},"tags":{}}],["larg",{"_index":213,"title":{},"content":{"22":{},"23":{},"24":{},"25":{},"26":{},"48":{},"51":{},"55":{}},"tags":{}}],["last",{"_index":165,"title":{},"content":{"15":{},"16":{},"34":{}},"tags":{}}],["later",{"_index":183,"title":{},"content":{"12":{},"13":{},"14":{},"39":{},"42":{},"46":{}},"tags":{}}],["launch",{"_index":268,"title":{},"content":{"31":{}},"tags":{}}],["lead",{"_index":158,"title":{},"content":{"15":{},"16":{},"33":{}},"tags":{}}],["learn",{"_index":167,"title":{},"content":{"12":{},"13":{},"14":{},"35":{},"45":{},"58":{}},"tags":{}}],["lectur",{"_index":308,"title":{},"content":{"45":{}},"tags":{}}],["led",{"_index":312,"title":{},"content":{"45":{}},"tags":{}}],["left",{"_index":416,"title":{},"content":{"43":{}},"tags":{}}],["let'",{"_index":79,"title":{},"content":{"2":{},"5":{},"6":{},"7":{},"18":{},"19":{},"20":{},"21":{},"22":{},"23":{},"24":{},"25":{},"26":{},"53":{},"56":{}},"tags":{}}],["librari",{"_index":76,"title":{"1":{},"3":{},"5":{},"8":{},"18":{},"22":{},"47":{},"50":{}},"content":{"5":{},"6":{},"7":{},"8":{},"9":{},"18":{},"19":{},"20":{},"21":{},"22":{},"23":{},"24":{},"25":{},"26":{},"32":{}},"tags":{}}],["limit",{"_index":466,"title":{},"content":{"49":{},"56":{}},"tags":{}}],["link",{"_index":341,"title":{},"content":{"37":{}},"tags":{}}],["llama",{"_index":90,"title":{},"content":{"2":{},"5":{},"6":{},"7":{},"15":{},"16":{},"33":{}},"tags":{}}],["llm",{"_index":13,"title":{},"content":{"8":{},"9":{},"17":{}},"tags":{}}],["load",{"_index":203,"title":{"23":{},"53":{}},"content":{"22":{},"23":{},"24":{},"25":{},"26":{},"48":{},"53":{}},"tags":{}}],["local",{"_index":248,"title":{"31":{}},"content":{"31":{}},"tags":{}}],["lock",{"_index":385,"title":{},"content":{"40":{}},"tags":{}}],["log",{"_index":287,"title":{},"content":{"34":{},"39":{}},"tags":{}}],["logic",{"_index":20,"title":{},"content":{"8":{},"9":{},"17":{}},"tags":{}}],["login",{"_index":284,"title":{},"content":{"33":{}},"tags":{}}],["look",{"_index":429,"title":{},"content":{"46":{}},"tags":{}}],["lower",{"_index":435,"title":{},"content":{"55":{}},"tags":{}}],["m",{"_index":264,"title":{},"content":{"31":{}},"tags":{}}],["m0",{"_index":362,"title":{},"content":{"39":{}},"tags":{}}],["make",{"_index":234,"title":{},"content":{"30":{},"42":{}},"tags":{}}],["mani",{"_index":5,"title":{},"content":{"8":{},"9":{},"17":{}},"tags":{}}],["manual",{"_index":372,"title":{"43":{}},"content":{"39":{}},"tags":{}}],["match",{"_index":199,"title":{},"content":{"18":{},"19":{},"20":{},"21":{},"42":{},"49":{}},"tags":{}}],["materi",{"_index":309,"title":{},"content":{"45":{}},"tags":{}}],["mean",{"_index":14,"title":{},"content":{"8":{},"9":{},"17":{},"41":{},"45":{}},"tags":{}}],["memori",{"_index":2,"title":{"9":{},"17":{}},"content":{"8":{},"9":{},"12":{},"13":{},"14":{},"17":{},"35":{},"45":{},"58":{}},"tags":{}}],["menu",{"_index":244,"title":{},"content":{"30":{}},"tags":{}}],["messag",{"_index":28,"title":{},"content":{"2":{},"4":{},"8":{},"9":{},"17":{}},"tags":{}}],["message_histori",{"_index":66,"title":{},"content":{"17":{}},"tags":{}}],["messages.append(user_messag",{"_index":70,"title":{},"content":{"17":{}},"tags":{}}],["meta",{"_index":474,"title":{},"content":{"49":{},"56":{}},"tags":{}}],["metadata.languag",{"_index":458,"title":{},"content":{"49":{}},"tags":{}}],["min",{"_index":301,"title":{},"content":{"45":{}},"tags":{}}],["minut",{"_index":346,"title":{},"content":{"37":{}},"tags":{}}],["mixedbread",{"_index":449,"title":{},"content":{"55":{}},"tags":{}}],["modal",{"_index":288,"title":{},"content":{"34":{},"46":{}},"tags":{}}],["mode",{"_index":232,"title":{},"content":{"30":{}},"tags":{}}],["model",{"_index":94,"title":{},"content":{"2":{},"5":{},"6":{},"7":{},"15":{},"16":{},"33":{},"55":{}},"tags":{}}],["model=model",{"_index":105,"title":{},"content":{"2":{},"4":{}},"tags":{}}],["modifi",{"_index":455,"title":{},"content":{"49":{}},"tags":{}}],["mongo",{"_index":298,"title":{},"content":{"45":{}},"tags":{}}],["mongodb",{"_index":30,"title":{"26":{},"36":{},"52":{}},"content":{"2":{},"5":{},"6":{},"7":{},"8":{},"9":{},"12":{},"13":{},"14":{},"17":{},"18":{},"19":{},"20":{},"21":{},"22":{},"23":{},"24":{},"25":{},"26":{},"31":{},"35":{},"36":{},"37":{},"38":{},"39":{},"40":{},"45":{},"48":{},"49":{},"51":{},"52":{},"55":{},"56":{},"58":{}},"tags":{}}],["mongodb+srv://:@:@