navarre.ai

ClarisTalk AI · the FileMaker AI podcast

Vector Databases, Semantic search, and JSON

April 10, 2024 · 63 min · Matt Navarre and Cris Ippolite

Jump to transcript ↓

Cris and Matt talk about Vector databases, lexical vs. semantic search (and relevance ranking), and upcoming FileMaker conferences in Europe. Matt waxes poetic about JSON and a technique for storing certain types of data in a single, flexible JSON field, rather than having individual fields for everything. Cris recommends a book called 'AI for Good' by Juan M. Lavista Ferres, William B. Weeks, and

Apple PodcastsSpotifyYouTubeAll episodes

Transcript

Transcribed by machine (whisper, large model), 11,936 words. Names and product terms are sometimes misheard; the audio is the record.

Claris Talk AI. It's another episode, Chris. Yeah, we're doing it. This is the third one together, which I'm very excited about. Getting some good feedback from everybody, hearing from all our friends in the Claris community about learning new things with AI. And we're happy to be here to chat with folks about that. Yep, I'm learning along with everybody. So vector databases, that's where we said we were going to go to today. Yep, that's a big one. And I think this is a particularly important piece considering, and frankly, we've been progressing through the process of communicating with language models. Of course, we started off with prompt templates. That's really where the communication starts.

And part of prompt templates is including context. We spent a lot of time in our previous episode talking about context. And so if anybody missed that, it's probably a good one to talk about. And we're sort of still in the land of context when we talk about vector databases, because one of the primary uses of vector databases, which we'll get into what these things are in a second, is to retrieve data. But also, it is the linchpin in the chatbots. So it's how we find answers to questions and present those to users in a conversational manner. So a lot, really, really. And I would say that Claire's folks probably need to become pretty familiar with semantic search pretty soon.

And that involves these vectors as well. Yeah, I want to talk about that. Anything that has the word search in it, and I broke up because search results. I've been dreaming about another version of it that uses something outside of FileMaker. Oh, Matt, I'm so glad you said that. So first of all, you want to tell everybody, I mean, it's world famous, but you want to tell everybody about your search. And then I will propose to you what I think you should do in the next generation of it. Yeah. Well, I rewrote FM search results. You can get it for free at my website, navarra.training, or also FDS, directimpactsolutions.com. Okay. It's all JSON. It's much more configurable.

It's much faster. I really pared it down a lot. And so basically what it is, it's a Google-style search you can add to your database. It's also free, by the way. add it to your database, you configure it for any tables that you want to search, and when the user does a search in a single search bar, it shows results from every table where the data matches. So if you put a date in, it only searches for tables where there's a date. If you put in a text string, it searches for that. If you put in something that looks like it's a phone number, it only searches in phone number fields. Now, would you describe... Oh, so first of all, if I remember correctly, did you not release this at the San Francisco in DevCon?

This has actually been around for a long time. I've done sessions where I wrote this over 10 years ago. And it has a lot of really cool things in it in terms of being really flexible. It works really hard to try to show results by ratcheting down. The early version was virtual list based. It still is to show the results. Except the actual result thing, it's just JSON. So you could put it in whatever you want. So, and by the way, because I think this will tee up vectors a little bit too, this is really perfect. The searches that you're doing are the same type of searches that we do in FileMaker all the time. The fancy word for them is called lexical searches, which is really just keyword or index-based searches. You enter in a term and it goes and finds a matching term. Now there is some sophistication in word indexing or the text field indexing in FileMaker where you can just put in a couple letters and then there's actually character indexes as well. But at the end of the day, you're getting back matches to your input. Is that a fair way to say it? Yes. And it's not fuzzy. So if you misspell a word, if you put in a date and it's one day off, if you, you know, there's something, there's some stuff I really, really want to have that

That's the way Google works that you cannot do in FileMaker that I can figure. Like things like misspelling, like you said, fat fingering, or like the John versus Jonathan type searches. Actually, I have that. Oh, you do? I have a name substitution table that you can put in different languages. So, yeah, Bob and Robert, Peg, Margaret. It does the hard ones, but also you can do them in any ethnicity of names. So what if, okay, so here's what your, this is what your assignment is. I mean, how dare I give my fellow trainer an assignment? Your assignment is to introduce a new version of that that uses semantic search. And I can't wait to see it, and it's going to be great.

So sometime this summer, let's say that. You'll have the tools at your disposal sometime this summer to make it really easy. In the meantime, everyone listening and watching, just to remind people we do have a YouTube version of this too, in case you like looking at a couple of handsome old men. I look forward to seeing it and hearing about it, and it's going to be a smash hit as a semantic search. But what are we talking about with semantic search? What are we talking about? Well, that is where we're doing a special type of search that is facilitated by vectors, non-lexical or keyword search, but instead a search where we find similar meanings to what our search terms are.

Kind of mind-blowing. Yeah, yeah, yeah. So it's not. Well, there was this thing called the Levenstein distance that I played with a long time ago, which which calculates the number of characters that are different in one word. So if you get if you spell it by one word letter off, it catches that and it calculates the distance between two words. You're actually old. I know. But you know what? That's a precursor to transformer technology. So the transformers are really just predictive, you know, what's the next character, what's the next word, and not to be reductive, they're incredible, like times 400 billion parameters is what they're able to do. But the key word there is the distance, right?

So what's implied in the approach that you just described and also in the modern day vector searches is the distance between words indicates their similarity. that's where we're going to end up in this discussion about vectors but we're going to have to do a little journey to get there yeah and the levinstein you couldn't really use an environment it's really really processor intensive and you have to sort of pre-calculate what you could use it to compare two things but you can't use it for a search because if you type in epilite and you put in one p it doesn't know each yeah exactly yeah for chris right yeah so it would have to like do um it can't it can't start with like a word and make a bunch of different words that are one distance away it can just compare the two things together so basically you could say oh okay well i put in ipolite with one p i'm going to loop through my entire database and calculate the levinstein distance of every single record versus what i did yeah no that's not yeah i mean then you'd be back to doing a non-index based search right you'd be doing a search like old school way like check every single record against your search term now you know what you need to make that happen is a model specifically trained on language with hundreds of billions of parameters in it to actually do that heavy lifting for you so that is why today the discussion of vectors

