What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

To teach an AI model a new task, first identify what is failing: instructions, access to information, repeatable behavior, or the ability to take an action. Then choose the matching method—prompting, retrieval, fine-tuning, or tool integration—and compare it with a measured baseline. These methods change different parts of the system; they are not interchangeable.

Start by measuring the problem

Before customizing a model, collect representative inputs and define what a successful answer or action looks like. Keep these examples as an evaluation set, and run the unchanged model against them to establish a baseline. Include ordinary cases and the edge cases that matter to your application.

This matters because model output is not perfectly deterministic, and behavior can vary between model snapshots and families. OpenAI’s model optimization guidance recommends an iterative cycle of evaluation, prompting, optional fine-tuning, and evaluation. Compare versions on the same cases rather than relying on a few memorable outputs.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose the change that matches the failure

What is going wrong? First method to try What it changes
The model misunderstands the task or returns the wrong format Clearer instructions and examples The context provided for the request, not the model’s trainable parameters
The model needs current, private, or frequently updated facts Retrieval-augmented generation (RAG) Relevant material is retrieved from an external collection and added to the prompt
The model repeatedly misses a behavior despite good instructions and context Fine-tuning Training examples shape the model’s behavior for a recurring task
The application must search, calculate, fetch data, or execute an operation Tool or function integration The application gains a route to an external capability

You can combine methods when a task needs more than one. For example, retrieval can supply changing facts while a model follows a carefully defined response format. Choose based on observed failures, not on an assumption that every project must progress through a fixed sequence.

Try instructions and examples for task clarity

If the model has the information it needs but misunderstands what to do, improve the prompt first. State the task, relevant constraints, expected output, and any context the model should use. When a pattern is easier to show than describe, include a few examples of inputs paired with good outputs.

Prompting changes what the model sees for a particular request; it does not retrain the model’s parameters. This makes it a useful first adjustment for unclear directions or formatting errors. Evaluate the revised prompt against the same baseline cases, including examples that were not used to write it. OpenAI’s optimization guidance describes prompting as part of an evaluation-led improvement cycle.

Rank #2
Sale
Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow: Concepts, Tools, and Techniques to Build Intelligent Systems
  • Use scikit-learn to track an example ML project end to end
  • Explore several models, including support vector machines, decision trees, random forests, and ensemble methods
  • Exploit unsupervised learning techniques such as dimensionality reduction, clustering, and anomaly detection
  • Dive into neural net architectures, including convolutional nets, recurrent nets, generative adversarial networks, autoencoders, diffusion models, and transformers
  • Use TensorFlow and Keras to build and train neural nets for computer vision, natural language processing, generative models, and deep reinforcement learning

Use retrieval when the model needs outside knowledge

Retrieval-augmented generation connects a model to an external collection. At response time, the application retrieves relevant material and supplies it in the prompt. This is useful when information is private, absent from the model’s training, or likely to change.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Evaluate two separate things: whether retrieval finds the right material, and whether the model uses that material correctly. A fluent answer can still be wrong if the retrieval step returned irrelevant or incomplete sources. OpenAI’s guidance on optimizing LLM accuracy discusses retrieval as a way to provide relevant context.

Fine-tune for recurring behavior

Supervised fine-tuning (SFT) trains a model on examples of inputs and desired outputs. It may help when a recurring task still produces inconsistent behavior despite clear instructions and suitable context—for example, when the model must reliably follow a specialized pattern or output format. Fine-tuning is not the right fix for facts that change frequently; those are generally better supplied through retrieval.

Build a representative, carefully curated training set and evaluate the result against the original baseline. OpenAI’s supervised fine-tuning guide recommends setting up evaluations before investing in fine-tuning. For its own SFT workflow, OpenAI says the minimum is 10 examples and recommends starting with 50 well-crafted demonstrations. Those are provider-specific recommendations, not a universal threshold or a guarantee of improvement; the amount needed depends on the use case.

Availability also depends on the provider and can change. As documented by OpenAI on October 8, 2026, it was winding down its fine-tuning platform: new users could no longer access it, existing platform users could create training jobs for the coming months, and fine-tuned models remained available for inference until their base models were deprecated. This status applies to that platform at that date, not to fine-tuning in general. Check current provider support and account eligibility before building around a training feature. See OpenAI’s fine-tuning documentation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Add tools when the model must do something

A model that needs to search a document store, call a function, or carry out another external operation needs a tool integration. The application exposes the capability, the model can request its use, and the application handles the operation and returns the result. This expands what the system can do; it does not mean the model has learned the tool’s underlying data or absorbed new knowledge into its parameters.

Test the whole flow, not just the model’s decision to call a tool: verify that the right tool is selected, inputs are valid, the operation succeeds, and the returned result is used appropriately. Tool frameworks differ, and implementation details can change. Hugging Face’s cited Transformers custom-tools guide labels its Agents API experimental and subject to change, so treat it as a conceptual example rather than stable implementation instructions.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Run a fair comparison and iterate

  1. Keep the evaluation cases consistent. Use the same representative or held-out cases for the baseline and each revised version.
  2. Inspect failures by type. Determine whether the issue is instruction-following, missing information, a recurring behavior, or an unavailable action.
  3. Change the relevant lever. Revise instructions, add retrieval, fine-tune, or integrate a tool. Where practical, change one major factor at a time so the cause of any improvement or regression is clearer.
  4. Check the whole system. For retrieval, review both retrieval quality and answer quality. For fine-tuning, compare the tuned checkpoint with the baseline. For tools, test the complete call-and-response path.
  5. Retest after changes. Keep checking the same cases as the model, prompt, data, or application evolves. A result from one model version does not establish behavior for another.

Where to learn the techniques

For a structured introduction, O’Reilly lists Hands-On Large Language Models by Jay Alammar and Maarten Grootendorst as a 428-page beginner-to-intermediate book published in September 2024. Its coverage includes prompt engineering, semantic search, RAG, and training and fine-tuning language models. See the O’Reilly book listing.

Readers already comfortable with the basics may find Hands-On RAG for Production by Ofer Mendelevitch and Forrest Sheng Bao more targeted. O’Reilly dates it to May 2026 and describes it as intermediate-to-advanced, focused on RAG and its relationship to fine-tuning. See the O’Reilly listing.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.