Wednesday, May 22, 2024

AI Applications

This is a follow-up to my previous post on the Generative AI for Everyone course.

In week 2, Andrew Ng's course is a little less conceptual and more application-focused. He shows examples of generating code to do basic tasks such as count up restaurant reviews and count how many are positive vs. negative. The code examples were simple and easy to modify and run. One of my favorite quotes as he talked about building a chat tools was the following, "Having built a number of generative AI projects, I've often been surprised and delighted by the strange and wonderful things that the users will try to do with your system." He then goes through how the system would likely respond that it doesn't know the answer but then those questions that stumped the AI can be gathered and used to provide additional information to help the system be able to answer that type of question in the future.

He then gives a simple example to determine how much a generative AI tool might cost. Based on the number of tokens required to input and output text, it could cost maybe 8 cents to generate enough text that it would take a reader about an hour to get through.

One of the most interesting concepts he discusses is that since a large language model doesn't know everything, it is best used as a reasoning engine. That is, it doesn't store and retrieve all information but rather can help you reason through and process information from other sources. Retrieval Augmented Generation (RAG) uses this approach of taking information from a document or other source you direct it to in order to process a response. They can also be fine-tuned or pre-trained for your particular application.