Bring AI-Based Search to Your Web App

Rate this content
Bookmark

ChatGPT took the tech world by storm. Everyone talks about it, from your CTO to your hairdresser (at least my barber does). And there are many reasons why we should all be excited about it and many other AI/ML innovations.


But how do you bring them into your tech stack, your website/backend, to work with your data and provide AI-driven search and data augmentation?


There is a new generation of AI Native databases, which use deep learning models to find answers to natural language queries. We are talking about the ability to search through text, images, videos, DNA, or any unstructured data, all with a single query.


The rule of thumb: if there is an ML model, we can search through it.


Join me to learn about the foundation blocks (LLMs and vector embeddings, Vector Databases), how they all play together and most importantly - how you can build something yourself with open-source tech.


And, of course!!! There will be a live-coding demo, where I will take you through the experience of building an AI-based search – with Weaviate, an open-source Vector Database – and adding it to an app. Now the question... should this be done in Angular, React, Vue or just pure JS ;)


#MayTheDemoGodsBeWithUs


FAQ

Machine learning (ML) is a field of artificial intelligence (AI) that focuses on building systems that learn from data, identify patterns, and make decisions with minimal human intervention. It involves training algorithms on data sets to create models that can perform tasks such as recognition, prediction, and decision-making.

No, you do not need a PhD to understand machine learning. Many resources and tools are designed to make ML accessible to individuals without advanced degrees in the field.

Semantic search in machine and natural language processing involves understanding the intent and contextual meaning of a search query, rather than just matching keywords. It aims to improve the accuracy of search results by understanding the semantics, or meaning, of the words in the query.

Vector embeddings are mathematical representations of text or other data in a high-dimensional space. Machine learning models convert data into vectors of numbers that capture the essence of the data. These vectors are then used in various ML tasks, such as finding similarities between items or classifying data.

Machine learning has a wide range of applications including speech recognition, image recognition, medical diagnosis, predictive analytics, personalization in retail, and more. It is used to automate decision-making processes and create more personalized user experiences.

ChargPT appears to be a typographical error in the text, likely referring to 'ChatGPT', a variant of the GPT (Generative Pre-trained Transformer) models developed by OpenAI. These models use machine learning to generate human-like text based on the input they are given.

There are many tools available for implementing machine learning models, including TensorFlow, PyTorch, OpenAI's API, Hugging Face's Transformers, and others. These tools provide the infrastructure and pre-trained models that can be used to develop and deploy machine learning applications.

Search plays a crucial role in machine learning as it is often the starting point for gathering information and gaining insights. Improving search capabilities using ML can lead to more efficient data retrieval, better user experiences, and enhanced decision-making processes.

Sebastian Witalec
Sebastian Witalec
31 min
01 Jun, 2023

Comments

Sign in or register to post your comment.

Video Summary and Transcription

The Talk discusses the use of machine learning in search engines, specifically focusing on semantic search and vector embeddings. It explores the integration of JavaScript and machine learning models, using Weaviate as an open-source vector database. The Talk demonstrates how to connect to Weaviate, query data, and perform machine learning queries. It also highlights the benefits of Weaviate, such as its superior developer experience and performance. Additionally, the Talk addresses customization options, data privacy concerns, and the varying effectiveness of different machine learning models.

1. Introduction to Machine Learning and Search

Short description:

I'm super excited to introduce you to this topic. I didn't have any idea about it a year ago. Let's get cracking. My journey begins with a conference talk on machine learning. At first, I was confused and thought I needed a PhD. But then I realized that machine learning tools have become accessible to everyone. I will focus on the topic of search using machine learning, as everything on the internet begins with search.

So, thank you for this very nice introduction. And I'm super excited to introduce you to this topic that, let's face it, a year ago I didn't have any idea about. So I'm going to bring you on my one year journey with me. So let's get cracking.

So you heard the introduction, my name is Sebastian Vitales, I build cool stuff, and I want to talk to you about it. So my journey begins a few years ago, a long long time ago in a galaxy far away. I went to a conference and there was a very interesting talk that I was very excited about that promised that you don't need a PhD to understand machine learning. And obviously I was super excited about it because A, I didn't have any clue about ML but I really wanted to get into it, like, hey, there was a promise, like, maybe I didn't need to study for five years to do something around ML. The thing is that 10 minutes into that talk I was so confused I didn't even know what my name was. And immediately my assumption was like, yep, you need a PhD, I'm never touching ML again in my life, you know. That's it. Over. But then I was like, OK, I'm not going to give up.

