Description Transcript
0:05 Hey everybody. Uh good morning, good 0:07 afternoon, or good evening depending on 0:09 where you're coming in from. Uh I see 0:11 folks all over the place in the chat. Uh 0:13 so drop us a drop us a message in there 0:14 and let us know where you're joining 0:16 from today. Uh welcome back to day two 0:18 of build week. Yesterday was all about 0:20 large language models, how to use them, 0:22 how to compare them, uh and how to 0:24 decide which one fits best for what 0:26 you're trying to do. Uh and backed by 0:28 popular demand. We have Angelique Levo 0:30 Torres here uh again for day two. Um and 0:34 so yesterday we talked about large 0:35 language models like we said uh the 0:37 winner of the poll for folks favorite 0:38 large language model was GPT4 as kind of 0:41 the most used LLM. Uh so thanks for 0:43 thanks for voting there. Um today we're 0:45 going to get all into vectors uh and rag 0:48 retrieval augmented generation. So, 0:50 we're going to have a bit of a 0:51 presentation from Angelique, like we 0:52 mentioned, uh, and then we'll leave 0:54 plenty of time for Q&A, uh, if you have 0:56 questions about what she's been 0:57 building, uh, the retail platform, all 0:59 that sort of stuff at the end. So, 1:01 today's poll that we're going to share 1:02 in a little bit is kind of what is your 1:04 builder mode today? So, is it more 1:06 precision mode, experiment mode, you're 1:08 just trying to figure out what's going 1:09 on, uh, speedrun mode, or are you just 1:11 straight vibing? So, you'll see that uh, 1:13 come up in Zoom here in just a little 1:14 bit. Um, and also in the chat very 1:17 shortly, we'll be dropping a link to our 1:18 community thread for today. So, that's 1:20 where the replay for this uh video will 1:22 be available. Uh, we'll also post all of 1:24 the questions that everyone has there 1:25 along with the answers. Uh, and if you 1:27 have any questions that you know you 1:28 thought of after we logged off here 1:30 today or just uh didn't want to ask live 1:32 in the chat or in Zoom Q&A, uh, we'll be 1:34 able to answer those for you in that 1:36 community thread as well. So, um, I'm 1:38 excited to introduce Angelique and see 1:40 what she has to show us today. Um, and 1:42 let's dive in. Day two of Build Week. 1:44 Hi, Angelique. 1:46 Hi. Hi, everybody. So happy to be back. 1:48 Thank you, Gina, for that introduction. 1:50 I'm gonna go ahead and actually share my 1:52 screen and we can get to the 1:54 presentation portion. 2:02 Okay, let's do this. 2:06 So, welcome, welcome to the second day 2:08 of AI build week. 2:11 As already mentioned, it is an actual 2:13 week. So, five days of just building and 2:18 with AI, sorry, building with AI and 2:21 retail. Uh, yesterday we spoke a little 2:23 bit about LLM and prompts. Today, we're 2:25 going to be talking about vectors and 2:27 then by the end of the week you're going 2:28 to be learning all stuff about agents. 2:30 So, if you're interested, definitely do 2:32 go check out the link and register. Now, 2:35 my name is Angel Torres. I'm a developer 2:38 advocate here at RET and today we're 2:40 going to take a closer look at how to 2:41 convert your data into a format that 2:44 LLMs can understand and use it to get 2:47 even better responses from your large 2:49 language models. 2:51 For a quick view, a quick preview of 2:53 today, we have an overview of what 2:55 vectors are and how rag works with AI 2:57 apps, why prompt testing matter more 3:00 than benchmark, and a walkthrough of a 3:02 database power app movie search engine. 3:06 Okay, sounds good. Then let's get 3:08 started. 3:10 I want to ground us first in some 3:11 concepts responsible for powering modern 3:14 AI systems today. First, we have vectors 3:16 and then we have rag which is retrieval 3:19 augmented generation. A very familiar 3:21 concept we have of vectors is through 3:23 the concept of math. Now when we say 3:25 vectors, we really mean vector 3:27 embeddings. These are essentially a 3:30 numeric representation of data that 3:32 captures meaning and similarity in 3:34 highdimensional space. Now some of the 3:37 ones that you might know is hugging 3:39 face, pine cone, etc., etc. 3:42 It can often be used to measure 3:44 similarity, but it is also really 3:46 wonderful for storage specifically 3:47 because it makes it easy to search and 3:49 retrieve later. If you give it a piece 3:52 of text that says, "Show me last month's 3:55 quarter sales." A embedding model 3:57 converts that text into a vector and it 4:00 looks something like this. It becomes a 4:04 list of numbers representing its 4:05 meaning, not just words. But let's 4:08 backtrack and understand why that is 4:09 powerful. 4:11 In traditional database, you can only 4:13 search for exact words or exact matches. 4:16 But language is messy and people can 4:18 often ask the same thing in many ways 4:20 like what is the weather today? Is it 4:23 sunny out? 4:25 Do I need an umbrella? All these mean 4:27 roughly the same thing but the words are 4:29 completely different. By converting text 4:32 into vector, you can create a 4:34 mathematical representation of that 4:36 meaning 4:38 like that. This lets you store and 4:40 search for data based on semantic 4:42 similarities, not exact keywords. Why is 4:45 this powerful? Well, because it provides 4:47 better search. You can find relevant 4:49 information even if your user questions 4:52 don't match your documents exactly. It 4:54 has a personalized experience. You can 4:56 recommend content or actions that feel 4:58 similar to the past um preferences. 5:01 Also, AI grounding in rag uh in rag 5:05 workflows. It lets your AI pull accurate 5:08 real company data that generates answers 5:10 rather than just guessing. 5:13 Now, you might have heard of the concept 5:15 of unstructured data, but what does that 5:17 really constitute? Well, unstructured 5:19 data is information that doesn't fit 5:21 neatly into rows and columns. Some 5:23 examples are 5:26 PDFs, word documents, slides, email 5:28 threads, Slack messages, web pages, blog 5:31 posts, customer support, chat, etc., 5:34 etc. Now, we can't just all do SQL 5:38 queries like select all were subject AI 5:40 on this type of content because it isn't 5:42 broken into structured fields. The 5:45 benefit of storing in vectors is that 5:48 you can search based on meaning which we 5:50 spoken about. So, even if your documents 5:53 are hundreds of pages long, you don't 5:55 have to explicitly tag or select which 5:58 fields are going to be what. You can 6:00 also quickly find most relevant 6:02 snippets, paragraph, or document chunks 6:04 without needing to pre-label everything. 6:06 And you can make unstructured data 6:08 querable and actionable. 6:12 There's also another word that you might 6:13 have heard of, which is what is rag. Rag 6:16 is a technique that combines two 6:18 strings. Is the LLM's ability to 6:20 generate text and your own private or 6:23 external data. Instead of asking the 6:25 model to guess an answer from its 6:27 training data, rag first retrieves 6:29 relevant information from a database or 6:31 document store 6:33 uh often using the vector we're talking 6:36 about. So some known ones are a lang 6:38 chain, pine cone and llama index. The 6:41 magic here is that it delivers a 6:43 contextaware answer. 6:45 The benefits are well AI is more 6:48 accurate. It grounds the answer with 6:50 real up-to-date data instead of relying 6:52 purely on pre-trained knowledge. It 6:55 keeps the data business specific and it 6:58 reduces hallucinations making less 7:00 things up or incorrect answers. 7:03 So like any code, we will always need to 7:06 test it and specifically there's always 7:08 going to be some, you know, benchmarks 7:10 and testing involved, right? So 7:12 benchmarks are a good way to measure how 7:14 good a thing is at standardized task or 7:16 specifically the thing being the model 7:19 but they don't really reflect your real 7:21 business data or your information in 7:23 your information documents. When you use 7:26 rag with vectors in retool the model's 7:29 performance depends on how well it 7:31 retrieves it and it uses your data. 7:34 This becomes critical because your app 7:36 might be pulling from support tickets or 7:39 policy documents or marketing copies 7:42 that yeah they might just be all over 7:43 the place. The exact phrasing of prompts 7:46 can also completely change when 7:48 documents are retrieved and how the 7:50 final answer is generated. Then prompt 7:52 testing also helps with grounding 7:54 answers rather than hallucinating. So 7:57 this might seem simple but helping your 8:00 vector with a schema, a testing model or 8:02 even in a different prompt instruction 8:04 like uh summarize concisely, always 8:07 include links or use bullet points can 8:10 really impact the answer. 8:12 Okay. So now we're going to build this 8:15 thing that I mentioned at the beginning, 8:16 the movie search database AI vibe thing. 8:20 Okay. Uh so what I'm going to do is 8:22 actually uh somebody should drop a link 8:25 into the drive which is the resources 8:27 that you're going to have access to and 8:29 it's going to be this folder here. So 8:33 this document is actually for you guys 8:34 to decide whether you just want to watch 8:36 me do it and then work on it later or if 8:39 this is something that you want to like 8:41 uh copy the code as I'm working on it. 8:44 Just up to you. just make a copy of it 8:46 rather than request edit just because a 8:48 lot of people are going to be joining 8:49 and gonna want to do the same thing. So 8:51 the first thing that we're being asked 8:52 is to download this letter box review. 8:55 So I'm going to show you how the actual 8:57 final answer or app that I built looks 9:00 like. It's a scenic sense is what I call 9:02 it. Uh much of this is just, you know, 9:04 UI. But here's um I'm actually going to 9:08 ask you guys, can you write on the chat 9:11 anything you want me to ask? It kind of 9:13 based on what you learn. Remember that 9:15 it doesn't have to be exact words. It 9:17 could just be kind of like a feeling of 9:18 a type of movie that you want to watch. 9:20 So, I'm going to check out the chat for 9:21 a second. 9:28 If nobody has anything, then I can go 9:30 ahead and Okay. What is a Okay. So, 9:33 okay. Okay. Wait, wait. I forgot to say. 9:36 So, this is only with the AMC knowledge. 9:39 So, anything that has to do with the Mar 9:42 the Marvel Cinematic Universe. 9:48 Okay. Um, I'm actually going to take No, 9:52 Captain America. Okay, cool. I'm I'm 9:54 just going to write one. Okay, here's 9:56 one. I'm gonna write 9:59 a high school movie that is cute. Let's 10:01 see how that works. And the information 10:04 that I'm gonna be retrieving is actually 10:06 from a vector that has all the 10:08 knowledge, which is this one over here 10:10 is a document that contains all the 10:11 letter box reviews, the top three 10:13 reviews of all of the movies in the 10:15 cinematic universe. So, the 36 of them, 10:17 even down to like the one that came out 10:19 this year. Um, and it's going to take 10:21 that information and give me a poster 10:23 and a trailer. So, right now I recommend 10:25 the Spider-Man Homecoming and this is 10:28 the trailer for this movie. Cool. Um, so 10:33 I will do the other ones that you guys I 10:34 like the I like one of the prompts here. 10:36 So, I'm going to do this one at the end. 10:38 And right now, I'm going to help you 10:39 guys build this. So, you're going to 10:40 download this one, the AMC letter of box 10:43 review. And we're going to go and this 10:45 is in my space. You should log into your 10:47 retool um like workflow and then we're 10:51 going to go into resources. From there, 10:53 we're going to go into retool vectors 10:57 and then we're going to create a new 10:58 one. So, a new vector and I'm going to 11:01 name this MCU. Simple. Um, the default 11:04 embedding model, there's three right 11:06 now. Um, I'm simply going to use the 11:08 ADA, but depending on whether you have a 11:12 small or large enough text file that 11:14 this can be really relevant when doing 11:16 the context chunks. So I'm not going to 11:19 do a filter label. And the default meta 11:22 data is actually just something that you 11:24 want all of the documents in this vector 11:26 to have that information. So something 11:28 like I don't know like the company name. 11:31 So I can do company 11:39 and then I can do 11:42 this the Whoops. Okay. And I'm going to 11:46 do a document. You can also uh look 11:48 through URLs. You can say like which 11:50 URLs you want it to look through and the 11:52 URLs that you don't want it to look 11:53 through. But for now, just a document is 11:55 fine. 11:56 I'm going to create it. And over here, 11:58 I'm going to add the document. I'm going 12:00 to download it the same way that you 12:01 guys are doing it. So, just download it. 12:04 And over here, add document. 12:06 And as you can see now, every single 12:09 document that gets added in here is 12:11 going to have this metadata. The same 12:12 thing if I added some filter labels, it 12:14 would be an option here. But just for 12:16 now, it's going to be simple like that. 12:18 This is my document. There you have it. 12:20 And click on it and upload it. 12:25 So I can actually look through it. And 12:26 this is where the embedding that we were 12:28 talking about, the ADA or the small or 12:31 the large one. This is where the context 12:33 chunks will look differently based on 12:34 the way that it's processed. For now, 12:36 this is good for me. Um, so I'm going to 12:39 be done and I'm going to start building. 12:41 So I'm going to go to apps. I'm going to 12:43 create an app. 12:47 And uh what do you see over here? Well, 12:49 this is mainly just UI. The most 12:51 important thing here is the text input. 12:53 So, I'm going to go into my add UI area 12:56 and I'm going to do text input. This is 12:59 my inspector area. I'm just going to 13:01 change this to ask me anything 13:05 you want to look up. It's very long, but 13:09 you can see that it changes instantly. 13:11 I'm not going to do the label, but I'm 13:13 rather going to do on the plus icon on 13:15 the add-ons a prefix icon. And I'm going 13:17 to do search. 13:21 And instead of me just having it plain 13:23 like this where I don't have a submit 13:25 button, I'm going to actually add a 13:27 submit button. 13:29 And I'm going to name this search. This 13:32 is all good to me. You can change the 13:34 color and appearance and the style. I'm 13:36 going to name this. very important that 13:37 you are correct about your labeling 13:39 specifically if you're going to walk 13:40 through the document that I provided. 13:43 Um, so keep that in mind if you're not. 13:47 And now this one I didn't change it. 13:49 Instead of text input one, it's going to 13:50 be called prompt. 13:52 Cool. Just like that. Uh, I can move 13:55 this down to be in the middle. I could 13:57 have added like an image here to add the 13:59 logo, but rather I'm going to go into my 14:02 app settings and I'm going to go into 14:04 app themes. This actually is a great 14:06 space where you can customize the entire 14:08 look of your app. So something like, oh, 14:10 I want it to be that color. I want it to 14:13 be almost like this pinkish. I want the 14:16 canvas to be rather this other color. 14:19 And maybe not. Maybe not pink for that 14:22 one. Okay, 14:24 this seems all right. Right. Okay. 14:27 So, what I'm going to do now is actually 14:30 go into code. In code, I'm going to be 14:33 creating a workflow. And this is where 14:35 all the execution of this movie search 14:38 thing is going to happen in. So, I'm 14:39 going to do plus I'm gonna resource 14:41 query and I'm going to look up workflow. 14:45 Okay. I'm going to rename this 14:49 MCU knowledge. 14:52 There you go. And I'm going to in the 14:55 select workflow, I'm going to create a 14:56 new workflow. So, I just press on it and 14:59 it opens up a whole new tab where you 15:00 are going to be working on your 15:02 workflows and 15:04 loading my workflow. Okay, I'm going to 15:06 rename this uh AI search engine. Cool. 15:11 And I'm going to go back to where my app 15:13 is. I'm going to select that same thing. 15:15 I can actually just refresh. So you see 15:17 the new name 15:20 is here in code tab MCU 15:26 AI search engine. Uh I'm going to leave 15:28 the run until parameters as finished and 15:31 instead of raw I'm going to do JSON. 15:34 What are we going to do here? It's 15:35 asking for a key and a value. Well, 15:37 whatever my prompt is is what I want to 15:40 send back to be over here. So going to 15:43 delete this code because I don't need 15:44 it. 15:45 And as you can see, it's a start 15:47 trigger. So that's what I'm going to do. 15:49 I'm going to name this 15:51 start 15:53 trigger. And I'm going to inject the 15:56 answer from the prompt. So prompt 15:59 do value. How do I know if this works? 16:01 Well, I can type uh high school movie. 16:06 Then if I go over here, it should say 16:08 that's the value of high school movie. 16:09 Cool. Um before we leave this, I think I 16:12 should just attach it now. I'm going to 16:14 go into the enter button and I'm going 16:16 to go into event handlers. From there 16:18 I'm going to do a control query and I'm 16:21 going to do MCU knowledge. So now 16:23 whenever I click it, this workflows is 16:25 going to run but nothing is there. So 16:27 nothing is going to run. I'm going to 16:28 save this and 16:31 cool. I'm going to go now into the 16:33 workflow. Okay. So what I like to do 16:36 since we're going to be building off 16:38 each block from one another, I like to 16:39 write my test JSON parameter right now. 16:42 Um, so as you can see, it's a curly 16:44 bracket and then the rotation. So I'm 16:46 going to do 16:48 start trigger 16:51 and I'm going to do a bor film to just 16:54 be as simple as that. I could be a lot 16:56 more specific, but this is good. Um, and 17:00 I'm going to add an AI action. This AI 17:04 action, I'm going to call it uh get 17:07 vector info. So there you go. and I'm 17:11 going to generate a text. This is 17:13 essentially what is going to analyze 17:15 what the recommendation should be, 17:17 right? Um I'm going to do the 17:20 start trigger 17:23 data. It's not three curly bracket. It's 17:25 just two curly brackets. That is good as 17:28 my input. My system message is something 17:30 that is already in here. So I'm going to 17:32 go ahead and copy this and I will break 17:36 it down into what is being said here and 17:39 copy this. put it here. Okay. So, this 17:43 is actually a great way as we move on to 17:45 agents eventually um to how are you 17:48 going to give it like a specific 17:49 persona? How are you going to tell it 17:51 what to do, what one not to do? So, 17:53 here's my system prompt. I'm telling it 17:55 that is an intelligent movie 17:56 recommendation assistant that is 17:58 primarily just going to recommend me 18:00 from the MCU and the top three letter 18:02 box reviews. Um also I'm giving it 18:06 instructions in terms of like hey 18:08 analyze this then look at the emotions 18:11 that people are providing. So something 18:13 that makes you cry then look for parts 18:15 of the words that might say hey that is 18:17 a tearjerker or that's very emotional or 18:20 heartfelt whether the person's asking 18:22 for something epic then be doing like be 18:25 searching for thrilling action or high 18:27 stakes or epic battles and then I give 18:29 it actually an example of how that 18:31 answer should be provided. Now the 18:33 temperature I want this to be you know 18:35 it can be as creative as it wants but 18:36 for now I want it to follow my 18:38 instructions. So I want it to be very 18:39 deterministic and in here I'm going to 18:42 click the use retail vector to provide 18:44 more context for my query and I'm going 18:46 to select the MCU which is the vector 18:48 that we created at the beginning. 18:51 I'm not going to add anything for the 18:52 filter. And um this is where it's more 18:55 dependent on which model you like the 18:57 most depending on the analysis. If I use 18:59 this one, it could be kind of 19:00 straightforward and it's very narrow in 19:03 thinking complexwise in terms of 19:05 people's emotions and the way that they 19:06 write the prompt. So, I'm actually I 19:09 actually like a lot of Deepseek V3. V uh 19:13 R1 is actually better, but it takes a 19:15 long time. So, this for now, I'm going 19:17 to click play in here and see what 19:19 happens. takes longer than something 19:21 like uh something from OpenAI, but 19:24 ultimately I do like the answer better 19:26 just because it reviews everything that 19:27 was in the vector. R1 is very thorough. 19:31 And here we have our first answer. We 19:33 have Doctor Strange in the multi 19:35 multiverse of madness, thunder and love 19:39 and thunder and black panther Wakanda 19:40 forever and Ethernos. Okay, so we're 19:42 having four. Um, this is also where you 19:46 would see based on the model like how 19:48 good are they at distinguishing and like 19:51 if something is a horror because um I 19:54 wouldn't call Wakanda a horror film but 19:57 it it also is based on this information 20:00 here right maybe the reviews do call it 20:02 a little bit horrorish or like the more 20:05 information the more context it has the 20:07 more rich it can be so always uh give a 20:10 lot of data so then you can have better 20:11 results. Now, the next thing that I'm 20:14 going to do is add another AI action. 20:18 This AI action is going to be called 20:20 extract info. And what I want to get is 20:23 the titles of the things listed here. 20:25 How do I do that? Well, I'm going to 20:27 extract entity from text. 20:30 Okay, 20:32 there you go. I'm going to input this 20:35 using the get vector info MCU data. I'm 20:38 going to extract each recommended title 20:40 as a separate entity. Each movie should 20:42 be shown as movie title and year. Okay. 20:44 And the way that I want to um extract 20:46 the entity, I am going to dynamically 20:49 set this and I'm going to create an 20:50 array. I since it's 36 movies, I don't 20:53 think it should recommend me more than 20:55 10. So for now, I'm going to cap it at 20:56 10. Um and I can use the GPT40 mini. 21:00 That seems extremely good to me just 21:02 because it's concise. 21:04 As you can see, it has extracted the 21:05 four titles that I was given. Okay. The 21:08 next thing I'm going to do is another AI 21:10 action. This AI action is going to be po 21:13 called poster trailers. 21:15 Cool. Name it here. And this one I want 21:19 it to give me the poster URLs and the 21:21 trailer URL. Okay. So, generate text is 21:24 good for me. The input is going to be 21:27 the extract info data which is this one 21:30 over here. Something really cool about 21:31 retool is that whenever you change 21:33 labels and you have already pre-attached 21:34 it to something, it automatically 21:36 updates. So if I were to name this 21:37 extract entity, 21:40 tada, I'm going to go back to extract 21:42 info though. Uh so just consistency 21:46 wise. So I'm going to go now into 21:48 writing the system message and this is 21:52 what I've written. I've written, hey, 21:53 take the information from here and I 21:55 want you to look up at the movie 21:58 database website. That is your first 22:00 choice. However, if you don't find it, 22:01 then look at IMDb or look at Wikipedia. 22:04 Otherwise, for the trailers, then look 22:06 at YouTube. If YouTube doesn't work, 22:08 then Vimeo, Apple trailers, or IMDb. 22:10 Just give me the URL as simply as this. 22:14 This is the format that I want the the 22:16 answer to be in. And if I run this, 22:20 oh, uh, let me see. Oh, I actually want 22:23 to do I'm going to change my model. 22:25 Actually, I'm going to do GPT4 22:28 one because it has the ability to look 22:31 for the latest uh, information. So, for 22:33 examp I did an example where it showed 22:34 like Deadpool and something that was in 22:36 2024. 22:38 Then it wasn't able to register it. So, 22:39 I'm going to run it with this one just 22:41 because it's um pulling from the latest 22:44 information. Not that these movies are 22:46 very old or anything or recently. And 22:49 there you have it. This is the format 22:50 that the answers are being provided. 22:52 Cool. If you're having any issues at any 22:54 point, um, we're not there yet, but 22:57 eventually when we finish where the 22:59 image might not be showing or the URL 23:01 isn't correct, this is the space where 23:03 you will edit that. You try to be as 23:05 concise as you can be or if you have 23:07 another website that has trailers and 23:09 posters that you want to pull from, then 23:10 this is the system message that you will 23:12 edit. Now, what I want to do is extract 23:15 this information as something more like 23:17 an array. So I'm going to add a code 23:20 and it's going to be a JavaScript and I 23:23 am just since I already know what the 23:26 structure is going to be because I said 23:27 it what it's going to be then I can be 23:29 very precise about how I get that 23:30 information out. My label for this is 23:32 going to be label text and if I run this 23:37 there you have it. You have the title 23:38 poster trailer. Amazing. So the next 23:41 thing that I want to do is send that 23:43 information back because I want to be 23:45 able to attach it to something that is 23:48 something like this, right? I want to be 23:49 able to modify this information and pull 23:51 it every single time. So I'm going to go 23:55 here and I'm going to add a response 23:57 block. I can leave it like response one 24:00 to uh 200 is fine. And this is going to 24:03 have a return body of movie info and 24:06 it's going to be the label uh label text 24:09 data. If I run this, it should set 24:11 successful or and show me what it 24:13 actually looks like. Um, I can deploy 24:16 this before we continue editing this in 24:18 the f uh for future editing. I'm going 24:21 to go over here and I'm going to now add 24:25 a grid view. So, I'm going to go back 24:29 into the UI space and grid view. Here 24:32 you have it. Um, this is great because 24:36 it doesn't matter the amount of 24:37 recommendations it has. It's going to 24:39 duplicate the same thing for each of the 24:41 components that you see here. I'm going 24:43 to connect the data to be the one from 24:44 the MCU knowledge. And if I go here, um, 24:49 this is going to be movie. 24:52 Where is it? 24:56 Okay, it's going to be item data. 25:00 Info. So when I access the other things, 25:02 I could just simply say trailer and 25:04 poster. And it doesn't have to doesn't 25:06 have to be that complex. I also want to 25:08 set this up with a little bit of 25:09 padding. I want to set this to hidden. I 25:12 don't want to show it when there's no 25:14 answers or anything at the beginning. 25:17 And I want to do the height as fixed. 25:20 Um, so I'm going to change it to here. 25:23 It could be auto. Doesn't really matter. 25:25 It's up to you. The preference that 25:27 seems good enough for me. And what I 25:30 want to do now is that if I go into the 25:33 component area here, this side component 25:36 tree, I have a grid view one. And if I 25:38 click on it, I'm going to have a 25:40 container one. What I want to do is this 25:42 is going to be my title. So I'm going to 25:44 name this movie title. 25:48 And the name of this is going to be this 25:51 is where you are writing uh the 25:53 item.ovinfo.title 25:56 in the value space. There you have it. 25:58 I'm going to add another one in the plus 26:00 icon here. I'm going to add it as image. 26:04 And then I'm also going to add a button. 26:05 The button is going to have the action 26:07 of going to another trailer. Well, going 26:10 to the trailer URL. I'm going to name 26:12 this movie poster. 26:16 Okay. 26:19 And I'm going to change the image URL. 26:21 It's going to be this right now as red. 26:25 Don't worry, it will work. We don't uh 26:28 we haven't set it up so that's why it's 26:30 showing up as red. So movie trailer 26:34 and I'm going to change the text to 26:36 trailer and I'm going to add an event 26:38 handler and this event handler is going 26:40 to be go to the URL and I'm going to the 26:44 URL. I mean you might know what it 26:46 already going to look like but I'm going 26:48 to inject the trailer. There you have 26:50 it. Cool. So how do we know if this 26:53 works and doesn't work? Well, aside from 26:55 the enter button, we have attached the 26:57 MCU knowledge trigger, but I want to 26:59 also show the grid. So, I'm going to go 27:03 into control component and I'm going to 27:06 do the grid view one and I'm going to do 27:09 set hidden. And I'm going to un like 27:11 uncheck that because it's already set to 27:13 hidden as a default and this is going to 27:16 um set it to visible. 27:18 Okay. Um let's see how it works. Let's 27:21 let's see. I'm going to publish this in 27:24 my own publish. 27:27 Cool. Um, should I should change that 27:30 name later, but 27:33 let me see. Let me see. Let me see. I 27:35 think somebody said something here that 27:36 I liked. 27:38 Okay, I'm going to run this one that I 27:41 saw that I liked. Okay, somebody wrote a 27:45 movie that will make me cry a lot. I'm 27:48 going to search that. 27:50 Down here you can see the runtime of how 27:52 much is taking. This is now like based 27:54 on the workflow. Um each model is going 27:56 to take their time depending on how fast 27:59 or how complex the reasoning is. So that 28:01 is why if you want something shorter 28:03 then choose models that run on the 28:05 faster side. If you want something more 28:06 thorough then just be aware that this is 28:08 going to take longer than that. Okay. 28:10 Tada. Well, we we have a an awkward one 28:14 here. Uh but I'm going to fix this now. 28:16 I'm going to go back into the app 28:19 and I'm going to run the same thing, a 28:21 movie that will make me cry a lot. 28:26 And I searching it here. And the reason 28:28 is that we want to modify the way that 28:30 the trailers and the poster button is 28:33 going to look like. Um, 28:37 let's give it a few seconds. 28:42 I want to check in with everybody if 28:43 anybody has any questions of something. 28:47 Um, 28:50 okay. Yeah, if anybody has any questions 28:52 or is lost at any point, I'm checking 28:54 this and um I can incorporate or go back 28:57 to visit anything particularly. Okay. 28:59 So, we're seeing a couple things that 29:00 are good to know. So, first thing is 29:02 that we want to make this auto um or 29:06 those are too small. Okay. Then let's do 29:09 the grid instead as auto. 29:13 Okay, let's set this to auto. And then 29:16 let's move Oh, well, we know that that 29:18 trailer works. Uh, let's move this to be 29:22 longer. 29:31 I'm trying to fix the size of this. 29:34 Okay. Not like that. Sorry. I'm just 29:37 trying to modify this space over here. 29:41 Oh, this one. Sorry. I have to modify 29:43 the first one. Uh, okay. 29:46 That is why it's showing as a small one 29:48 because this one is small. Okay. So, I 29:50 am going to change it like this. And 29:52 there you have it. Something a little 29:53 bit more reasonable. Um, as you can see, 29:57 the first one is the one that needs to 29:58 be changed for the other ones to be 29:59 changed. This one is now not generating 30:01 a panco. Um, and this one is not showing 30:04 anything. So, I'm going to do another 30:05 iteration of this. So, I'm going to do a 30:08 romantic film for a date. Uh, 30:14 and let's see what the answers are. Um, 30:17 maybe I can fix this to 30:24 loading. 30:28 Okay, 30:30 there you have it. So, it should be 30:32 working right now. Um there's a couple 30:34 hiccups as you can see of like maybe the 30:36 URL is not working as well. That is 30:38 where you go back to this space over 30:40 here um to recommended another space 30:42 that they can get the URLs from. Or you 30:44 can even add like something like a 30:46 checker of is this URL working and it's 30:49 producing an actual image. That would be 30:51 good. Um something else that I want to 30:53 add just because it's important when 30:54 we're working with vectors. Vectors are 30:56 not only good for retrieval information 30:57 but also once you have the information 31:00 you want to maybe store it somewhere. 31:02 So, let's say that you have like a 31:04 catalog, a bunch of clothing or you have 31:06 a store that you're running and you want 31:08 to run an inventory. Well, sometimes the 31:10 information is going to be changing 31:11 because people buy it, it goes sold out 31:13 and everything, right? Well, uh this 31:15 vector can be very much looked as um I 31:18 don't know like a set of rules for a 31:20 customer service support system. So, if 31:22 the question is this, then maybe this is 31:24 the contest that you should provide. 31:26 Right? Now, if you have something where 31:28 you want to keep track of everything 31:29 that is being sold out, you can also 31:31 keep updating your vector or adding 31:33 other documents to your vector, per se. 31:35 So, how do we do that? Well, I'm going 31:37 to continue on from the workflow. And if 31:39 I go back here, I'm going to add another 31:42 AI action. 31:44 This AI action is going to be for 31:47 vectors. Well, it's not really an AI 31:49 action, but yeah. Yeah, there you go. 31:51 Um, and I am gonna get the document 31:54 chunks. 31:56 The vector is going to be the MCU one. 31:58 And I want to name the document movie 32:00 additional data. And what I want to do 32:02 is save the poster URL and the trailer 32:05 URL. So I go in here and from there I'm 32:08 going to name this prior information 32:12 quote. There I want to add a code. This 32:15 code what we do is merge the prior 32:17 information. So we're going to do an 32:20 upsert. So that means that if the 32:22 document is not there, then insert it. 32:24 If the document is there, then update 32:25 it. However, a primary thing about it is 32:28 that it will automatically overwrite if 32:31 you don't read the information that was 32:33 prior there. So that's what we're doing 32:35 now. We're merging the old with the new. 32:37 So I'm going to call this merge. 32:42 And there we go. I can run this. 32:46 Okay. Uh there's nothing there because 32:48 there was nothing prior. So merge. 32:52 Oh, okay. And the fine because I don't 32:55 have anything here. Okay. I'll fix that 32:56 in a second. Um and then the last thing 32:59 that we should do is an AI action. So 33:02 something like this would be upsert 33:04 document. 33:06 It should be retool vectors. There you 33:09 go. 33:11 MCU. 33:12 And I'm going to do the merge data. 33:18 My document name is actually going to be 33:20 the same one. So there you have it. 33:23 Additional data d. Okay. Um and I can 33:27 name this update. Cool. Uh this is 33:31 generating an issue because there's no 33:33 prior information here. So actually I'm 33:36 just going to show you how this looks 33:37 and fix it in the document later. So 33:39 because we're running a little bit tight 33:41 on time. So if I were to show you how 33:43 this workflow actually looks in action, 33:47 I go over here, 33:49 [Music] 33:53 if I go into resources, I go into retool 33:55 vectors and I go into MCU, 33:58 I can see that a new document has been 34:01 created. So, movie additional data and 34:03 in here it has all the prior tests that 34:05 I've been running and it has stuff from 34:07 like the Spider-Man Homecoming, the 34:09 Captain America, Black Widow, Doctor 34:11 Strange, and it just keeps adding 34:13 information, making sure that it doesn't 34:15 repeat any of them. Okay, cool. Um, I'm 34:19 going to pause in there. 34:22 Um, just for if anybody is wanting to do 34:25 it on theirel, another alternative that 34:27 you can do is something like this. You 34:29 can add a branch here and you can do a 34:32 yeah like a branch and then you can get 34:34 the prior information or get what 34:38 documents are in that vector from that 34:40 information then you see if that 34:43 document has already been included 34:44 rather than like create it from scratch 34:46 and if it is then then go into this area 34:49 where you update it otherwise just 34:50 create the document. So, I'll fix it in 34:53 there and we'll see what uh from there 34:56 how it works. But, uh that kind of 34:58 brings us to the end unless anybody has 35:01 any other things. Let me see. Um I'm 35:04 going to go back here. Let me see if 35:06 anybody has any other questions. 35:08 Otherwise, I'm going to jump into Q&A. 35:11 Um 35:16 I'm going to stop sharing over here. 35:19 Awesome. 35:22 Yeah, thanks Angelique. We we've been 35:24 compiling some of the questions uh in in 35:26 our doc there. So, go ahead and uh and 35:28 look through some of those and pick one 35:29 you like. But as a reminder for for 35:31 other folks, um yeah, if you have any 35:33 questions about, you know, anything that 35:35 Analie showed in her presentation or 35:36 kind of retool AI and vectors and things 35:39 and how that works in retool in general, 35:41 uh drop them in the chat or in the Zoom 35:42 Q&A and we'll we'll go through those. 35:44 So, um yeah, Angelique, you have you 35:46 have one you want to start with? Sorry, 35:49 I just pulled it up. Uh, okay. Give me 35:52 one second. Can I have multiple PDFs to 35:56 search in? Yes, you can only add a 35:59 single PDF to the vectors in the 36:01 example, but you can add as multiple 36:04 PDFs as you want in the same process. 36:06 And it's actually pretty good because 36:07 that uh that way you have a centralized 36:09 space in the vector. let's say the MCU 36:11 and I wanted to add like one that is 36:13 like here are the rules or here's like 36:16 other uh reviews or here's other places 36:18 like let's say if I were to categorize 36:20 it from users review to like critics 36:22 review then uh you can add different 36:25 vectors and then actually name them. So 36:27 let me actually show you where that 36:29 would be. 36:30 Um 36:32 let me share my screen quickly. 36:36 So go if I go back here actually and 36:39 then MCU knowledge let's go into our 36:42 workflow. 36:45 Okay here there you go. I can just 36:47 create a new vector or I can add it or 36:50 if it's inside the document itself then 36:52 the document would just be there and you 36:53 just have to list one vector. 36:56 Um 36:59 I'll I'll maybe grab one of these while 37:00 you're looking through the list. Um 37:01 James just asked why set this up as a 37:03 workflow as opposed to using an agent 37:04 for this? And this is a good question 37:06 and one we get pretty frequently. Um, 37:08 you know, ultimately like the 37:09 architecture when you're building an AI 37:11 system like this is is kind of something 37:12 you have to figure out what's going to 37:14 work best for you. Um, the behavior that 37:17 we were looking for here was a little 37:19 bit more deterministic in that we were 37:21 just kind of running a search, you know, 37:22 a single time. We wanted to be able to 37:24 control that endtoend experience and 37:26 that's what Angelique was doing when she 37:28 laid out each of the blocks there. Um 37:30 whereas with an agent, and this is again 37:31 a little bit of a preview for what we'll 37:32 talk about on Friday, um an agent will 37:35 be able to kind of go through multiple 37:36 iterations of searching, deciding if it 37:38 thought the results were good, maybe 37:39 doing another search with different 37:41 parameters or things like that. Um and 37:43 so if that's the behavior that you want 37:45 or if you have things like a bigger data 37:47 set or data sets from multiple sources 37:48 or or stuff like that, um that may be a 37:51 case where an agent makes a lot more 37:52 sense. And we'll look at some of those 37:53 use cases on Friday. But um in this case 37:56 we wanted to just kind of show uh you 37:58 know we have our our vector data and we 37:59 have you know a pipeline that allows us 38:01 to kind of look through that uh and push 38:03 the results back into uh the UI we 38:04 created in the app. So ultimately it's 38:06 it's a little bit use case specific but 38:09 um yeah you could you could build this 38:11 in a lot of different ways. This is just 38:12 the way we chose to do it today. 38:15 Yeah. Um it's also great to separate 38:18 things out and like makes the workflow 38:20 just be a little bit cleaner and your 38:21 space. Also I have another question 38:23 here. Can I generate retool config like 38:26 input buttons and triggers with AI a 38:28 little like claude na n and json? Uh 38:32 well AI assisted apps generation and 38:35 retail is coming soon. We'll be dropping 38:37 a link in the chat actually for the 38:38 weight list that we have but more 38:41 broadly early customers uh we're 38:43 onboarding early customers and then 38:45 we're also going to be rolling it out 38:46 very soon. 38:50 Um let me see another one. 38:53 What type of data cleanup is recommended 38:55 prior to adding a PDFs or other type of 38:58 documents/files to a vector database and 39:01 retool? Um, I guess this is a little bit 39:03 like user dependent or use case 39:06 dependent, but keeping each PDF focused 39:08 on a single topic and mostly text as 39:11 opposed to being super imageheavy are 39:14 some general best practices to follow. 39:19 Uh, let's see. 39:21 I wanted to call out this one here real 39:23 quick while we're while we're looking 39:24 through. Um we we got a question pretty 39:27 early on. Uh could I trigger this from 39:29 an external post request via like a 39:31 Slackbot for example? Um so the the 39:34 workflow that that Andre set up 39:35 absolutely all the workflows that you 39:37 build and retool can be triggered via 39:39 web hook which means you can use Slack 39:41 or any other tool to trigger them uh via 39:43 a post request. So that would be another 39:45 option if you didn't want to have kind 39:47 of the UI that uh we built here and 39:49 trigger it via Slack instead. Um because 39:51 that logic is separated out into a 39:53 workflow. Um you could trigger that via 39:55 Slack or any other system, Telegram, 39:57 etc. that uses uh that uses post 39:59 requests for that because workflows 40:01 support uh using using a web up there. 40:04 Um and that also kind of gets to another 40:06 question that we had that I just wanted 40:08 to cover really quickly. Um the the 40:10 question like really pretty early on was 40:12 why kind of separate the logic uh in an 40:15 app plus a workflow where you could have 40:17 just created all the queries in an app. 40:19 Um and yeah I don't know Angelique if 40:21 you have anything you wanted to say 40:22 about kind of your specific 40:23 architectural decisions there but um 40:27 that was all we got. 40:28 Um I think for me again it's just about 40:31 keeping it clean. I started out like 40:33 actually when I was building this like 40:35 building all of them in the code tab and 40:37 just like having a mess of them but then 40:39 it was just harder to kind of like 40:40 bridge that connection while in 40:42 workflows it's just actually such a 40:43 visual like interface. I can just like 40:45 drag and drop and I make sure that it's 40:47 sequential and I know what it looks 40:48 like. Um also yeah when it comes to the 40:50 app it's pretty clean. It's like it's 40:52 only one thing that I have to call and 40:54 the whole thing is being generated 40:55 elsewhere. I can also whenever there's 40:58 issue I can go directly there and refer 40:59 it back rather than look at the every 41:02 single like AI action or resource query 41:04 that I have created and go I don't even 41:06 know which one's the first one or which 41:07 one is causing what to happen. Um I see 41:10 another one in the chat actually I have 41:12 created a vector DB in pine cone can I 41:14 hook it can I hook that up yes of course 41:17 um as you can see in your work like in 41:20 your workspace um you have resources I'm 41:23 trying to see if I have it over here um 41:26 you have resources and you can connect 41:28 anything that's I mean that's the whole 41:29 point you want to bring your data bring 41:31 your data from everywhere connect it 41:32 here and have it be in a singular space 41:34 but that's what makes it so rich so if 41:36 you go to create new create resources 41:39 then you have every single one of them 41:40 that you can connect to and there's a 41:42 bunch of logos and I would invite you to 41:44 go and try that out 41:49 [Music] 41:52 cool another one we got that we haven't 41:53 covered yet uh just just came in from 41:56 Cairo when building the vector from a 41:58 site URL which is again something that 42:00 showed we didn't really cover um is 42:02 there can we set up a schedule to update 42:04 that vector periodically so for example 42:07 if you had like a bunch of documentation 42:09 that was hosted on a website and you 42:10 wanted to pull that into a vector for 42:11 like creating a customer support uh bot 42:13 or something like that um your 42:15 documentation's constantly being updated 42:17 so I think the question is is there a 42:18 way to um kind of update that 42:21 periodically and that's not something 42:22 that retool vectors supports natively 42:25 But uh workflows in addition to being 42:27 able to be triggered by a web hook um 42:29 can be triggered on a schedule. And so 42:31 kind of like Anelik was showing at the 42:32 end where you she was actually updating 42:34 the vector data um as part of a 42:36 workflow. You could have a workflow that 42:38 runs you know every hour, every 12 42:40 hours, 24 hours, etc. uh and scans 42:42 through all the source material and then 42:44 basically decides what sort of updates 42:46 to make to your vector. So um that's a 42:48 possibility and something that we 42:50 recommend if you have uh data in a 42:52 vector that's changing periodically. 42:55 Yeah, I I agree. Um, I'm actually going 42:58 to throw you a question which I think is 43:00 pretty much part of the thing that you 43:01 just answered, but thanks for the 43:03 multiple PDFs question. Uh, so can I 43:06 drop multiple PDFs into Google Drive and 43:08 let the tool consume those dynamically? 43:12 Yeah, this is a good question and 43:13 actually something uh I'm working on 43:15 building currently. Um so we have uh 43:17 some some things coming up internally to 43:20 retool and uh folks are creating all 43:22 sorts of content around that in various 43:24 Google docs. Um and we want to basically 43:27 like we have here have a sort of chatbot 43:29 or or kind of basically we can get a 43:31 response that sources from those Google 43:32 Drive documents. And so um again we you 43:36 can't necessarily specify like a Google 43:38 Drive um or a Google Drive folder to 43:41 pull data into a vector from 43:42 automatically. Um, but what I'm doing 43:44 and what y'all can do as well is 43:46 basically we have a workflow that looks 43:48 inside a specific Google Drive folder, 43:50 looks through each of the files that are 43:51 in there, and then decides, okay, do we 43:53 need to update the vector? Has this been 43:54 updated since the last time we inserted 43:56 into the vector, etc. So, um, we're able 43:58 to kind of pull those results in over 44:00 time. Uh, and as people change the 44:01 underlying Google Docs every 12 hours, 44:03 that just runs and updates the vector. 44:05 So, there's a little bit of a lag, and 44:06 you can again adjust the timing of how 44:08 often you run the workflow depending on 44:09 if that's important to you. But um you 44:11 can you can do a lot with uh workflows 44:14 and and like using that to automatically 44:16 get data into vectors and have vectors 44:18 uh be up to date. 44:20 Yeah. Um so that builds on the next 44:23 question also which I'm just going to 44:25 repeat what you said. When building the 44:27 vector from a site URL, can you set that 44:30 up on a schedule to update the vector 44:31 periodically? We don't support this 44:33 natively, but you can create a workflow 44:34 that requeries the URL data and update 44:37 updates the vector uh that you have 44:39 already created. So again, there's a lot 44:41 of power to vectors and a lot of way to 44:44 trigger them. 44:47 Cool. Um yeah, I'm going to grab another 44:50 one of these. Uh so some Alex said, "I'm 44:53 currently working on a rag application 44:54 using transcripts from company training 44:56 videos. When adding to the vector 44:57 search, I don't get the best results. 44:59 Uh, do you recommend adding 45:01 post-processing steps to raw text 45:02 transcripts? And if so, can you 45:04 recommend some techniques for better 45:05 vectors or semantic search results? Um, 45:09 it's an interesting question and a tough 45:10 one to answer just because uh a lot of 45:13 this stuff is kind of use case specific 45:15 and depending on how long the 45:17 transcripts are, how all over the place 45:19 they are or how focused they are, it's 45:21 like it's kind of uh something you have 45:23 to experiment with yourself. So, I will 45:24 say that um using something like Pine 45:28 Cone or another tool where you get to 45:30 kind of more dials you can turn in terms 45:32 of how you um chunk your vectors and and 45:35 how all of that works uh might give you 45:38 better or different results. Um so, for 45:40 example, if like you have a document 45:42 that you're splitting up every page, 45:43 right? Like those results aren't going 45:45 to be able to be as specific to a given 45:46 sentence versus if you're chunking that 45:48 document into paragraphs or sentences 45:50 before you vectorize it. So there are a 45:52 lot of kind of like I said knobs to turn 45:54 there. Um but really the the kind of 45:56 best practices that you know anal was 45:58 mentioning earlier um was that you know 46:01 really just kind of drop them in 46:03 experiment um and and make sure your 46:05 data is is clean and for the most part 46:07 uh more text based instead of you know 46:09 text and images mixed and that that 46:11 starts to get kind of difficult. So, in 46:13 your case, it sounds like transcripts 46:14 largely probably pretty text based. Um, 46:17 but things like, you know, doing some 46:19 pre-processing to make sure that for 46:20 each sentence in the transcript, it says 46:22 who the speaker was, etc. Not all tools 46:23 give you that. So, if you can do those 46:25 sorts of pre-processing things, maybe 46:26 that will get you closer to the results 46:28 you're looking for. 46:31 I have another one. Um, and you can help 46:33 me with this one if anything, but what 46:35 is the best way to prep data to that 46:37 should be consumed through vector DB? Is 46:39 it just plain text or can we have 46:42 multiple tab Excel tab sheets too? Uh 46:45 well actually like you can upload a file 46:48 that or plain text. I mean the whole 46:50 point is that you don't have to 46:53 structure it. I I structure my document 46:55 just because I wanted to organize and be 46:57 able to read it later. But um no I I 47:01 think that's that's the whole point. But 47:02 eenan if there's anything else you want 47:04 to add. 47:06 No, I think yeah, I think that that's 47:08 that basically covers it. Um, again, the 47:11 the both interesting and frustrating 47:13 thing about all of this is that it does 47:15 require just quite a bit of 47:16 experimentation and like we even saw 47:18 that in your presentation, right, where 47:20 um you know, sometimes it returned 47:21 exactly what you were looking for, 47:22 sometimes it didn't. And you can you can 47:24 spend a lot of time kind of going back 47:25 and forth to to get that accuracy. And 47:28 um depending on your use case, like how 47:29 the how the data gets structured, 47:30 there's a little bit of a 47:32 experimentation angle because we're 47:34 we're all figuring it out. But that's 47:36 also why we kind of wanted to to bring 47:37 you all in and let you look over all of 47:39 our collective shoulders as we as we 47:40 build this stuff. So, thanks Angelique 47:42 for participating in that. Um, 47:44 yeah, I have another question that I can 47:46 ask ahead. 47:47 Is there a limit on how much data can be 47:49 stored in the vector DB? 47:53 That is a good question. Um, we do have 47:58 uh limits on overall vector storage. Um, 48:02 so right now it looks like what I'm 48:05 seeing here, and I I'll I want to follow 48:06 up on this, so make sure to check back 48:08 in the community thread for this one in 48:09 particular, um, but it looks like we 48:12 currently support 120 uh million 48:15 embedding tokens per day. So tokens 48:17 don't quite directly map to words uh in 48:20 in the English language or in any other 48:22 language. But um what we found is that 48:24 even for folks that are running uh you 48:26 know extremely busy production workflows 48:28 that's like they they're not hitting 48:30 those those limits there. So um while we 48:33 do have obviously you know everything 48:34 has some sort of limit on it eventually 48:37 um I would be very surprised if uh if 48:39 that that came into play. So, um, yeah, 48:42 I'll provide some more kind of 48:43 documentation on on those specifically, 48:44 uh, in the community thread when we drop 48:46 all of these in there. But, uh, yeah, 48:48 good question. 48:51 Yeah, there's another one talking about 48:53 having their own DB schemas and um, the 48:57 question is, is there a big difference 48:59 between having a DB table as separate 49:01 files or one large file? I think this is 49:03 where the default embedded model comes 49:05 into play because it's about like how is 49:07 it being consumed. So for example for me 49:09 I thought that my document was long and 49:11 I tried it out with large then it just 49:13 wasn't. So I had to go back to something 49:15 like a ad a 49:19 little bit of experimentation. I think 49:21 it's mostly about how the context model 49:24 is being uh consumed and then also if 49:26 you want to add any filter labels that 49:28 that might also help it out. 49:32 Yeah speaking can you say a little bit 49:34 more about the filter labels? I think we 49:35 had another question here which was um 49:37 you know if you have a bunch of PDFs 49:39 uploaded to vectors um can you like 49:42 restrict your search basically to just 49:44 like search for a couple for a 49:45 particular like if you know your search 49:47 needs to be focused in only one or two 49:48 areas but you have a a vector of a bunch 49:50 of different PDFs um and that's where 49:52 the the filters and labels come into 49:54 play. So can you can you talk a little 49:55 bit more about that or kind of how you 49:56 might use that? I know you you did some 49:58 of the metadata stuff in your 49:59 presentation. 50:01 Yeah, I'm actually there's a space that 50:05 I'm thinking about right now that 50:06 actually does that. So, uh there's two 50:09 ways about it. You can either as you're 50:11 giving it or uploading a new file or 50:14 even making the vector, you can add 50:15 filter labels and these will really help 50:18 out with your vector sources. Um so when 50:20 you make them, it can just like easily 50:22 identify sections that it like 50:25 recognizes and then just kind of like 50:27 include them or not include them. And I 50:29 think that is I I'm looking it up like 50:31 where specifically it is because it 50:32 actually does exist when you're doing 50:34 the uh retool vector. I think it is oh 50:38 over here I can share my screen quickly. 50:41 Cool. 50:42 So right here when you say like use 50:45 retool vector then you would say like 50:47 choose there's nothing because I haven't 50:49 added anything but this is where you 50:51 would like filter specifically. See uh 50:53 elim vector search to documents with a 50:55 selected tag. If no tag is provided then 50:58 all document will be searched. 51:01 Yeah. And so basically what that allows 51:02 you to do like like she was just saying 51:04 is kind of tag documents as certain 51:06 types. And so then you could say for 51:07 example if you had the kind of review 51:10 document that we uploaded for the MCU if 51:12 you also had those for you know animated 51:14 Disney movies or all the Mission 51:15 Impossible movies or whatever you could 51:16 say okay cool I want the search to be 51:19 only restricted to Mission Impossible 51:20 movies. And then you could use that tag 51:22 to include only the Mission Impossible 51:24 movies. then even though all there's 51:26 other data in your vector, um you would 51:28 you would not have that included. So, 51:30 lots of ways to kind of again knobs to 51:31 turn and things to things to mess with 51:33 if you need to get a little bit more 51:34 specific here. Um, cool. I'm going to 51:37 grab one of these. I created a chatbot 51:39 for my course that references the 51:40 syllabus and the assignment information 51:42 to find answers for students. The prompt 51:44 is a bit long and the text file is also 51:45 fairly large and I realized when I moved 51:47 to my own API uh that I'm over the limit 51:49 for my type of account. How can I make 51:51 it more efficient and can you point me 51:52 in the right direction? So, if I'm 51:54 understanding this correctly, it sounds 51:55 to me like you are kind of having it you 51:57 have a prompt that's quite detailed. Um, 51:59 but then you're also uh including like 52:02 the full syllabus and things in the 52:04 message to the chatbot as well. Um, and 52:08 this actually does seem like a pretty 52:09 good use case for vectors. So, a lot of 52:11 the time when you want to use vectors, 52:12 uh, the kind of very like basic naive 52:14 approach is just put all the data in the 52:16 prompt and the AI will do its best to 52:18 handle that. um when you start to run 52:19 into context window limits, that's when 52:21 using vectors really comes in handy 52:22 because actually what's happening behind 52:23 the scenes is if you have your syllabus 52:25 kind of in a vector for example, uh it 52:28 will your AI query will be able to pull 52:31 only like the relevant pieces out of 52:33 that syllabus to add context to send to 52:35 the large language model. So that means 52:37 you're not including the entire syllabus 52:38 in the prompt every time, etc. Um and so 52:42 this again it helps you cut down on your 52:43 prompts length. Um but make sure that 52:46 the most relevant data that will 52:47 actually help the large language model 52:49 be better and more specific to your uh 52:51 use case is always included. So um I 52:54 might recommend that yeah you add kind 52:56 of the syllabus and any course 52:58 supporting course documents to a vector 53:01 uh and then that check box that showed 53:03 that just said you know use retual 53:04 vectors to add context to my query you 53:06 check that and pick the vector where 53:08 you've added that course data um and 53:10 then you're not adding you're not 53:12 sending all of the course data every 53:13 single time you call the large language 53:14 model um but retool will help you kind 53:16 of smartly include the relevant pieces 53:18 from from the syllabus etc. 53:22 Yeah. Um, 53:24 cool. 53:24 That's a great one. I have another one 53:26 that says, "How frequently should we 53:27 update? I'm trying something real time 53:30 or near realtime update such as live 53:32 news feeds or live sports commentary." I 53:35 think that's basically like where the 53:37 second part of what I showed about the 53:40 um like up search and everything would 53:42 come into play. Like I added into the 53:45 singular workflow, but you can make many 53:46 different types of workflow that keep 53:48 track of this. So whenever like I I'm 53:50 going to use the information of like 53:52 let's say that you notice that something 53:53 has been updated and if you want to keep 53:55 track of that then like that's when you 53:57 would use something like inserted into 53:58 your vector but if you see that the 54:01 information is still old or like hasn't 54:04 changed then look at that document 54:05 rather than like keep searching every 54:07 single time. Um but yeah, 54:13 cool. Uh we've got one from Alex here 54:15 about uh the grabbing data from an API, 54:18 vectorizing it, and then uh using it in 54:21 a workflow. Um it's kind of a variation 54:23 on what we already covered. Uh but 54:24 basically, yeah, you can use uh retail 54:27 workflows to query that data from the 54:29 API. You can kind of programmatically 54:32 like Angelique was showing with a couple 54:33 first steps there. basically like turn 54:35 that into a vector in a workflow as 54:36 opposed to doing the drag and drop PDF 54:38 uh via the interface there. Um so you 54:41 can absolutely do all of that uh inside 54:43 of a workflow. Um and that is a pretty 54:45 common use case for like we mentioned 54:47 you know pulling a bunch of stuff from 54:48 Google Drive that people may be updating 54:49 etc. Um yeah so that's that's definitely 54:53 doable. 54:59 Let's see 55:01 if you want you want to take this one 55:03 about the using vectors to document a 55:05 large code base. That seems like a 55:07 a very uh nuanced and in-depth question. 55:11 I don't think I see it. I was going to 55:12 ask you a new question actually. 55:14 Okay. Well, we'll do this one real 55:16 quick. So, at the very top, we've got 55:17 one where, you know, we have an idea 55:19 where I'm trying to get going to try to 55:20 get an AI to document a large codebase. 55:22 I would like to be able to use a 55:23 Slackbot to respond to client requests 55:25 and use it, you know, use markdown files 55:27 to create tickets like with context from 55:29 the codebase. Um, is this a use case for 55:32 vectors? I think this is a a bit of a 55:34 complicated question. Um, yes, it is a 55:38 use case for vectors. Uh, you'll see all 55:40 of these various like coding editor 55:42 startups, Curser and Windsurf and others 55:45 handle this problem slightly 55:46 differently. Um but they are you know 55:50 entire companies basically dedicated to 55:51 handling this problem. So depending on 55:54 the size of your code base and how 55:56 complex like your files and dependencies 55:58 and things are this may be something you 56:00 would be able to accomplish yourself 56:01 using using vectors in that way. Um, 56:04 there are also tools that I've seen if 56:06 your codebase is not super large to 56:08 basically it compacts your entire 56:10 codebase into a single uh markdown file 56:13 that tells the LLM about the 56:14 architecture, the specific files, the 56:16 contents of those files, etc. And that 56:18 can be useful for uh this kind of like 56:20 vector search through a codebase. But 56:22 yeah, any any codebase that is, you 56:24 know, medium to large size, uh this very 56:27 quickly becomes a very difficult 56:28 problem, which is why there are entire 56:29 companies that are trying to solve this. 56:31 So, um yeah, of course, like recommend 56:34 that you experiment and try it out, but 56:36 um there will be probably quite a quite 56:38 a bit of experimentation there in my in 56:40 my opinion. 56:44 Um I think this is going to be our last 56:46 question. Um, I can we can double tag 56:50 this one, but if a client has a pricing 56:52 catalog in a Google sheet or a CRM 56:56 accessible accessible via API, would I 56:58 need to add this information in a vector 57:00 or would it be better to just query this 57:02 data in a workflow? 57:04 Well, I guess it's dependent. Um, I've 57:07 seen I've seen all use cases. I've seen 57:09 the use case where for example if it 57:11 were like an AI in answering to your 57:13 customers then like having it in a 57:15 vector where it can access it and you 57:17 know that that is not going to change 57:18 well then yeah have it there and like 57:20 have it be static and have it like 57:21 retrieve that information to make the 57:23 experience a little bit better. Now if 57:25 your pricing is constantly changing then 57:28 uh unless you create a certain type of 57:30 workflow that like uh makes space for 57:33 that then you know I guess you just it's 57:36 a matter of uh static versus not static. 57:39 Yeah and it also depends on where the 57:42 data is stored as well. So for example 57:45 um large language models are quite good 57:47 at writing Salesforce queries for 57:49 example right. So we have a lot of cases 57:51 where okay we need to get some data out 57:53 of Salesforce we could like export the 57:55 data from Salesforce put it in a vector 57:57 like then call it but like mentioned 58:00 that data is constantly changing uh and 58:02 also there's just way too much for the 58:04 AI to be able to pull it out of a vector 58:05 consistently. So what we do in that case 58:07 is basically we say okay cool here is 58:09 our Salesforce schema here are all our 58:10 custom fields here's how our data is set 58:12 up please like write the query uh and 58:15 that's not even necessarily a vector 58:16 thing we can just put all of that in a 58:18 prompt and say okay write the Salesforce 58:19 query and then we have another workflow 58:20 block that actually runs the Salesforce 58:22 query um and so if if you have kind of a 58:25 CRM that uh the large language models 58:28 know about um you could potentially go 58:30 that route as well and just use the AI 58:32 to to dynamically write the queries for 58:34 you and then run those queries in a more 58:36 like programmatic way. So, uh I know a 58:38 lot of our answers have kind of been it 58:40 depends or you need to experiment and 58:42 find out for yourself. And uh I'm sure 58:43 that's frustrating, but that's just kind 58:45 of the reality of it is, you know, a lot 58:46 of these a lot of these situations are 58:48 are pretty unique and um you know, it 58:50 just depends. I I can't really say, 58:52 okay, here's the line where like you 58:53 have too much CRM data to include it in 58:55 your prompt or in a vector. Uh but 58:57 you'll just find that if you try to if 58:59 you try to do that, um the AI, you know, 59:01 won't be able to pull out of the vectors 59:03 as consistently or correctly as you 59:04 would hope. Uh, and that's where you 59:06 would, you know, need to experiment with 59:07 a slightly different approach of maybe 59:08 having it, you know, live in the system 59:10 of record, wherever that is, if it's 59:11 Salesforce or something else, uh, and 59:13 have your AI just help you write those 59:14 queries for those systems. So, 59:17 yeah. Um, so I want to thank everybody 59:19 for coming today. This was really 59:21 wonderful. Um, also if you have any sort 59:23 of questions, drop them in the 59:24 community. Uh, this post, well, this 59:26 whole thing is going to be posted there. 59:28 The resources are there for you like the 59:30 templates that I've made. Um, and then 59:33 yeah, resources wise, we have our 59:34 YouTube channel which we're constantly 59:36 updating with new content as well as 59:38 retool university. So if you're kind of 59:40 like I don't know much about JavaScript 59:42 or even like SQL or APIs then we have 59:45 courses dedicated to that to help you 59:46 get started as well as like if you want 59:49 something more a little bit more 59:49 advanced then uh there is tracks for you 59:52 and then also the community is always 59:53 there to you know support one another. 59:55 or if anybody any questions and you're 59:57 kind of like new or more of an expert. 1:00:00 So, the symbiotic relationship. Uh so, 1:00:03 yeah, thank you so much. I hope that you 1:00:05 guys stick around for the rest of the 1:00:06 week. Uh and we'll catch you next time. 1:00:10 Thanks, y'all.