and vector databases is so important it wasn't it's not introduced as part of the language model boom uh certainly you know uh there are different types of distance calculations the key part is what you said is distance we want to we want to zero in on it we'll eventually get to the point that the closer in distance two terms or phrases or sentences are words words or phrases are i should say the more similar they are it's the same in your formula and it's the same in in how language models are doing this but to get there first of all we're entering in words but what's actually happening behind the scenes is numbers being matched so we should probably talk about how we get from words to numbers in the first place right that process is described as embeddings and actually so for our friends who are are are watching us um on youtube i'll have some visuals but of course we'll talk through the visuals because we don't want to leave any buddy out who's in our ears so first of all um let's just take the use case of a chat bot where we're asking a question of some data and some answers are coming back okay um that's like we've talked in

previous conversations about like let's say you go into a chat bot and you say hey what's our vacation policy and we wanted to go find out the answer to the what's our vacation policy but here's the trick we want it to be a really intelligent search results we wanted to find out If my question is what's our vacation policy, I wanted to come back with answers that don't say vacation policy at all. They say stuff about paternal leave, planned time off, sick days, you know what I mean, like vacation, you know, stuff that even doesn't have the word vacation in it. That's really powerful stuff, right? That type of search is called a semantic search. So in order to be able to match words that do not have the same, or the phrases or questions and answers that don't have the same words or index in common, we have to convert the words into numbers.

We're human. I mean, mostly I'm human. I know you're human for sure. We speak in words, right? Do you know what language computers use to talk to each other? Yeah, they speak in numbers, right? So we have to figure out a way to actually convert words to numbers. And so that process is called embedding. So we actually take text data and turn it into numbers. Now, the structure of the numbers is important, but the concept of embeddings, let's just focus on that first. So what, first of all, embeddings use very specific, specifically trained language models that are called embeddings models. There used to just be like a couple out there, like a very popular one is OpenAI's ADA model.

they've now updated. OpenAI even has multiple different models. There's a ton of different models out there. And by the way, I should just mention, there are different embeddings models for different use cases. So what we're talking about is searching, but there's like pairing and clustering and classification and all sorts of stuff. So anyways, we won't get into the leads on those. So what we do is we take text and we feed it over to one of these embeddings models. And what it does is it actually turns it into numbers. So what's actually happening there for those on youtube i'm actually showing some word embeddings with just two columns of numbers now the first thing is matt when we turn so first of all let's just talk about if we didn't use embedding models so what we're really trying to do when we're coming up with these numbers is come up with features of a word so let's do a little thought experiment right now let's pick one of these words how about soccer and i'm going to ask you as a human brain give me as many features as you can about the word soccer let's see it's a sport it's also a type of ball uh it's associated with the hexagonal black and white ball uh let's see the it may be the ball made by different companies uh you've got some famous players um it's the number one

sport in the world outside of the u.s uh where they call it football rightly because you actually use your foot to play it i'm like it makes sense yeah anyway um i shouldn't really you're you're a huge lover of american football so i'm not gonna but i get it i get the irony let's see i don't know it rhymes with it's like the word sock like what you wear on your feet it's not the same word so uh yeah those are the type of things i could think of so i don't probably go i think give me 4095 more if you want okay so that's that's the whole idea so you're a super smart dude by the way that was fun that could be like a game show by the way uh you know human human embeddings whatever the big game show so what so so if we left it to humans to come up with features we would probably in a really good case we could come up with certainly a couple certainly a dozen maybe if we really tried hard like and spent a ton of time on it we could come up with a hundred but we'd get into a real long tail situation there these models these embedding models these Specified language models for this task have up to 4,096, even more.

Really, the most common ones, like the ones we use the most at iSolutions, are like 300 feature models. I call that, but for the sake of this discussion, we'll call it that. But 4,096 ones are very sophisticated, too. So what that means is these models can look at a word and extract hundreds and hundreds of features from it and stuff that is way beyond our level of comprehension. And the reason that they do that is because they will plot these. Now, you know, when we talk about plotting, everybody knows X, Y, right? X, Y is literally two, you know, it's a two-dimensional graph and you can plot it in some quadrant. And that tells us two things about the plot.

It tells us whatever the Y descriptor is and whatever the X descriptor is, right? We all get it. We look at those every day. Imagine, if you will, and for those that are on YouTube, they can see this fantastical 3D multidimensional graph. So I'll let you try to describe what we're looking at here. Well, basically just another dimension, X, Y, and Z. Yeah, so many dimensions that we can actually plot all 4,096 of these features. You could with X and Y. I mean, just be busy. You would have two features that you're plotting. That's that's the important takeaway. If we wanted to plot all 4096, we need other dimensions. We're no longer in a two dimensional space or three dimensional or three for that matter.

It's really multi-dimensional. You can't you can't really visualize that. No, it's not real. No, you can't. And that's why we use models for this task. So what so who cares if we if we plot these? Well, here's what the fascinating thing is. Since the models are actually interpreting, extracting meaning from these words, using just, you know, tons, huge parameter sets of language to do so, they're able to do things that us humans can't even comprehend. And they're able to associate. So when I plot, like, for example, for YouTube folks, we're looking at something here where we're plotting a couple of different words that have some similarity. We see soccer plotted and rugby, and there's Chris's football down there, right?

