Connect with us

Hi, what are you looking for?

Business

Vectors, RAG are behind a lot of the AI magic

Tirthankar Lahiri was doing his PhD in the US when he decided to take a break and join Oracle in 1995 and has been with the data management company ever since. He says the technological marvels he is seeing in his field of expertise now are akin to black magic.

“At Oracle, I manage a team called data and in memory technologies. We’re all about analyzing data, transacting on data, and now running AI inferencing on data.

I think we’re at the beginning of a very new sort of paradigm for data where business data, government data, personal data, and unstructured data like images, speech, text, etc are all coming together.”

The reason he is excited is because of a now widely popular architecture called Retrieval Augmented Generation (RAG), but to understand that we need to first wrap our heads around a concept called AI vectors and vector databases.

A vector is simply a numerical representation of the essence of data. That data can be anything, a photo, an audio file, or text. This numerical representation, Tirthankar says, is generated typically through very advanced machine learning algorithms like neural networks. “The idea is you can encode data in a way that it captures the meaning of something.”

These vectors are just a series of numbers, but data that is similar will also have vectors that are very similar to each other. This ‘vectorization’ of data is what has enabled generative AI models to give such precise answers to our queries, or prompts. “Unlike a traditional database which does more exact search, now with vector search, you can do searches based on the meaning. So, words that mean similar things have vectors that are very close together.”

So, you could, Tirthankar says, take a picture of a flower arrangement and feed this into a vector embedding model that will convert that into a list of numbers. “Then I can go use that list to find similar flower arrangements elsewhere.”

When we ask a large language model a question, that question gets bundled up into a prompt, the prompt is then sent to a large language model, like ChatGPT, for a response. But ChatGPT, and other LLMs in the market, are all trained on data that is on the internet. It doesn’t have access to any of our personal data, not to mention the proprietary and highly guarded data sitting in the databases of companies. This is where RAG architectures come in.

“You will see that term all over the place now. RAG is a giant new use case for vectors,” says Tirthankar. As the term implies, retrieval augmented generation improves the ability of generative AI models to give better results to our queries by providing the LLM with relevant, custom information that it does not have access to.

Suppose somebody asks an enterprise a question like ₹Find me the best products to buy in your current portfolio given my needs.’ What happens is that the question is converted to a vector. All the enterprise documents describing products are also stored as vectors. Then the system takes the question vector, and the matching product vectors from the enterprise database and sends all the correspondent documents, which is one giant blob of information, to the large language model.

Tirthankar says that the large language model, which is trained on enormous amounts of data, can then use its general knowledge, and the specialized knowledge that it has retrieved via the RAG architecture, to make an intelligent recommendation.

The big picture, Tirthankar says, is that we’re entering a new world where AI is becoming mainstream and where anybody can be an AI practitioner. “In the past to use AI you were required to have a PhD and be a data scientist, but now with public access to large language models, anybody can use AI. But to use it properly you have to feed the AI with the correct contextual information and that is where vector databases come in.”

The article originally appeared on The Times of India.

You May Also Like

World

A leader of Kataib Hezbollah and two of his guards were in a vehicle when it was targeted in the east of the Iraqi...

World

Pakistan will discuss an Extended Fund Facility (EFF) with the International Monetary Fund (IMF) in Washington next month, Finance Minister Muhammad Aurangzeb said on...

Business

New York CNN — Apple has received approval to change the way its smartwatches function so the company can overcome the Apple Watch ban imposed by...

Finance

NEW YORK – Gold prices saw a marginal increase today, with spot gold trading at $2,030.87 per ounce. The uptick in the precious metal’s value coincided...