View source: R/patientChat_naive.R
| patientChatNaive | R Documentation |
patientChatNaive() is a grapper for the ellmer package to send prompts and send the output test set to an LLM. Requires a valid API key.Priorities: - Accepts a prompt as an input. - Produces a test set in accordance to the provided JSON schema. - Utilizes tools such as CodelistGenerator or Hecate to look up for functions. - Accepts a subsequent prompt with a test set that the LLM has to use as a context
One function for this tasks allow us to: - Test the test sets created by the LLM. - Test prompt engineering. - Test integration of tools functionality. - Allow us to create fast a small set of patients to test analytical packages.
patientChatNaive(
prompt = "### Give me a sample of five patients",
model = "gpt-5.2",
jsonSchemaPath = NULL
)
prompt |
A prompt to the LLM, in character or JSON response. |
model |
The model used by the LLM. Currently only OpenAI models are accepted. |
jsonSchemaPath |
Path to a JSON schema used to structure the response. |
A JSON response that includes: the natural language answer from the LLM and a JSON with test set patients in accordance to the provided schema.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.