And we even see tennis down here, right? Now, the location of the plot indicates that they have features in common. So, for example, just to be really silly, if we took the word soccer and plotted it in a multidimensional graph, and we took the word soccer and plotted it again, they'd be at the exact same location. That means that they have the algorithms that are used to determine the distances. And by the way, there's many, but the algorithms, most common ones are like zero to one. Some of them could be like minus one to plus one. That distance would be like one, right? Soccer and soccer have the same exact location. But like, if you look at this graph, soccer and rugby are close, but they're kind of far away.

So their distance indicates their similarity. So by looking at this, would you indicate that rugby is more associated with soccer or football is more associated with soccer by looking at this visual here? They're pretty close. Yeah, but rugby, for whatever reason, is a bigger dot. There you go. It's actually a little bit further, but it's also three-dimension. It's kind of hard to tell. It's technically closer. We can see tennis down here, for example, is not as close as football is, right? So I think to help people wrap their head around it, what we're actually doing is turning, we're using language models to extract incomprehensible levels of meaning from words, and then we're plotting those words for the simple purpose of determining the distance.

The distance then equals a similarity. It's not just words either, right? Isn't it like parts of a word? Not a syllable per se, but like some other… Like phrases, even paragraphs for that meant. So we just talked about… Bigger or smaller. Yeah. We just talked about words and then sentences. So this is really where we get into like what the linchpin is of chatbots. So for those on YouTube, I'm sharing just a simple graph of some vectors where I'm showing two different phrases, two different sentences. One is, hello, how are you today? And the other is, how are you doing? Those have very similar meaning, but they're not the exact same thing. So you can just tell by the vectors that I selected here on screen and matt we can tell the listeners um they're very close but they're not identical so that indicates that the distance between these two is similar however if we again same kind of thing just to drive it home if we use the exact same sentence hello how are you today and hello how are you today those are exactly the same as we plotted in the same spot so the whole point is we use we go through all this process to figure out what the distance is we plot and then we use a separate algorithm uh like you've heard like cosine and uh you have a language thing there too

because i was just thinking like oh look almost us you know well so so it's you know what's super fascinating is that a lot of these embedding models most of them frankly are multilingual so what that means is what we're actually looking at on screen here is that the phrase this is red and the phrase, you just said it perfectly. That's too much. Oh, it's beautiful. Nice rolling R's. Those two, what's indicated on the screen is that they are 92% similar. That's not really what it is. It's 0.92 in distance, which means they are essentially 92% similar. So for translation, you, okay, here's what the problem is with doing translations with AI. First of all, you can do it.

We've had customers come to us for this and they go, yeah, can you do it? And we're like, yeah, you could use ChatGPT for it. But here's the problem. You would have to go manually check every single one of your translations to make sure it makes sense. Like you've run into this where you do Google translations and the person who actually speaks the language is kind of like looking at you funny. Right, right, right, right. But isn't it better than Google Translate by a ton? Yeah, it is. It definitely is. Mostly because of the multilingual support that's built in. But here's the key. If you combine AI translations with if you vectorize the english version this is red and you vectorize esto as rojo which means we run them through those embedding models and come up with the features you can then plot them on a graph and determine what their distance is so let's say you want to do ai translations you could do like 100 translations give them to like english to spanish give them to spanish-speaking individuals to to rate them this is what we call human in the loop or reinforcement learning and then you look at all those hundred and you go well it looks like the ones that are all five star ratings or three star whatever the top rating is are 0.85 and higher so then we consider that to be an acceptable threshold of similarity so then you can now automate tens of thousands of translations

without having to have necessarily have a human rate them because you've already gone through that process now i would recommend continue to go through that process to keep the quality up but that is the principle one of the ways we can actually use vectors okay now how does this actually work from a chatbot standpoint well guess what a question and an answer have similarity which is crazy one way to kind of think frankly i think that's kind of nutty the fact that i can ask you a question and then the answer to the question has similarity to it that by the way how we can say what's our vacation policy and it goes and finds similar concepts like plan time off and parental leave and stuff like that right this one that i'm showing on screen to just youtube folks uh we'll we'll mention it this was an experiment that i did that i thought was really kind of amazing was that um i went on you know like kaggle.com it's uh like where you get a bunch of data for data science work um anything you're thinking about doing you can find stuff on there there. So I went on there and I actually found a data set of 10,000 customers making a statement about a product or service that they were interested in. And then in a separate experiment, I found companies like taglines for their product or service that they're offering.

And I thought it would be really cool to vectorize both sides of those and find matches. So what we're looking at on screen here, Matt, the need, this is a customer saying, as a busy professional, I need a quick and healthy food option to fit my schedule. The solution or the company they were matched with was a local restaurant chain that offers a dedicated express menu with pre-proportioned nutritious meals for the time-constrained customers. There aren't any, if we did a lexical search, these wouldn't match. I mean, you could also say food bars, Chris. You got me. It's convenient. It's quick. It's healthy-ish. Yeah, true. So, but the idea is like, wow, humans maybe couldn't put these associations together, but we can use AI to do so.

The last one I'll share with you is... I have a question before you continue. You say you vectorized it and we talked about words to numbers. Where does, where are the numbers stored? Are those in FileMaker? Yes. Well, no. Great question. Thank you for that. They are stored in a very special kind of database called a vector database. So if you are going to have semantic search capabilities in your database, you would have to store your vector somewhere. So in the examples I showed you, I actually have a separate database. There's some popular ones out there that like Pinecone is probably an industry leader in that we use some local ones that are like some Postgres databases with, you know, the vector modules sort of bolted onto them.

But that's a separate database, so you would have, like, all your vectors stored over here because it's a different type of storage. It's a different kind of index, frankly. But if you wanted to do it in FileMaker, what you might need would be something like, like, how are, like, Matt, how are container fields different than other fields in FileMaker, for example? Well, they can store any type of thing. Binary, they can store things that are encrypted. They can actually store text or they can store a PDF or a file that actually has text in it. So if you were to store 4,096 vectors for an associated, like let's say here we're looking at job description, it's text.

