<b>Grok is blazingly fast. </b> <b>Here we have the Llama</b> <b>3. 1 8 billion parameter model</b> <b>running next to the GPT-40 Mini model,</b> <b>and as you can see,</b> <b>Grok leaves OpenAI in the dust.
</b> <b>Grok uses their own</b> <b>inference architecture</b> <b>that delivers fast responses</b> <b>from large language models. </b> <b>Grok allows us to run open</b> <b>source models in the cloud,</b> <b>and importantly, offers a</b> <b>generous free tier as well. </b> <b>This is perfect for those</b> <b>of you who want to learn</b> <b>how to build AI</b> <b>applications without spending money,</b> <b>or requiring a powerful</b> <b>PC to run models locally.
</b> <b>And of course, Grok is perfect for</b> <b>building</b> <b>production-grade applications as well. </b> <b>In this video, we'll create a RAG chatbot</b> <b>using Grok and Llama 3. 1.
</b> <b>This demo will demonstrate the tool use</b> <b>capabilities of the Llama 3. 1 model,</b> <b>and you will also learn</b> <b>how to use vector embeddings</b> <b>for answering questions</b> <b>on your own documentation. </b> <b>Let's start by creating a new chat flow.
</b> <b>Let's give it a name like Grok RAG. </b> <b>Let's save this. </b> <b>Then let's start by adding</b> <b>a new node to the canvas.
</b> <b>As with all chat flows,</b> <b>we either need to add an</b> <b>agent or a chains node. </b> <b>Let's add an agent. </b> <b>Within agents, let's add the tool agent.
</b> <b>Let's start by adding our chat model. </b> <b>Let's go to chat models, and</b> <b>let's add the Grok chat node. </b> <b>Then let's attach our</b> <b>LLM to our tool agent.
</b> <b>This Grok chat node requires credentials</b> <b>as well as a model name. </b> <b>Let's have a look at</b> <b>setting up our credentials. </b> <b>First, go to grok.
com, and</b> <b>then sign into your account. </b> <b>I'll simply log in with</b> <b>one of my Google accounts. </b> <b>After signing in, click on Grok Cloud,</b> <b>and this will take you</b> <b>to the Grok playground.
</b> <b>To get an API key, go to API</b> <b>keys on the left-hand side,</b> <b>and then create a new</b> <b>key and give it a name. </b> <b>I'll call mine flow-wise demo. </b> <b>Let's submit this, then copy</b> <b>the key and back in flow-wise,</b> <b>click on the drop-down</b> <b>next to the credentials,</b> <b>and then click on create new.
</b> <b>Give this credential</b> <b>a name like grok API,</b> <b>and then paste in your API key. </b> <b>Let's click on add, and we can now move</b> <b>on to selecting a model. </b> <b>Under model name, we can</b> <b>click on this drop-down</b> <b>to see all the</b> <b>available models within Grok.
</b> <b>Let's select the llama 3. 1</b> <b>70 billion parameter model. </b> <b>Let's set the</b> <b>temperature to something like 0.
6. </b> <b>That's all we have to do</b> <b>to set up our chat model. </b> <b>Next, let's add a memory</b> <b>node by going to add nodes,</b> <b>then under memory, let's</b> <b>add the buffer memory node.
</b> <b>Let's also attach the</b> <b>memory node to our tool agent. </b> <b>Now let's have a look at</b> <b>assigning a tool to this agent. </b> <b>This agent will be</b> <b>used to answer questions</b> <b>about a fictitious</b> <b>restaurant called the Oaken Barrel.
</b> <b>The knowledge base is</b> <b>simply this Word document</b> <b>that contains some questions and answers</b> <b>about the restaurant. </b> <b>So in order to provide information about</b> <b>this Word document to the agent,</b> <b>we need to assign a retriever tool. </b> <b>Under add nodes, let's</b> <b>open up the tools menu,</b> <b>and within tools, let's</b> <b>add the retriever tool.
</b> <b>Let's also assign this retriever tool to</b> <b>the tool input on the tool agent. </b> <b>Now let's give our tool a name like</b> <b>restaurant information. </b> <b>The description is extremely important,</b> <b>as this will tell the</b> <b>agent when to use this tool.
</b> <b>So let's enter something like provides</b> <b>information about the restaurant. </b> <b>Now we need to assign a vector store to</b> <b>this retriever tool. </b> <b>Let's go to add nodes, then</b> <b>let's go to vector stores,</b> <b>and let's simply add this</b> <b>in-memory vector store node.
</b> <b>Let's attach our vector</b> <b>store to the retriever tool,</b> <b>and now we can use this vector store to</b> <b>store and fetch</b> <b>information about our business. </b> <b>Let's start by loading the</b> <b>data from the Word document. </b> <b>So for the document input,</b> <b>let's go to add nodes again,</b> <b>let's go to document loaders, and let's</b> <b>load the docx file node.
</b> <b>Let's also link this docx file to the</b> <b>document input on the vector store. </b> <b>I'm also going to select that Word</b> <b>document from my PC. </b> <b>Let's also add a text</b> <b>splitter to this node.
</b> <b>So under add nodes,</b> <b>let's go to text splitters,</b> <b>and let's add the</b> <b>recursive character text splitter. </b> <b>Like so, I'm going to change the chunk</b> <b>size to 250 with a chunk overlap of 20. </b> <b>Now finally, let's talk about the</b> <b>embeddings function.
</b> <b>At the time of recording, Grok does not</b> <b>offer an embeddings model,</b> <b>or at least there's no</b> <b>such option in Flow-wise. </b> <b>So if I go to embeddings, there's no</b> <b>embedding option for Grok. </b> <b>This will use the</b> <b>voyage AI embeddings node.
</b> <b>So let's connect the voyage AI embeddings</b> <b>node to our vector store as well. </b> <b>In order to use voyage, we do need to set</b> <b>up credentials as well. </b> <b>So under credentials,</b> <b>let's click on create new.
</b> <b>Let's give our credential a</b> <b>name like voyage API demo,</b> <b>and for the voyage API key, we need to go</b> <b>to voyageai. com and sign in. </b> <b>Then let's click on create new API key.
</b> <b>Let's give it a name. </b> <b>I'll just call mine Grok, and</b> <b>let's click on create API key. </b> <b>Let's copy this key, and</b> <b>let's paste it into Flow-wise.
</b> <b>Like so, let's go</b> <b>ahead and save this flow. </b> <b>Then let's load the data from our Word</b> <b>document into the vector store</b> <b>by clicking this green button. </b> <b>Let's click on Absurd to load the data,</b> <b>and we can see that 23 documents were</b> <b>added to the vector store,</b> <b>and we should now be able to ask</b> <b>questions about our document.
</b> <b>So in the chat, let's ask something like,</b> <b>what are your operating hours? </b> <b>And we can see that the tool was indeed</b> <b>used to fetch this information. </b> <b>Let's also ask, what</b> <b>are your current specials?
</b> <b>And again, the tool was definitely used,</b> <b>and the correct</b> <b>information was pulled through. </b> <b>If you enjoyed this video, then please</b> <b>hit the like button and</b> <b>subscribe to my channel. </b> <b>If you would like to</b> <b>learn more about Flow-wise,</b> <b>then you definitely want to check out</b> <b>this multi-agent video over a year.