The thing that changed and is happening lately, and I'm sure you're all experiencing that, is that everybody's talking about ChargPT, AI, ML, like, all those things that you're hearing. Like, I currently live in Denmark. I don't speak any Danish but if I'm in a café there's, like, people speaking randomly Danish and catching ChargPT, something, something, like, you keep catching it. I went to get a haircut, right, like, and my hairdresser got confused. It was like, OK, I'm going to ask ChargPT what kind of haircut will go with you. Even ChargPT can help with it so that's OK. And the thing is, like, what changed? Why is everyone now talking again about machine learning? Where is this buzz coming from? Why is everyone excited, not just even people in tech, but even, like, regular people that, you know, don't, you know, don't use computers for professional stuff, right? And what changed is actually that those machine learning tools became accessible, right? Like, suddenly, they're, like, at your fingertips. Suddenly, you can go, you know, to OpenAI and, like, create a login, and then you could start writing prompts and ask questions to the AI and this is mind-blowing. And there are so many different applications, all sort of, like, image generation, all sort of things happening. But I only have 20 minutes for the talk. And the organizers, like, asked me already five times. So, I'm going to finish on time. So, I'm going to narrow down and only talk about, like, a very specific thing of the machine learning, especially I have 20 minutes and I want to do some live coding as well. So, let's stick to that.

So the topic of the presentation was search or using machine learning, search. And let's face it, everything that we do on the internet begins with search, right? You want to listen to music? You search. You want to watch a movie? You're going shopping? You want to find some information? You go to Wikipedia, you always search.

2. Challenges with Traditional Search

Short description:

Search works, but it could be better. Traditional search engines may not understand the meaning of a question, leading to irrelevant results. Semantic search, on the other hand, focuses on the meaning of the question and can provide more accurate answers. By using machine learning, we can enhance the power of semantic search.

And I mean, you probably think it's like, okay, what's the problem? We've been doing that for decades. Search works. Well, I beg to differ, right? Like, it kind of works, but it could be better. And let me give you an example. So, with traditional search, you may face some challenges. So, if you went and asked, like, a traditional search engine, like, why do airplanes fly? So, maybe you have a whole database of documents that explain it. You may get an answer like, why you should fly with expensive airplanes? And it's like, well, I mean, it's pretty good because it matches airplanes, it matches why do and fly and all this. Why is this guy complaining? It's like a perfect match. Well, I mean, in reality, we asked how planes fly, and we were told to fly with expensive airlines. Well, that solves it for me. Thank you. Well, the solution for me is kind of like looking for the question from the semantic point of view. What is the meaning of the question and what sort of answer can I find for you? And actually, if you put this question into Google Search, you'll get an answer like this. You go and we'll find the dynamics of fly from NASA. And then in there, the bit that helped us find the answer was like airplanes wings are shaped to make air move faster over the top of the wing, blah, blah, blah, blah, blah. Like we don't really have any of the keyword matches, but the meaning is there, right. And that's basically the power of semantic search. So by looking at those two examples and the kind of things that you can get between the two, I mean, the conclusion is pretty straightforward, right? Like we should be going and looking more at the semantic type of search and like using machine learning for it.

QnA

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

Building a Voice-Enabled AI Assistant With Javascript
JSNation 2023JSNation 2023
21 min
Building a Voice-Enabled AI Assistant With Javascript
Top Content
In this talk, we'll build our own Jarvis using Web APIs and langchain. There will be live coding.
AI and Web Development: Hype or Reality
JSNation 2023JSNation 2023
24 min
AI and Web Development: Hype or Reality
In this talk, we'll take a look at the growing intersection of AI and web development. There's a lot of buzz around the potential uses of AI in writing, understanding, and debugging code, and integrating it into our applications is becoming easier and more affordable. But there are also questions about the future of AI in app development, and whether it will make us more productive or take our jobs.
There's a lot of excitement, skepticism, and concern about the rise of AI in web development. We'll explore the real potential for AI in creating new web development frameworks, and separate fact from fiction.
So if you're interested in the future of web development and the role of AI in it, this talk is for you. Oh, and this talk abstract was written by AI after I gave it several of my unstructured thoughts.
The Rise of the AI Engineer
React Summit US 2023React Summit US 2023
30 min
The Rise of the AI Engineer
We are observing a once in a generation “shift right” of applied AI, fueled by the emergent capabilities and open source/API availability of Foundation Models. A wide range of AI tasks that used to take 5 years and a research team to accomplish in 2013, now just require API docs and a spare afternoon in 2023. Emergent capabilities are creating an emerging title: to wield them, we'll have to go beyond the Prompt Engineer and write *software*. Let's explore the wide array of new opportunities in the age of Software 3.0!
Web Apps of the Future With Web AI
JSNation 2024JSNation 2024
32 min
Web Apps of the Future With Web AI
AI is everywhere, but why should you care, as a web developer? Join Jason Mayes, Web AI Lead at Google, who will get you on track by demystifying common terminology ensuring no one is left behind, and then take you through some of the latest machine learning models, tools, and frameworks you can use right in the browser via JavaScript to help you bring your creative web app ideas to life for almost any industry you may be working in. By moving AI to the client side, there is no reliance on the server after the page load, bringing you benefits such as privacy, low latency, offline solutions, and lower costs which will be of growing importance as the field develops. This talk is suitable for everyone with a curiosity for web and machine learning, so come along and learn something new to put in your web engineering toolkit for 2024.
Building the AI for Athena Crisis
JS GameDev Summit 2023JS GameDev Summit 2023
37 min
Building the AI for Athena Crisis
This talk will dive into how to build an AI for a turn based strategy game from scratch. When I started building Athena Crisis, I had no idea how to build an AI. All the available resources were too complex or confusing, so I just started building it based on how I would play the game. If you would like to learn how to build an AI, check out this talk!
Code coverage with AI
TestJS Summit 2023TestJS Summit 2023
8 min
Code coverage with AI
In this lightning demo I will showcase how Codium, a cutting-edge generative AI tool, is revolutionizing code integrity. We will demonstrate Codium's ability to generate useful Mocha tests, taken from a public repository and highlight the seamless integration. You can see Codium as it transforms complex test scenarios into actionable insights, propelling code coverage forward. Join us for an insightful peek into the future of automated testing where speed meets quality!