To store the vectors that represent that, that's a ton of data. And if you put it into a text field and you wanted to search it, index search or even numeric search, you'd end up with a huge index in your file. So the standard text field type storage probably wouldn't work in FileMaker. But I bet you if you had sort of a flavor of a container field that could store that information and allow you to search in a more sophisticated manner, you could then store your vectors inside the same database as your data. And then you'd be able to do things like semantic search. But you can't search on a container field, of course. So there has to be some connection to the – anyway, I'm cutting you off.

No, no. you are exactly where the brain should go so these would be problems not problems these would be things that the file maker platform would need to have to be able to do native semantic search in the meantime you can incorporate you can as of today you can incorporate uh semantic search into your file maker databases just using your vectors stored elsewhere but maybe someday matt maybe someday really soon yeah you'd have that native functionality in your platform and guess what? Someone like you could do your search. That's why you're going to, well, maybe if you have that, yeah. Well, what I've been visualizing for the next version of it for years is that you'd have some sort of a trigger that when you load a record, and one time when you start your database, you would load all your data, so your actual FileMaker data would go up to a database like Pinecone, and then anytime you make a change, that would get updated.

And then when you do a search, it actually searches in MineCon, which knows all of your primary keys. It's doing a really, really smart search. And then it sends back a JSON blob with the results, with the primary keys and the table of everything. So BaseSpace, it would be entirely compatible with the current version of search results. It would just do the search elsewhere. So what you're saying is this might be possible to do, but have the data still be in my database so I don't have any security concerns. Yeah, potentially. Yeah, and I think it's fair to say that security, you should pay attention to security. Like, you know, if you're using open source models, you can use an open source embedding model and you can use a local open source embedding model and a local vector database that's all inside your same box.

Like all those things can happen locally. Now, what you just described, though, is your homework assignment is to do a semantic search. I have one more wrinkle in there that I think you're going to think is pretty fascinating. it's this concept called re-ranking. So re-ranking is where you, I think in the context of FileMaker, it would be you do a found set, find all the customers in Greece, right? And we go in and we do other index, what we do to re-rank in FileMaker is we sort and we can get really sophisticated with up to what, like nine different sort options until finally we're in such a long tail that there's nothing that can sort in those secondary sorts.

- Close it down by twice or so. - Yes, imagine though, if you could do your search in FileMaker with your lexical index keyword search, then re-rank your results semantically. Not sort, but re-rank them using these semantic distances. That'd be kind of fascinating, right? - Absolutely, again, like what you get with Google, right, you get relevance ranking. - That's the key. We don't know what they're, great, that's a great point. where we're talking about relevance. And you could try to recreate relevance, or you could use 4,096-parameter index-- you know, vectors to be able to-- So that's when, like, the Levenstein function I talked about earlier could come in, right?

It's like, OK, I found 36 results in a name table. I know your original search. I can actually loop through 36 results and do a Levenstein calculation, and then rank them in order by the probability of the match. And if you had like internal support in FileMaker for like some sort of like cosine calculation that gave you that distance calculation, it would make it even easier. If. So we did it in front of me, you and both of our listeners. You have to do it now. Now, this summer, we're going to come out with a semantic search and we're going to hold, all three of us are going to hold you to it. You're going to help me because I need, I'm going to need help.

Okay, I have one more question about the vector database. Maybe it's a stupid one, but I'm going to ask it. Why couldn't the vector database be stored in FileMaker since FileMaker is, you know, a database? Is it a totally fundamentally different kind? Well, I mean, the search is different. Because our indexing is different in FileMaker. It's indexing. Yeah, I mean, like literally the index is based on taking an inventory of words or phrases or characters or words in FileMaker. That's a completely different type of search instruction that we're giving the database in order to find matching records. It's not at all like a regular traditional relational database.

Yeah. Okay. Okay. It's just we're storing different things and searching with different indexes. Probably the shortest answer to that. It's clicking more. I like this. Good. So that is, so what we just talked about here, we used a lot of terms just to kind of wrap it up. what we, what we were talking about are vector databases, turning words into vectors through a process called embedding. And what you use to do the words into vectors is you use embedding models. There are a bunch of different embedding models out there. And the one pro tip I want to give folks is it's not all about, there's not just one embeddings. Like it's, you have to use the right embedding for the right job. Like that customer needs and business solutions, one that i gave that requires a very specific type of embeddings model called a pairing model and then there's these clustering models that will help you take like sort of classify things in a different more sophisticated manner just do some research folks on uh the different types of embedding models out there and i think it'll be really eye-opening as to what's possible and then it might get you ready for you know well at least matt's you know file maker based search uh tool that's coming to theaters this summer you're just going to release it locally in greece first uh no just goes okay like it's been so it's always been the labor of love um yeah by the way when

is rome filemaker uh i believe october i don't have the exact dates oh so look that up what do you think about showing this at rome filemaker week oh that'd be good yeah so i i you've heard it here first uh two listeners rome filemaker week matt you're planning on warmfilemakerweek.com October 7th to 13th and are you planning on presenting or intending to present I've spoken at it twice and I submitted another session all about Jason because I love Jason and I've been using it more and more and finding other really cool uses so I want to share some of the things that I've been using it for that I never even would have thought of a year or whatever talk a little bit about your love for jason and in case people are wondering there is a school there is a a an argument about what the correct pronunciation is no there's not you are pronouncing it correctly although i have jason ingrained in my brain and i just can't stop doing it so well the guy who invented it he calls it jason based on because it was actually named after I think his son or somebody named Jason.

Anyway, even though it stands for JavaScript Object Notation, it's old. It's very old. But not only is it old, but at the same time, it is the absolute most important part of APIs, integrating APIs and FileMaker. Why is that, Matt? Because all APIs pretty much speak that. Even ClarisConnect. That was almost a spit take right there. Hell! everything does and so yeah we have native support for json and have a long time creating of functions and parsing of return json which is the reason why i can't do i can't call it json i'm sorry you you keep doing that yeah i'm going to speak to the json folks and so yeah talk a little bit about some of your fascinations well i've been using it to store a lot of different things um but one good example that i came across recently is to to have a field in every table or most every table just call json you just create it kind of at the beginning it's a text field and then when you you you're doing some scripting and you want to store something about a record either data or metadata about the record and you don't want to go create a field for it

