Exploring usecase for FineTuning
Organizations often encounter the following situations in their projects. Making decisions can be challenging due to varying implementation…
Exploring usecase for FineTuning
Organizations often encounter the following situations in their projects. Making decisions can be challenging due to varying implementation approaches. Here, I outline a few points to help you determine the best course of action. Let’s review the scenarios that different organizations are addressing:
- Frequent Changes in Data Data in your organization changes frequently, requiring systems and processes to adapt quickly. eg: News, sports, stocks etc
- Domain-Specific Terminology and Writing Style Companies often prefer to use terminology and writing styles specific to their domain. For example, a legal corporation may require its own terminology and vocabulary, while the healthcare industry might focus on terms and language related to healthcare.
- Utilizing Historical Data for Better Analysis Organizations with historical data aim to leverage it for improved analysis. For instance, the healthcare industry may utilize old patient records, while legal organizations might analyze historical case data to enable Large Language Models (LLMs) to learn, respond, and provide suggestions effectively.
- Building Trust Through Source Attribution Organizations want to establish trust by providing reliable responses and citing sources in their replies.
- Summarizing Financial Records with Contextual Vocabulary Finance companies may need to summarize financial records using industry-specific vocabulary while incorporating the latest news and events for context.
- Providing Real-Time Performance Metrics Organizations may want to display up-to-date information, such as a company’s stock price and performance today, rather than relying on outdated data from when the model was last trained.
- Incorporating Subject Matter Expertise Some scenarios require responses informed by subject matter experts (SMEs) to ensure accuracy and relevance when addressing customer queries.
There are various way to effectively build system which can be effective in above situation. Most widely used are RAG and Fine tuning LLMs by which organizations can enhance their decision-making processes and deliver better outcomes.
Retrieval Augmented Generation (RAG)
RAG is existing LLM with same weights but with more context information. its highly adaptable as the model is not changed and context can be highly adaptable to changing information.
data sources are not tied to the training data and strong on factual accuracy. The response could be slower because of retrieval step. Factual accuracy is very important in this case. These data sources are external data sources.

Its not a either or situation. you can use both such as you can finetune your model for your specific business and add latest information to keep things upto date.
Use Cases:
Fraud Detection and Risk Assessment: RAG systems significantly improve fraud detection rates compared to traditional machine learning models. They can access and incorporate real-time, relevant data during the decision-making process. RAG system can analyze million of transactions worldwide to detect even a small anomaly. for example transactions frequency, geographical location limitations, amount. It can make relations between different accounts to find unusual patterns.
Credit Risk Assessment: RAG can analyze customers credit report such as the credit score, loan amount, source of income and other liabilities. apart from customer data it can also analyze the countries economy and geographical environment like where that loan amount will be used for example the house location in mortgage. It can gather data of earth quakes, flooding, fire etc of the location based on the history.
Determining Insurance Policy: RAG can analyze the previous claims to understand the geography and location. these factors can help underwriters with various facts which are not part of individual profile.
Fine Tuning
Fine Tuning is training llm with more training data for specific task. Fine tuning is best for deep domain knowledge. The organization which has training data readily available.
Pre-requite for fine tuning:
- Do you have high quality dataset for training.
- What is the criteria for model’s performance. i.e. How do you know this model is performing as expected for the input queries.
Without these two points its will not be a efficient fine tuning.
Fine Tuning Libraries:
TRL: HF’s fine tuning library built on top of transformers. It’s opensource and creates a different file with new weights and keeps the base model intact. We can create a simple Kubernetes cluster and start model in that. After that define the source of dataset and some parameters in yml and thats it. the model learning will take few hours to complete. Whole process is documented here: TRL_LoRA_FineTuning
Axolotl: Based on resuable YAML configurations. You can focus on your data tahn really on the tool. its easy to use.
LLaMA-Factory: fine tuning with GUI.
Unsloth: efficient single GPU fine-tuning with useful hints
Here lets discuss one of the safest and widely used for fine tuning LLM
LoRA: Low Rank Adaption of LLM
Its a Parameter Efficient fine tuning method which is an efficient method for adapting large AI models to specific tasks without modifying the entire model. If we see the transformation layer of Generative AI.

The new trained data adds extra weight and its tuning these new weight attached with pre-trained LLM, this makes sure the existing model is not impacted.
UseCase:
Reviewing Contract Documents: An organization can train the model to summarize the contract documents like commercial loan contract. The model can verify the details which underwriting is interested.
Retail Demand Forecasting: Models can analyze how much demand will be there at certain period of time and the products which customers will be interested in based on training data.
Predicting Disease in Health Industry: Models can be trained to scan radiology and imaging details to find diseases. There can be multiple use case in health industry from find drugs to cure diseases or to find the diagnoses.
Its important to note that prelearned dataset should be available in good quantity to train the model. The output accuracy depends on your dataset you use to train the base model.
메타데이터
- post_id
- e982f0b8ed7c
- slug
- usecase-based-rag-or-finetuning-e982f0b8ed7c
- url
- https://medium.com/@nishant.malviya/usecase-based-rag-or-finetuning-e982f0b8ed7c
- canonical_url
- https://medium.com/@nishant.malviya/usecase-based-rag-or-finetuning-e982f0b8ed7c
- author_url
- https://medium.com/@nishant.malviya
- status
- ok
- fetched_at
- 2026-06-26 21:52:29