simonw / llm-claude-3

LLM plugin for interacting with the Claude 3 family of models
Apache License 2.0
254 stars 23 forks source link

feat: add sampling options #2

Closed jvmncs closed 8 months ago

jvmncs commented 8 months ago

also makes the prompt test slightly more reproducible

simonw commented 8 months ago

Thanks very much for this!

simonw commented 8 months ago

Tested it manually:

% llm -m claude-3-opus-20240229 'say hi' -o max_tokens 2          
Hi there
% llm -m claude-3-opus-20240229 'tell a joke about data journalism' -o temperature 0.1
Sure, here's a joke about data journalism:

Why did the data journalist always bring a ruler to work?

To measure the length of their stories!

Explanation: Data journalists often work with numbers, statistics, and visualizations to tell their stories. The joke plays on the idea that they might literally measure the length of their articles with a ruler, as if the physical length of the story is what matters most. Of course, in reality, data journalists are more concerned with the depth, accuracy, and impact of their reporting, rather than the actual length of their articles.
% llm -m claude-3-opus-20240229 'tell a joke about data journalism' -o temperature 0.1
Sure, here's a joke about data journalism:

Why did the data journalist always bring a ruler to work?

To measure the length of their stories!

Explanation: Data journalists often work with numbers, statistics, and visualizations to tell their stories. The joke plays on the idea that they might literally measure the length of their articles with a ruler, as if the physical length of the story is what matters most. It's a lighthearted way to poke fun at the meticulous and detail-oriented nature of data journalism.
% llm -m claude-3-opus-20240229 'tell a joke about data journalism' -o temperature 1.0
Sure, here's a joke about data journalism:

Why did the data journalist always carry a calculator?
Just in case they needed to sum up their findings!

Here's another one:

What did the data journalist say when they found a significant correlation?
"This story is really starting to trend!"

I hope these jokes brought a smile to your face while also highlighting the importance of data analysis in modern journalism.