training/fine-tuning a LLM agent for specific outcomes desired?

SpaceYams

Registered Member
Joined
Jan 17, 2023
Messages
64
Reaction score
329
howdy BHW. do yall have any tips for training/fine-tuning a LLM agent for a specific outcome? what i mean by this is best illustrated with the old chatbot technique where you would have the chatbot designed to ultimately lead someone to a cam/dating site. i used to run this way back in the day using a simple chat script that'd do basic keyword matching with canned responses. has anyone tried to implement such a thing using a LLM? i'm still very new to the new AI tech and would like to try doing this but am not sure where to begin. for example how would you "steer" the LLM back on the path if the chat gets off it?
 
. for example how would you "steer" the LLM back on the path if the chat gets off it
You give the LLM examples on how to steer the conversation and implement logic on "when to steer" the convo. Its not much different from making an old school chatbot.

Its hard to illustrate in a small textbox in a forum. But I can describe the process in short:
- first you need a script to generate the LLM responses so you can programmatically control it. You start with a list of canned openers.
- next your user makes a response. You use the LLM or another fine-tuned model to find the users intent.
- depending on the intent you then drive the conversation of the LLM.
 
You give the LLM examples on how to steer the conversation and implement logic on "when to steer" the convo. Its not much different from making an old school chatbot.

Its hard to illustrate in a small textbox in a forum. But I can describe the process in short:
- first you need a script to generate the LLM responses so you can programmatically control it. You start with a list of canned openers.
- next your user makes a response. You use the LLM or another fine-tuned model to find the users intent.
- depending on the intent you then drive the conversation of the LLM.

thank you. i did start reading about how you can "score" or label the responses as helpful/unhelpful as to train/tune the model. this is basically what reinforcement with human feedback is, correct? eg:

1708714646776.png

are there any open-source libraries/frameworks you'd recommend for this?
 
check out https://github.com/opendilab/awesome-RLHF?tab=readme-ov-file#codebases

you might need a basic understanding of python to set up these repos, but once they are set up the docs are usually great for guiding you how to get started.

other than that you could try some Saas services that do not require you set up your own code base:

1. **Entry Point AI**:
- A modern fine-tuning platform for proprietary and open-source large language models, including GPT, Llama-2, and Mistral.
- It simplifies the fine-tuning process, making it accessible even with a few dozen training examples[6].

2. **Hugging Face**:
- Provides access to thousands of pre-trained models for a wide range of tasks.
- Offers detailed guides and tools for fine-tuning pre-trained models with deep learning frameworks of your choice[11].

3. **Trudo AI**:
- A no-code platform that allows users to fine-tune OpenAI GPT-3 models using spreadsheets, enhancing apps with personalized AI capabilities[21].

4. **Fine-Tuner.ai**:
- Listed as one of the AI tools for fine-tuning platforms, although specific details about its features are not provided in the search results[3].

5. **OpenAI API**:
- Offers fine-tuning capabilities that provide higher quality results than prompting alone and the ability to train on more specific data[9].

6. **Snorkel AI**:
- Focuses on programmatic labeling and fine-tuning for enterprise use cases, providing a platform for error analysis, targeted labeling, and collaboration with internal experts[10].

7. **Vertex AI by Google Cloud**:
- Supports supervised tuning, reinforcement learning from human feedback (RLHF) tuning, and model distillation for tuning language foundation models[18].

8. **DeepSpeed**:
- An optional tool mentioned for optimizing training and inference jobs, which can be used in conjunction with off-the-shelf pre-trained models[13].

When choosing an off-the-shelf solution for fine-tuning AI models, it's important to consider the specific objectives, the volume and quality of data available, compliance and ethics, risk management, and performance management criteria[1]. Each platform offers different features and capabilities, so selecting the right one will depend on the use case, available resources, and desired outcomes.

Links:
[1] https://shelf.io/blog/fine-tuning-llms-for-ai-accuracy-and-effectiveness/
[2] https://www.sciencedirect.com/science/article/pii/S2666651021000231
[3] https://topai.tools/s/AI-fine-tuning-platform
[4] https://www.linkedin.com/pulse/tailoring-ai-your-business-needs-how-fine-tune-large-language
[5] https://neptune.ai/blog/hugging-face-pre-trained-models-find-the-best
[6] https://www.entrypointai.com
[7] https://techstrong.ai/articles/when-to-use-off-the-shelf-ai-versus-custom-models/
[8] https://spotintelligence.com/2023/10/13/pre-trained-models/
[9] https://platform.openai.com/docs/guides/fine-tuning
[10] https://snorkel.ai/how-to-fine-tune-large-language-models-for-enterprise-use-cases/
[11] https://huggingface.co/docs/transformers/en/training
[12] https://humansignal.com/fine-tuning-models/
[13] https://presencepg.com/journal/fine-tuning-llms
[14] https://www.linkedin.com/pulse/mastering-fine-tuning-enhancing-pre-trained-models-tasks-marzougui-zb3zf
[15] https://topai.tools/s/OpenAI-GPT-3-model-fine-tuning-tool
[16] https://www.linkedin.com/pulse/custom-ai-vs-off-the-shelf-solutions-navigating-complex-terrain-oxzyc
[17] https://www.tensorflow.org/tutorials/images/transfer_learning
[18] https://cloud.google.com/vertex-ai/docs/generative-ai/models/tune-models
[19] https://www.techtarget.com/searchenterpriseai/definition/fine-tuning
[20] https://productcoalition.com/fine-tuning-pre-trained-models-unleashing-the-power-of-generative-ai-1b58fc903554?gi=be624ed69918
[21] https://deepgram.com/ai-apps/trudo-ai
[22] https://dlabs.ai/blog/machine-learning-off-the-shelf-models-or-custom-build-pros-and-cons/
 
howdy BHW. do yall have any tips for training/fine-tuning a LLM agent for a specific outcome? what i mean by this is best illustrated with the old chatbot technique where you would have the chatbot designed to ultimately lead someone to a cam/dating site. i used to run this way back in the day using a simple chat script that'd do basic keyword matching with canned responses. has anyone tried to implement such a thing using a LLM? i'm still very new to the new AI tech and would like to try doing this but am not sure where to begin. for example how would you "steer" the LLM back on the path if the chat gets off it?
Honestly, if your responses are going to be canned.. it is easier to try RAG (Retrieval Augmented Generation)
 
Back
Top