A bit of context, I recently got into tinkering with LLMs using the ollama python package. My latest project is an AI assistant (how original, I know) with tool calling capabilities. I'm using the qwen3:4b model, and while due to it's size it isn't the greatest at tool calling, it still gets the job done. One of the tools I wanted to integrate was a "file explorer" type of tool. The way I went about doing this was that the model would first call an "open_file()" function, which would list all the files, and then after that it would generate another tool call "open_document(filename)" to open one of those files. So in other words, the model makes two tool calls, one to list the files, followed by another to open one. One thing to note is that for the second tool call, the "open_document(filename)" function is the only available tool the model can choose from. Now when this does work it works flawlessly, however the persistent problem I have noticed is that a lot of times it will not generate any tool calls the second time, i.e. the tool call necessary to actually open the document after the files have been listed. The Question: As we know, an LLM generates it's response one token at a time. Is there a way to get the model to start generating from some sort of starting point? Or in other words, is there a way to get the model to complete what's already there instead of generate it's entire response from scratch? Example: Input: """ User: Open the about file. Assistant: *open_file() Tool: Available files, pleases select one: - file.txt - example.txt - about.txt - random.txt Assistant: *open_document(" """ LLM Output: """ about.txt") """ Continue reading...