How to use Generative AI & Vector Embeddings with Ruby (and a little bit of Python)
RubyGuides
by Jesus Castello
4M ago
Artificial intelligence seems to have reached a peak in popularity, and for good reason, it’s advancing very fast, it has reached the public eye (thanks to ChatGPT), and there is VERY active research on the field right now. So I fully immersed myself into the topic (the best way to learn something new, btw) so I can understand it & distill the basic concepts & practical ideas for you! What we are going to do is build a small project, which is a RAG-powered question-answering bot. Let’s get started! What is RAG & Why is it Useful? So 1st thing we need to address is the concept of RA ..read more
Visit website
From Complexity to Clarity: Mastering Ruby’s Pattern Matching Features
RubyGuides
by Jesus Castello
5M ago
An amazing new feature is now available in Ruby, it’s called pattern matching & it lets you extract specific values from complex data structures like arrays, hashes, and objects using concise syntax. In addition, it helps you check that these objects match a specific structure, so it works as a form of object validation. Since Ruby 3.0, this feature is no longer experimental (there is an exception, as we will see later) so now you’re free to start using it in all your projects! Matching Hash Structure In this example, we’ll do something very interesting that, before pattern matching, took ..read more
Visit website

Follow RubyGuides on FeedSpot

Continue with Google
Continue with Apple
OR