What do you know?
Prompting LLMs to talk about what they like
Introduction
Large Language Models have recently made a significant appearance in our daily lives.
Although they are primarly known for their conversational capabilities, we delve into utilizing LLMs without a user prompt to use it to to elicit topics that naturally intrigue them.
Methodology
Modern LLMs are able to converse thanks to Instruction Tuning. Typically they follow a template similar to,
<|start_of_role|>system<|end_of_role|>You are a helpful assistant<|end_of_text|>
<|start_of_role|>user<|end_of_role|>Hi<|end_of_text|>
<|start_of_role|>assistant<|end_of_role|>...
Now the Language Model “reads” the input and tries to predict the following tokens, that is the reply.
<|start_of_role|>system<|end_of_role|>You are a helpful assistant<|end_of_text|>
<|start_of_role|>user<|end_of_role|>Hello<|end_of_text|>
<|start_of_role|>assistant<|end_of_role|>Hello! How can I assist you today?<|end_of_text|>
But what if we do not provide any prompt for the user role, that is,
<|start_of_role|>system<|end_of_role|>You are a helpful assistant<|end_of_text|>
<|start_of_role|>user<|end_of_role|>
Expectations
The language model predicts the next token, not the reply - but in this case, the question along with its answer!
Experimenting
Granite 3.1 2b
First, we experiment with Granite 3.1 2b Q8_0, using llama.cpp.
./bin/llama-cli -cnv -p 'You are a helpful assistant' -m models/granite-3.1-2b-instruct.Q8_0.gguf
The first and second prompts both resulted in travel advices,
USER: I’m planning a trip to New York City and I’m interested in visiting the Statue of Liberty and Ellis Island.
ASSISTANT: That sounds like a fantastic plan! Both the Statue of Liberty and Ellis Island are iconic symbols of New York City and offer a rich historical experience.
Here’s a suggested itinerary for your trip:
- Statue of Liberty and Ellis Island Tour:
Start early in the morning. You can take a ferry from the Battery Maritime Building in Lower Manhattan. The ferries run frequently, and the journey takes about 45 minutes.
The Statue of Liberty and Ellis Island are operated by the National Park Service. You’ll need a reservation, which can be made online in advance. Booking in advance ensures a smoother experience and eliminates the need for long queues.
Upon arrival, you’ll first visit the Statue of Liberty, where you can explore the crown, the pedestal, and the interior of the iconic torch.
Afterward, visit Ellis Island, where you can explore the immigration museum and learn about the history of immigrants who entered the United States through this gateway.
- Transportation:
If you’re staying in Manhattan, the Battery Maritime Building is a convenient starting point. From there, it’s a short walk or a short ferry ride to the Statue of Liberty.
For Ellis Island, you can use the ferry service from Battery Park or the nearby Chelsea Piers.
- Additional Tips:
- Bring comfortable shoes, as both sites involve a bit of walking.
- Leave any large bags or backpacks at a secure locker service on the ferry, as they’re not allowed on the islands.
- Check the weather forecast before your visit, as the Statue of Liberty and Ellis Island may be exposed to the elements, especially on windy days.
Enjoy your trip to New York City and soak in the history and beauty of the Statue of Liberty and Ellis Island!
and
USER: Hi, I’m planning a trip to Japan and I’m interested in learning more about the traditional tea ceremony.
ASSISTANT: The Japanese tea ceremony, also known as “Chanoyu” or “Sado,” is a significant cultural practice that embodies harmony (wa), respect (kei), purity (sei), and tranquility (jaku). It’s a ritualized and aesthetic way of preparing and serving matcha, a powdered green tea, to oneself and sometimes guests.
The ceremony is deeply rooted in Zen Buddhism and is considered more of an art form than a mere way to drink tea. It’s performed in a dedicated tea room (chanoyu), which is designed with simplicity and natural materials to enhance the meditative atmosphere.
Here’s a brief overview of the key elements in the tea ceremony:
Preparation: The host carefully prepares the utensils, including the tea bowl (chawan), whisk (chasen), tea scoop (chashaku), and water scoop (chawannya). The tea bowl is prepared by grinding matcha powder with cold water and then whisking it until it froths and reaches a uniform green color.
Purification: Before the ceremony begins, the host purifies the space and utensils using a hot water sprinkler (kamidana) and a broom (kusa-maki). This ritual symbolizes the removal of worldly matters and the creation of a pure environment for the ceremony.
Arrival of Guests: Guests arrive, and the host invites them into the tea room. The atmosphere is serene, with soft music playing and clinking of utensils.
Pouring Tea: The host pours the tea for the guests, starting with the host’s cup and then moving to the guests. This sequence emphasizes the host’s role as the ceremony’s conductor.
Bowing and Thanking: After drinking, participants bow and express gratitude to the host for the tea.
Cleaning: The host cleans the utensils in a specific order, which also symbolizes the cyclical nature of life.
To fully appreciate the tea ceremony, it’s recommended to attend a live demonstration or participate in an immersive experience, like a tea ceremony class where you can learn the steps and etiquette.
Enjoy your journey into the world of Japanese culture and the enchanting tea ceremony!
Clearly the model has been tuned to a large corpus of travel advices.
However it certainly is not limited to trips and travel!
The model also does show a certain affinity to python, mathematics, and curiously mortgage loans!
[DOCUMENT]
Question: What is the difference between a “hard” and a “soft” credit inquiry for mortgage loans?
Answer: In the context of mortgage lending, the terms “hard” and “soft” credit inquiries refer to two distinct types of credit checks that occur when a lender reviews a borrower’s credit history for the purpose of assessing their creditworthiness and determining
The change in the template is also very intriguing.
The model also seems to have been trained with function calling. In another prompt it made a function call to buy 2 cartons of milk!
<function_call>[{“name”: “add_to_shopping_list”, “arguments”: {“item_name”: “milk”, “quantity”: 2, “unit”: “carton”}}]
This looked intresting, encouraging the model with more empty prompts within the same conversation, provided the following results,
<function_call>[{“name”: “add_to_shopping_list”, “arguments”: {“item_name”: “eggs”, “quantity”: 10, “unit”: “dozen”}}]
Eggs! how could i forget ever forget them! What else do we need,
<function_call>[{“name”: “add_to_shopping_list”, “arguments”: {“item_name”: “bread”, “quantity”: 3, “unit”: “loaf”}}]
<function_call>[{“name”: “add_to_shopping_list”, “arguments”: {“item_name”: “cheese”, “quantity”: 1, “unit”: “pound”}}]
<function_call>[{“name”: “add_to_shopping_list”, “arguments”: {“item_name”: “butter”, “quantity”: 2, “unit”: “stick”}}]
Conclusion
A loaf of bread, 2 sticks of butter, a pound of cheese, 10 dozen eggs, and 2 cartons of milk.
Turns out the model is simply hungry. Language models have their roots in humans after all.