diff --git a/r/R/m-backend-prompt.R b/r/R/m-backend-prompt.R index b238525..b0e09d3 100644 --- a/r/R/m-backend-prompt.R +++ b/r/R/m-backend-prompt.R @@ -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}", @@ -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}}" @@ -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}", @@ -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}", diff --git a/r/tests/testthat/_snaps/llm-extract.md b/r/tests/testthat/_snaps/llm-extract.md index 1ce3ad0..452e6f6 100644 --- a/r/tests/testthat/_snaps/llm-extract.md +++ b/r/tests/testthat/_snaps/llm-extract.md @@ -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} diff --git a/r/tests/testthat/_snaps/llm-summarize.md b/r/tests/testthat/_snaps/llm-summarize.md index b254919..a1b9aeb 100644 --- a/r/tests/testthat/_snaps/llm-summarize.md +++ b/r/tests/testthat/_snaps/llm-summarize.md @@ -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 diff --git a/r/tests/testthat/_snaps/llm-verify.md b/r/tests/testthat/_snaps/llm-verify.md index b308dce..33910e0 100644 --- a/r/tests/testthat/_snaps/llm-verify.md +++ b/r/tests/testthat/_snaps/llm-verify.md @@ -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