Difference between Gen AI RAG BOT based on LLM and fine tuned LLM

Girish Kurup
3 min readSep 20, 2023

Vanilla Usage:

Chat GPT , BARD from Google that are freely available for users across the world. Millions use them for their day to day queries Q/A.

Create your own BOT to decipher knowledge from huge datasets/documents:

Typically small scale Chat Bot Document based knowledge retrieval Q/A use cases can be fulfilled by instant upload of the documents to Langchain framework RAG (Retrieval Augmentation Generation) bot.

RAG bots can be used for conversational usecases in any domain sales, marketing, finance, legal or IT

First the documents/excel are uploaded using python framework to LLM via API. Document uploaded is embedded using proper foundation models from Open AI(davinci, gpt turbo 3.5) or from Google ( Geko, otter, bison). Embeddings of the documents uploaded in stored in vector dataabases.

The embedding of questions from users are done real time and stored in vector database.

Cosine similarity between embeddings vectors of documents and Questions are used to retrieve the sentences/paragraphs from the documents in natural language format.

Proper promt enginering is needed while asking questions to such RAG BOT.

RAG Bots we are not really finetuning any foundation model we are just creating vector databases with embeddings of the documents/excel which users would like to do Q/A.

If the vector databases indexes are saved then the embeddings can be persisisted and user can do Q/A on the bot as long as the user saves the vector databases safely

Create your own LLM using a pre trained LLM using Fine Tuning approach

Many organizatons prefer their own LLM to make sure the LLM is good in specific tasks. For example, Trading organization would like to create chat bots on fine-tuned LLM that are good in giving trade signals. Med-PAML form Goolge, BloombergGPT are such examples of fine tuned LLM very specific based on Organizational Data.

The best solution will depend on specific needs and resources. If you are new to fine-tuning and deploying large language models, then a managed service may be a good option for you. If you have the resources and expertise to manage the infrastructure yourself, then you may want to use open-source tools and resources.



Girish Kurup

Passionate about Writing . I am Technology & DataScience enthusiast. Reach me girishkurup21@gmail.com.