you can just do JSON set element to the field and then put whatever else you want in it. It's so easy to add to JSON and to delete from JSON and change it. And then you can store that. And then that data can show on any layout. It's a little harder to search. This is not, this would be for data that you'd need to display. It could be calculated. It could be. Would you call it like a packaging? It also has a great use. One of my favorites after, you know, aside from unpacking the data that's being returned from API calls, which is really why it was kind of introduced into our platform in the first place. One of my favorite sort of tertiary use cases that people came up with was using it for script parameters.

Because instead of like doing like this piped thing, big old thing. That's where it starts. Yeah. Just start there. Yeah. And then, and then if you keep going, like, for example, imagine you have a whole bunch of Boolean fields. You have 10 different binary things that you need to track about a company. They are in this industry. They're a current customer. They bought something this year, blah, blah, blah, and they have a bunch of things. You don't want to go making 10 number fields for that, necessarily. You're not going to search them, but if you look at your screen, your data entry screen, you want to have some checkboxes. Interesting. So what you could do is you could have a bunch of button bars, segments, that do one...

don't even run a script. It just does a set field. And it sets the JSON field to whatever the opposite value of the thing that it was before. So it's like, is current. It would say set JSON to, if it's current, set it to not as current. Very, very simple calculation. And then you conditionally format the object on the layout. It's the output of a calculation. That's the important part that people would know here, so that's how you can use those switches to to update when you and any kind of data so very i don't like going to the uh to the relationship graph to you know manage database i don't like adding fields the more the the more i use file maker the more i um use fields use basically the data model for absolute pure only storage of data there's no calculated fields no summary fields. Nothing except for regular old storage in every table.

No calculated fields. As much as possible. So you're doing your calculations in the script, right? No, I use calculations in button bars on the layout. Oh, that's right. I love that about you. Yeah, that's fascinating. Tell people a little bit about that, too. I just talked about that. Well, there's also the new feature that you can do, layout object, layout calculations. Well, yeah, like any -- example like full name. That would be a capital field. Because you actually have to search on it. So you could search on CRI space IPP and you'd find you. There you go. But if you have something else like -- give me another example. Oh, like address. And you have it stored in the database as address, but you need it to print on a layout, on a form to say the street address with any number of lines, city comma state space zip.

And if there's no address, put it in like no address. Right, which is technically a searchable term in that case. And if there's two other addresses, it can say the address and then the little text thing that says and two more. right those are things that would be that you're always going to be getting asked for more stuff like that and then if you just say give me a layout give me a calculation and stick it into a one segment button bar that's that's formatted as invisible or uh formatted to look like data right so the same same exact specs as what your regular field would be um it can then display that data and the and the the principle behind using a button bar for that is that that's what sort of like you're triggering action to get the calculation engine involved is landing on the layout. Yeah. Well, the biggest, actually the biggest reason to do it is so that you don't have to pollute your database with the calculated field. And if you want to change it, it's on that layout. And if you want to copy and paste it, you copy and paste it. I don't know if you made some other point. Well, no, I just simply that the thing that actually makes the calculation happen is you interacting with that layout, which means that it's not, if you're never go to that layout and the user never needs to have that, that calculation created, you, it never happens.

You're not taking on that tax just to load the file. Exactly. So if you do it, you do a test layout or whatever, and then you toss it, you've harmed nothing. So I'm all about putting the complexity in the right layer. Yeah, you are. I've always thought that about you. And it's pretty much never in a calculated field. Yeah. And it's pretty much never in the relation model either. It's in scripting and layouts. Yeah, I remember you and Petrowski and I had a conversation once about like, where do we, where are we putting all the, the heavy lifting and calculations, scripts, layouts, you were, you were taking the position of layouts. I think I might've been talking about calculations at the time, but I I've become more of a script guy. Um, and all of it has to do with like, why take on the tax of evaluating all these things and the processing of these, if you're never going to encounter that stuff. So it's really just like user workflow based.

So you're going to show that at Rome FileMaker week, along with your new semantic search, updated search uh model right are you doing any other of the european um engage is yeah there's the engage you conference uh yeah it's an amazing one uh uh yours is going to be on the podcast upcoming um and johan they put that conference on it's yeah i think i saw um an announcement for he's going to do the uh let's chat uh presentation and i forgive me if we got that wrong but in the reason we're mentioning that is uh in an upcoming episode we at least have celebrities scheduled to appear um so we've talked to ernest co from um roof guys who's going to uh come on and talk with us and you just mentioned also our other guest as well who wait he's not going to be speaking at his conference is he no one is yeah when it's engage you oh no maybe they just announced the schedule not that it's starting i don't know but engage you is another one that i love i spoke at that one or did a um panel discussion um and then there's also dot fmp berlin which is the biggest of them oh i think engage you was about the same size as dot fmb and then there's other conferences too um well i really want to get now i'll mention reconnect

uh in asia pack down in brisbane uh this year that's going to be in september uh my friends down there have asked me if i'm willing to come down again i've spoken at that conference under different names uh age pack dev con uh that type of thing oh i thought you meant like one time you went as roscoe coltrane or something by the way well done i'm really wanting to know if people remember who that is roscoe p coltrane that's right are you kidding me that you just that's that was my lunchbox i didn't have the roscoe when i had the cooter uh lunchbox actually um to be quite honest with you i was just trying to be on the fringe really um but that one i just reconnected things up no i think this is this is the uh i'm trying to remember the name of the movie burt reynolds oh uh you're talking about uh cannibal run cannibal run wasn't that roscoe p coltrane wasn't actually no roscoe p coltrane was from dukes of hazard for all the kids out there he worked for Boss Hog yeah and he had the dog Flash oh my god wow I'm knocking some cobwebs out I love that show so much imagine those shows coming on now or even Cannonball Run

