My 2025 AI Journey : Article #5 : Vector Database Retrieves & Form An Answer

cyber technology concept design with digital face and network diagram

Vector Database Retrieves & Form An Answer

Did you know that SNOW absorbs sound? I didn’t know that but when I read it, I knew it to be true because I experienced it. One Winter at PSU, it snowed so much that classes were canceled. Canceling classes at PSU was rare so there was a significant amount of snow. I knew it was supposed to snow and because I love snow I woke up early to see how much. I was living in the apartments on campus and my room being on the first floor I could see that the snow was up to my windowsill, even though it was still dark outside. I was excited for all the snow but what stood out to me (even today) was how silent it was. The only other time I felt that was at the beginning of the movie, “Contact”.

Even though I knew this to be true, I decided to do some research. Since I’m documenting my AI Journey, I thought asking ChatGPT first would be a good place to start. I’ve learned, on this journey, that the way you ask your question (prompt) is important. I chose a simple question to start, “Does snow absorb sound?”.

I am curious how ChatGPT does this, that is returning an answer instead of a list of articles or websites. I’m not a database person but when I think about traditional (relational) you take a string, in this case ‘Does snow absorb sound’, and do a search for that exact string (if in quotes) or each word (if no quotes).

These are my initial thoughts and questions. ChatGPT took my question, applied a transformation (machine learning model), and converted it into an embedding (vector). It then took that embedding and did a Similarity Search to find a match. Ok, I have that, I guess what I’m wondering is, instead of returning everything that was in that embedding/vector… it took that information and formed a logical sentence(s)?

Ok, I have that, I guess what I’m wondering is, instead of returning everything that was in that embedding/vector… it took that information and formed a logical sentence(s)… response. Since I am on this AI Journey, I’m going to chat with ChatGPT and see what response I receive. I may have to mess around with the wording of the prompt, but this should be interesting.

Below is my prompt (question) and ChatGPT’s response. I got the answer I was looking for and will be researching it further. Number 4 is the answer I was looking for… the retrieved chunks, from the Similarity Search, are passed to a language model or a similar AI system to generate a coherent and meaningful answer. Now that I am looking at it, I do remember reading this. A vector is returned so it needs to be converted back.

I enjoyed writing yesterday and wanted to continue today, as I was thinking about all of this. I think the next step is to look further into these transformers/models.

They say that “the best way to learn is to teach” so these articles are to help me learn and I hope others can get something from them as well. ?

______________________________________________
All articles posted Wednesdays & Saturdays by 8PM
(with additional postings here and there)

Leave a Comment

Your email address will not be published. Required fields are marked *