Okay, you've got your local LLM running using a tool like Ollama or LM Studio. Now, how do you actually talk to it? The fundamental way to interact with any Large Language Model is through a prompt.
As we mentioned in the chapter introduction, a prompt is simply the input text you provide to the model. It's your instruction, your question, your starting point. The LLM reads your prompt and then generates text based on it.
The most straightforward way to begin is by asking simple questions, just like you might ask a search engine or a knowledgeable assistant. Think of the chat interface in LM Studio or the command line interface in Ollama as a direct line to the model. You type your question, press Enter, and the model generates a response.
Let's try a basic factual question. If you're using Ollama in your terminal, after running a command like ollama run llama3
, you'll get a prompt like >>>
. You can type your question directly:
>>> What is the capital of France?
The LLM will process this input and generate a response, which might look something like this:
The capital of France is Paris.
If you're using a graphical tool like LM Studio, you'd type the same question into the chat input box and hit send. The principle is identical: your question is the prompt, and the model generates an answer.
Let's try another one, perhaps something less factual:
>>> Suggest a name for a pet dog.
The model might respond with:
Okay, here are a few popular and friendly dog names:
* Buddy
* Lucy
* Max
* Daisy
* Charlie
Notice that the model didn't just give one name; it understood the intent behind the prompt ("suggest" implies wanting options) and provided a list.
You might wonder how the LLM "knows" the capital of France or comes up with dog names. Remember from Chapter 1, LLMs are trained on vast amounts of text data. When you provide a prompt like "What is the capital of France?", the model essentially predicts the most likely sequence of words to follow that question, based on the patterns it learned during training. For common factual questions, the most statistically likely completion is the correct answer. For more open-ended questions like suggesting names, it predicts words that form common and relevant suggestions.
It's not "thinking" in the human sense, but rather performing incredibly sophisticated pattern matching and sequence prediction. Your prompt sets the context, and the model generates the most probable continuation.
The best way to get a feel for how your local LLM responds is to ask it various simple questions. Try asking about:
Pay attention to how the model responds. Is the answer accurate? Is it detailed? Does it seem confident? This initial experimentation helps you understand the capabilities and personality of the specific model you've chosen to run.
Asking simple questions is the starting point for interacting with your local LLM. In the next sections, we'll look at giving more complex instructions and understanding how the model handles longer conversations.
© 2025 ApX Machine Learning