for that matter they'd all have to be electric cars and you wouldn't be able to hear anything and they'd all be going the same speed and then the movie would be over not to disparage electric cars I just want to finish the thought on Reconnect In fact, my friends down there asked if I would be interested in coming out to go present for a third time, which I would love to do. I'd love to talk about AI. I'd love to make it, although I'm waiting to see if it conflicts with my NFL opening weekend schedule, which it may in fact be a conflict. So I don't want to tell them that they rank lower than sporting activities for me because they don't. But, you know, it's kind of a thing.

All right, I got one for you. It might be dumb, but anyway. So this guy goes to the Super Bowl. bought the tickets for like ten thousand dollars yeah the game starts and there's an empty seat next to him and he's like there's no way and and he asked the guy on the other side of the seat he's like what's this what's up with the seat and he goes actually it's mine um yeah my my wife uh and i have come to the super bowl every year and she died uh and so i came alone um and the guy's thinking like he just doesn't want to ask he says i gotta ask couldn't you find somebody else to come with you and the guy said no they're all at the funeral yeah well done man boy you really brought that home yeah i'm gonna tell that one to my wife and she's totally gonna understand she won't even find it funny she'll just be like yeah no of course uh yeah maybe we don't know jokes whatever uh so by the way in addition to all those um so yeah uh upcoming episodes we're looking forward to getting some of our friends on to talk about who knows uh just we'll we'll announce it officially once we get everybody down but we're we want to talk about like the tools that people are using you know on their daily like their daily drivers let's just call it like that'll be the daily driver episode like not like what we're doing out in the world

but like literally what do we do at our desk every day maybe we'll inspire some people who want to get started because that's really how you get started um the other part is i wanted to recommend a book to you yes uh i'm excited about this i just got this book literally just at the time of this recording it the pre-orders just dropped last night so i had a chance to kind of flip through it it's called ai ai for good um and it's by it's by a couple of different phds um and it's uh the tagline is applications in sustainability humanitarian action and health and i wanted to recommend it to you because we started in our first episode talking about how we could apply ai to health matters and i just wanted to recommend this people i'm only about this far because i just got it but i'm really excited about what i'm seeing it's it's an easy read because it's just like um you know uh like just use cases like little easy chapters it starts off with teaching people about the fundamentals of ai but i find in a world where the clickbait headlines are all about but like robots coming to kill us in some weird Terminator fashion.

The more educated you get about this technology, the more you realize that that's silliness, just literally how the technology works. So I think people should get their information from really important books like this, not former funny comedians who trash AI on their silly weekly shows that have absolutely no merit at all. Who are you referring to? And call prompt engineers question asking guy. Well, take this. stewart aren't you hella prompter reading guy yeah yeah there's the word prompt in there too i took it as comical but yeah anyway that it was a little bit no no he was not being comical he was trying to be factual and there it was just fraught like the entire community completely like the entire like people who actually know community responded with just tons of errors uh i actually i may go and that's why i thought i was run a language model fact yeah yeah i mean i took it as comedy because it seemed to me that he just knew that none of that was true but it was funny and that's hopefully that's not how the that's not how it was received well that's because the ad community apparently doesn't have a sense of humor i'm guessing hey well i think i think i have a good sense of humor i think you have a good sense of humor too so for good information ai for good right so which plugs into another thing directly connected to

that i was just weirdly looking for ai books a couple days ago um i use an app on my phone called libby which i highly recommend oh yeah um your dog uh and you can get books from whatever your local library is or several libraries at once for free audible books oh my wife's gonna love this she actually has the library app yeah and you queue up you can like request 20 books you have to wait because the library might have like four copies talks about this all the time yep and if you want to get a book you know it might you might wait for months or you might wait for a couple days or a ton of books are just available right now you download them to your phone and then they're there and then when you're done you just return and so libby is like bringing in multiple different libraries in your locale and allowing you that i wonder if it has semantic search in there to help you find recommendations of other books you might like based on the ones that you've enjoyed oh well no it's a little bit it's a little bit hard for that honestly and i the other thing that's really funny is to connect to what i was just saying i went to look for some ai books and the only ones i could find were from 2019 which was forever ago no it definitely was i mean i actually a good line in the sand is anything post 2017 will be will will be aware of uh transformer

technology and models so if you know anything pre-2017 which is when the attention is all you paper from google brain came out and sort of announced this concept that would be well you know ai has been a discussion since the 60s like i posted something on linkedin about a guy who predicted agi in three to five years and i was like oh my god uh uh turing award-winning mit professor predicts but it was from 1967 so like this conversation has been going on for a long time um even the comedians back then uh were making jokes about ai uh to poke fun at ai professionals back in the 60s the lenny bruce for example had a great riff on on ai um so a really relevant uh speaker in that so i'm glad i'm glad there's a new book it seems weird like a book is a book about ai it's immediately immutable like what's this book going to be what's the utility of it going to be in five years uh it's fascinating i mean i think there's an argument to be made that by the time something's printed it could arguably like for example definitely right at uh which is why i like this book because it's just use cases and thought thought experiments about like these are different ways that you could actually apply this and get people thinking about what you can actually do with the tech rather than like historical reference in this point in time

we just to kind of talk about the acceleration of all this here at eye solutions we do uh a weekly what's this week in ai meeting we have to honestly i take it upon myself to curate you know 10 to 20 different things that came out in the news like mostly what the new models are so we can figure all out what the what the the headlines were um you know new technologies new product we don't really focus on the product so much because products come and go every time there's a new model you know like when the vision input stuff came out in gpt 4v and all the other open source models like any product that you know touted uh visual machine computer learning for vision just became irrelevant right so products don't really get us too fascinated but things like that devon um agent uh agentic workflow tool that we showed on the previous episode those kind of things come out so we have to do it every week arguably we could do those conversations twice a week just so that we're informed so that when we're having cover so and then what we do is we say is this news just interesting news does it affect any of our current projects if so let's assign it we literally have a jira board for this or um let's do it for an internal let's do some experiments internally check it out or just this was nice to know so like i think twice a week

