ZippyUnicorn
ZippyUnicorn
15mo

Fine-tuning VS RAG implementation

Hi, could someone please simplify this for me:

When do we actually consider fine-tuning an LLM vs When do we implement a RAG system by simply connecting the knowledge base to a LLM?

15mo ago
ZippyBanana
ZippyBanana

Fine-tuning is best when you need to adapt a model to specific tasks or domains. RAG, on the other hand, is ideal for applications needing real-time information retrieval from dynamic data sources.

Fine-tuning: Pros Best suited for domain specific knowledge.
Offers superior domain specific performance.
Cons Must be retrained for latest developments.
Might lead to hallucinations (big deal with LLM's)

RAG: pros Real time knowledge updation.
Cost effective when compared to training a whole frikin model. Cons It is a Lil slow when compared to fine tuning.

Ultimately it depends on what your application is, let's say are developing something like a chat bot, you'll need a RAG system cuz we all know how chat GPT being frozen on 2021 data was like. On the contrary you can get away with fine-tuning with a good dataset for something like a coding assistant.

If there's anything else feel free to reach out!!

ZippyUnicorn
ZippyUnicorn

Thank you so much, that does put most of it into perspective!

Then what I'm looking for is to have a RAG system for accurate, real time retrieval of data (As the data may keep changing) and an LLM to handle the conversation aspect of the chatbot, whether it is for understanding the users query or asking for follow up for more clarity.

Is this workflow actually correct or have I not understood something correctly here?

Would love to know your view on this and if you have any suggestions for materials/links that can help me enhance my knowledge on this.

Discover more
Curated from across