Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions r/R/m-backend-prompt.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ m_backend_prompt.mall_llama3.2 <- function(backend, additional = "") {
role = "user",
content = glue(paste(
"You are a helpful text extraction engine.",
"Extract the {col_labels} being referred to on the text.",
"Extract the {col_labels} being referred to in the text.",
"I expect {no_labels} item{plural} exactly.",
"No capitalization. No explanations.",
"{text_multi}",
Expand Down Expand Up @@ -81,7 +81,7 @@ m_backend_prompt.mall_session <- function(backend, additional = "") {
role = "user",
content = glue(paste(
"You are a helpful summarization engine.",
"Your answer will contain no no capitalization and no explanations.",
"Your answer will contain no capitalization and no explanations.",
"Return no more than {max_words} words.",
"{additional}",
"The answer is the summary of the following text:\n{{x}}"
Expand Down Expand Up @@ -122,7 +122,7 @@ m_backend_prompt.mall_session <- function(backend, additional = "") {
role = "user",
content = glue(paste(
"You are a helpful text extraction engine.",
"Extract the {col_labels} being referred to on the text.",
"Extract the {col_labels} being referred to in the text.",
"I expect {no_labels} item{plural} exactly.",
"No capitalization. No explanations.",
"{text_multi}",
Expand Down Expand Up @@ -152,7 +152,7 @@ m_backend_prompt.mall_session <- function(backend, additional = "") {
role = "user",
content = glue(paste(
"You are a helpful text analysis engine.",
"Determine this is true ",
"Determine if this is true ",
"'{what}'.",
"No capitalization. No explanations.",
"{additional}",
Expand Down
2 changes: 1 addition & 1 deletion r/tests/testthat/_snaps/llm-extract.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
[1] "user"

[[1]]$content
You are a helpful text extraction engine. Extract the product being referred to on the text. I expect 1 item exactly. No capitalization. No explanations. The answer is based on the following text:
You are a helpful text extraction engine. Extract the product being referred to in the text. I expect 1 item exactly. No capitalization. No explanations. The answer is based on the following text:
{x}


Expand Down
2 changes: 1 addition & 1 deletion r/tests/testthat/_snaps/llm-summarize.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
2 I regret buying this laptop. It is too slow and the keyboard is too noisy
3 Not sure how to feel about my new washing machine. Great color, but hard to figure
.summary
1 it's a great tv
1 great tv with good features
2 laptop purchase was a mistake
3 having mixed feelings about it

2 changes: 1 addition & 1 deletion r/tests/testthat/_snaps/llm-verify.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Code
llm_vec_verify("this is a test", "a test", preview = TRUE)
Output
ollamar::chat(messages = list(list(role = "user", content = "You are a helpful text analysis engine. Determine this is true 'a test'. No capitalization. No explanations. The answer is based on the following text:\nthis is a test")),
ollamar::chat(messages = list(list(role = "user", content = "You are a helpful text analysis engine. Determine if this is true 'a test'. No capitalization. No explanations. The answer is based on the following text:\nthis is a test")),
output = "text", model = "llama3.2", seed = 100)

# Verify on Ollama works
Expand Down