uh huddling up and having conversations it will maybe keep you on the front of the curve but otherwise kind of crazy uh can i share with you uh something fun yeah um give it to me so did you hear about the wheel of fortune person who uh solved the puzzle with just one letter wow so you got three words second one has three letters and there's an s the third letter i'm sorry yeah so we're showing so just for those the for our youtube folks we're actually showing it um the clue is on the map and there's three words and there's an s in the third to the last letter right um so it ends up that a human brain answered this correctly with one letter um and called glacier bay alaska okay which is insane so we were talking about you know system one thinking honestly matt this is the perfect example of system one thinking like by the way yeah daniel kahneman who wrote that book just passed away oh are you serious serious yeah he was like 90 something like uh yeah at the end of march march 27 something like that um we'll spill a little cold brew for a fallen homie uh daniel but the thinking fast is exactly that's is thinking

fast as it gets and and it's pretty deep too like it's there was a lot of heuristics obviously the guy who got this right i'm sorry i don't want to talk over daniel kahneman that's that's sad news and he's very impactful in ai as well but um but this guy said hey i i studied a bunch of maps right so he filled up his short-term memory and and got you know his heuristic muscles ready to answer a question like this and he was able to do that so what i thought was interesting was i then immediately took this snapshot that you're seeing and i loaded it into three different models i loaded it into um gpt4 turbo and then clod 3 opus my new favorite by the way and then a third one which i want to talk about for just a few minutes before we sign off today and that's uh gemini 1.5 pro which has a million tokens in it and i want to talk about what long context sign off yeah and so i fed it to all three of them and i did a zero shot experiment i wanted to absolutely do a a thinking fast like you know heuristics response i'm here to report that none of them got it right uh gpt4 and claude sort of just kept asking questions and gemini 1.5 pro came back with an immediate answer it was just the wrong answer so even though i was a little disappointing because i wanted to be you know it was a bit of disappointing but i'm going to use

this as my benchmark test when new models come out when gpt5 comes out and like llama 3 which is coming out by the way next month um that's a huge that's a big deal in open source community and you know the next opus is and then when uh gemini 1.5 ultra comes out i'm going to use this as my my zero shot test so hopefully i'll be able to report on a future episode that i found one that actually got it right so that that's kind of fascinating yeah that's that's uh shockingly hard good um one quick thing is sort of a sign off here i'm really so uh one of the other news items is that uh gemini 1.5 gemini from google uh version 1.5 pro was in early beta which i was super excited about because i got to do some long context window stuff and i'll give a couple of examples of what that means and why that's important here in a second but um that just became generally available yesterday so um that means you can play with it in the google ai studio sort of playground that means that you can also um now the api is available as well too and so what does it mean to do that type of stuff well let me give you a practical example for a customer and then a fun

one and then we can just sign off but i just i wanted to talk to people about that because the context window in Google 1.5 Pro, Gemini 1.5 Pro, is one million tokens. And we talked in previous discussions about how a token isn't exactly a word. It's kind of like a syllable, right? So what type of things can you do with it? Well, I think this is a good illustration. I was thinking I was confusing tokens with as the vector database unit of storage. No, yeah. Easy to conflate the two, you know, uh, one is a unit of measure to break down words and they're probably, there's probably an intersection in those, in those techniques, frankly. Um, fair enough. Um, so, so here's an example.

A year ago, uh, one of our customers, a law firm, a trial, uh, law firm, um, was really excited about AI, you know, beyond like standard research stuff. So they said, Hey, look, come into the office. We'll do a couple of experiments. I couldn't wait. I was really excited. I think the impact on law is going to be profound, actually. And so the first thing that gave me was, yeah, it really already is with all the document and discovery stuff going on. But even from a reasoning standpoint, which I think maybe this example gives it. But anyhow, I won't mention the law firm, but I went into the office and they first thing they gave me was a two week trial worth of transcripts.

You know how they have a little court stenographer there, like taking all the notes. They gave me, so kind of a long trial is like 17 business days. This is what theirs was. So like over two weeks worth of days. I loaded all those into the model. I had GPT 3.5 at the time, maybe four was fresh. And immediately it was like, we can't do anything with this because this was almost a million tokens. This is 880,000 tokens worth of text. Now I could have broken them up individually and just asked questions of a certain day. But the whole purpose of this is that these guys, this was an old case and they wanted to go through a like sort of a faux discovery for appeal.

So the whole purpose of appeal is that you have to evaluate the entire court transcript, potentially even depositions and all that type of stuff and evidence. Yeah, go ahead. OK, so with a custom with a custom GPT with ChatGPT, there's an area where you can upload all your information and it's supposed to be able to do it. Because you're supposed to be able to upload a ton of information like that. And then it will search it in chunks and it gets you a million or whatever. Is that not the case? Well, chunking, well, actually chunking is a process involved with vectorization. When you take documents, PDF documents, and you want to vectorize them, it will turn them into little, the main process is to take 500 vector chunks of data, vectorize that chunk, and then that becomes a row in your vector database.

That way, when you're searching and you find, like, something that looks like it's the answer to what's your vacation policy, it's only pulling down 500 tokens, not the entire document. And this is to reduce noise. We've talked about signal versus noise before. And then in GPT-4, if you have, like, a 16,000 token window or a 32,000 token window, I think Claude actually has a 122,000 token window. not entirely sure honestly but that means that you don't have to chunk a document you can send the whole document and and ask questions of it it becomes your prompt or your it actually becomes part of your conversation right and we talk about conversational memory right yeah that's huge that's very different than having just a knowledge store in the back end but actually having to be part of the conversation okay okay very much so and so in this case these guys were giving me almost 900,000 tokens that they wanted to have in conversational memory not retrieval right not semantic magic like exact verbatim this person said this and so on and so on right yeah so you can ask the question like you know yeah well and i'll tell you the question that they wanted to ask so in the case of looking up an appeal what you're doing is looking for instances of misapplied law or procedural errors that could be explored for an appeal and ideally you do this in real time while

