> For the complete documentation index, see [llms.txt](https://docs.riku.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.riku.ai/importing-fine-tunes/introduction-to-fine-tuning.md).

# Introduction to Fine-tuning

Fine-tuning is the process of taking a larger dataset and formulating it into a prompt so that you can get better outputs from the AI models. Think of fine-tuning like building out a prompt but on a much larger scale. With fine-tuning you are no longer limited to a maximum token amount so you can provide a much larger sample of examples than you can with just a prompt.&#x20;

As an example, imagine you are building out a blog introduction prompt and you are giving a few examples and end up reaching the token limit. You may be able to include perhaps 5 or 10 of these examples maximum. It will give the AI a good opportunity to learn the pattern and the stronger the underlying AI model is, the better the output will be. Often times, this is enough to get an output you are happy with but sometimes for more complicated scenarios, you may want to consider fine-tuning.&#x20;

If we use the same example and go into how fine-tuning would work, instead of providing just 5 or 10 examples, we could provide 100, 500, or 10,000 examples. Considerably more data and more training for the AI to get a deeper understanding of the content and the type of output that we are expecting as an output. By providing these larger datasets, you are going to get a better model that performs in a whole new level compared to just a vanilla AI model.&#x20;


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.riku.ai/importing-fine-tunes/introduction-to-fine-tuning.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