Workshops on related topic

AI on Demand: Serverless AI
DevOps.js Conf 2024DevOps.js Conf 2024
163 min
AI on Demand: Serverless AI
Top Content
Featured WorkshopFree
Nathan Disidore
Nathan Disidore
In this workshop, we discuss the merits of serverless architecture and how it can be applied to the AI space. We'll explore options around building serverless RAG applications for a more lambda-esque approach to AI. Next, we'll get hands on and build a sample CRUD app that allows you to store information and query it using an LLM with Workers AI, Vectorize, D1, and Cloudflare Workers.
How to Solve Real-World Problems with Remix
Remix Conf Europe 2022Remix Conf Europe 2022
195 min
How to Solve Real-World Problems with Remix
Featured Workshop
Michael Carter
Michael Carter
- Errors? How to render and log your server and client errorsa - When to return errors vs throwb - Setup logging service like Sentry, LogRocket, and Bugsnag- Forms? How to validate and handle multi-page formsa - Use zod to validate form data in your actionb - Step through multi-page forms without losing data- Stuck? How to patch bugs or missing features in Remix so you can move ona - Use patch-package to quickly fix your Remix installb - Show tool for managing multiple patches and cherry-pick open PRs- Users? How to handle multi-tenant apps with Prismaa - Determine tenant by host or by userb - Multiple database or single database/multiple schemasc - Ensures tenant data always separate from others
Working With OpenAI and Prompt Engineering for React Developers
React Advanced Conference 2023React Advanced Conference 2023
98 min
Working With OpenAI and Prompt Engineering for React Developers
Top Content
Workshop
Richard Moss
Richard Moss
In this workshop we'll take a tour of applied AI from the perspective of front end developers, zooming in on the emerging best practices when it comes to working with LLMs to build great products. This workshop is based on learnings from working with the OpenAI API from its debut last November to build out a working MVP which became PowerModeAI (A customer facing ideation and slide creation tool).
In the workshop they'll be a mix of presentation and hands on exercises to cover topics including:
- GPT fundamentals- Pitfalls of LLMs- Prompt engineering best practices and techniques- Using the playground effectively- Installing and configuring the OpenAI SDK- Approaches to working with the API and prompt management- Implementing the API to build an AI powered customer facing application- Fine tuning and embeddings- Emerging best practice on LLMOps
Relational Database Modeling for GraphQL
GraphQL Galaxy 2020GraphQL Galaxy 2020
106 min
Relational Database Modeling for GraphQL
Top Content
WorkshopFree
Adron Hall
Adron Hall
In this workshop we'll dig deeper into data modeling. We'll start with a discussion about various database types and how they map to GraphQL. Once that groundwork is laid out, the focus will shift to specific types of databases and how to build data models that work best for GraphQL within various scenarios.
Table of contentsPart 1 - Hour 1      a. Relational Database Data Modeling      b. Comparing Relational and NoSQL Databases      c. GraphQL with the Database in mindPart 2 - Hour 2      a. Designing Relational Data Models      b. Relationship, Building MultijoinsTables      c. GraphQL & Relational Data Modeling Query Complexities
Prerequisites      a. Data modeling tool. The trainer will be using dbdiagram      b. Postgres, albeit no need to install this locally, as I'll be using a Postgres Dicker image, from Docker Hub for all examples      c. Hasura
Building Your Generative AI Application
React Summit 2024React Summit 2024
82 min
Building Your Generative AI Application
WorkshopFree
Dieter Flick
Dieter Flick
Generative AI is exciting tech enthusiasts and businesses with its vast potential. In this session, we will introduce Retrieval Augmented Generation (RAG), a framework that provides context to Large Language Models (LLMs) without retraining them. We will guide you step-by-step in building your own RAG app, culminating in a fully functional chatbot.
Key Concepts: Generative AI, Retrieval Augmented Generation
Technologies: OpenAI, LangChain, AstraDB Vector Store, Streamlit, Langflow
Scaling up Your Database With ReadySet
Node Congress 2023Node Congress 2023
33 min
Scaling up Your Database With ReadySet
WorkshopFree
Aspen Smith
Nick Marino
2 authors
The database can be one of the hardest parts of a web app to scale. Many projects end up using ad-hoc caching systems that are complex, error-prone, and expensive to build. What if you could drop in a ready-built caching system to enable better throughput and latency with no code changes to your application?
Join developers Aspen Smith and Nick Marino to see how you can change one line of config in your app and use ReadySet to scale up your query performance by orders of magnitude today.