like the transcript is being fed to you in the in the courtroom but as an experiment they look back on one and i couldn't do it at first because i didn't have enough token windows so the second gemini 1.5 pro beta went out it's like maybe six weeks ago or something i immediately called them up and i said let's do an experiment i went in on a saturday we ran the same thing again at the million token window which means now i can evaluate the entire core transcript and it can give me it has room to give me a response because the token window you have to include the response too so essentially this is what we came up with first of all just for giggles we did a trial summary in one minute and 42 seconds, completely summarized the trial with every detail of every motion, basically did like a AI paralegal.

But the big thing was, we asked it to do the misapplied law procedural error fines. It came up with three potential instances of misleading jury instructions, two potential instances of improper inclusion evidence, one potential improper admission of evidence, and one potential improper restriction of cross-examination, which are all potential appeals and the appeal that they ended up actually going with back in the day was one of these. Wow. So it ended up finding the one. And guess how long that took? A minute and 42 seconds. I don't know. 93 seconds. Yeah. So the whole point is when you have the long context windows, you can do stuff like that. The other part is we'll explore this in future episodes, but you can feed it video.

The one example I'll just give and then we'll call it a day is I often talk to people about the businesses about their AI journey by saying look imagine if you found out that in two years everyone in the planet's gonna have superpowers like everyone's gonna be able to fly see through walls all that kind of stuff but you just found out about that today so you can get a head start that's kind of how i frame up like look it's everyone's gonna have this but if you get a head start you'll be better than everybody in two years and i got that that superpower thing i kind of speculated that maybe i stole that from the movie incredibles you know the movie incredibles right and so i actually loaded the movie the incredibles into gemini 1.5 pro which ends up it was it was like 600,000 tokens oh what are you scooching liberty scooching a movie would have to be way more than that wouldn't it it is as a matter of fact i'm i'm lying i put in 59 minutes because in the google ai studio beta you were only allowed up to one hour but even still i mean video well it's not just a text it's like well i i just did another one which was a five-hour city council meeting that someone wanted to instead of having to watch a city council meeting they wanted to do a report to see if they were basically talking about anything useful yeah that five-hour one was

five over five million tokens just to give you an idea right so it's almost like a million tokens per hour so that's why i cut it cut the incredibles down to 59 minutes and i said i i didn't even ask it to search i just said i told hey i anecdotally use this with clients blah blah blah i go do you understand the concept and they go yeah or it says responds back yeah i understand the concept i go okay can you go see if maybe i did steal that from this movie and it comes back and it says like almost immediately there's a character named syndrome who says when everyone is super no one will be and it comes at one hour you know at 59 minutes or whatever and it was like whoa like beyond a semantic search no need to index videos no i mean i didn't even search for term i didn't even say what did syndrome say i didn't even know who the heck the person was so if you're talking about just the text of the movie that's just not that much text right no dialogue i could i could have done the same for the transcript but my input was the movie right yeah that's amazing so that more to come on long context windows i'm hoping by the end of the year that google ultra will come out at 10 million tokens and i'll give examples of different things that we're doing with that too but i just thought it's kind of cool and fantastic and thought that people might find that interesting

i mean yeah but i mean like if you have a movie i would think you could say things like which characters are most associated with the color red you know oh you could absolutely do it as a matter of fact i did another one where i put a television show in it i won't necessarily reveal the television show, but we were asking it to find the brief moment where a sales receipt is shown on screen. And what's the total of the sales receipt? They don't ever talk about the sales receipt. They don't ever talk about the total, but it within like a minute, it was able to go find one. It was like, oh yeah, $9.98. And here's the time code where you could find it. Bonkers stuff. Love it. So yeah, a lot more on multimodal long context windows.

What's our next podcast? I think our next one is we're going to have some guests. So we're looking to confirm our final guest, but we know for sure at least Ernest from Proof Geist is going to join us. And we may have some others as well. So we just have to get our confirmations. And we're going to talk about our daily drivers. That'll be our daily driver episode where we talk about how we use AI. I think that'll be a fun one. And some people can hear from other folks besides just you and me. I guess the other announcement is you and I have on the schedule for doing this every two weeks. Yes, sir. We're going to do it every two weeks. Can't wait. I think we've got some guests lined up for even future episodes.

One of them will be a friend of ours over at Claris. Maybe some others as well, too. So we'll hear from them on some of their initiatives. I'm actually looking forward to bringing in one of my associates here at iSolutions who's a data scientist here. To talk about the difference between, yeah, his PhD in data science does really interesting work. Talk about some of the work he's doing, but really kind of help us discern the difference between machine learning and AI, which I think is a question that a lot of people ask. And then all sorts of fun topics as we go. So, yeah. And oh, by the way, we might even have a custom GPT for our podcast. That would be sweet.

Yeah, I've already started creating it. And so that way people will be able to go on and ask us questions, ask the transcript questions about what we talked about, and that'll get bigger and bigger and bigger over time. Right now, it's not currently on the store because our podcast has the word Claris in it, and that's a copyrighted term, so they have to go review it. So I had to submit to it the actual tweet that Claris sent out that plugged our show to say, like, see, they're cool with it. So I think it's a matter of days. by our next episode, we should be announcing where people can find that. All right. Thank you, sir. I shall see you soon. We did it. You bet. Cheers.

Back to top ↑

Have something to share?

Join me for a conversation on ClarisTalk AI.

Schedule a recording →