Prompting Overview
Prompting AI models is a unique skill set, and asking clear questions is vital to help you make the most of our models.
Since Lazarus' LLMs are probabilistic, they generate text by predicting the likelihood of each word in a sequence. Due to this, even when you input the same prompt and the same document, you may not receive the exact same answer every time.
Here you can read prompting tips to utilize for Lazarus models.
Ask specific, easy to understand questions
Unlike yourself and your colleagues, the model doesn’t automatically operate with the specific context of your business in mind. So, the model performs best when you narrow down your questions as much as possible and include important context. This may be spelling out abbreviations, rewriting questions to include more information, or specifying more clearly what information you’re hoping to extract. Here are some examples of rewritten questions:
Desired Output | Broad Question | Narrow Question |
---|---|---|
Claimant’s SSN | What is SSN? | What is the claimant’s social security number? |
First line of company address | What is company address 1? | What is the first line of the company’s address? |
Phone number | What is the phone number? | What is the patient’s phone number? |
Regardless of what information you hope to extract, specifying what exactly it is and narrowing the question’s scope improves the accuracy and reliability of your output.
Pre-define the categories the response should be in
You may want an answer in a certain format to align with your data storage. Specifying the categories you want the model’s response to be in can help you receive an answer the way you’d like. Some potential categories are true/false, a range of numbers, or a fully spelled out word. Here are some examples of rewritten questions:
Unclear Output | Pre-Defined Output |
---|---|
What state is the patient located in? | As a two-letter abbreviation, what state is the patient located in? |
Is this patient taking any medication? | As a True/False answer, is the patient taking any medication? |
Load important context for the model at the beginning of a question
The model gives more importance to whatever information is included earlier in the prompt. So, when providing important context, be sure to include it at the prompt’s beginning before asking your question. Take a look at some examples of rewritten prompts that will perform better:
Unintentional Ordering | Intentional Ordering |
---|---|
What’s the total charge? Look after “Outside Lab” for the answer. | Located after “Outside Lab”, what’s the total charge? |
What is the claimant’s reference number? Return the answer as a nine-digit integer. | As a nine-digit integer, what is the claimant’s reference number? |
Pay close attention to the question’s grammar and punctuation
Our models’ responses are crafted specific to the prompts you enter. So, using different grammar and punctuation (singular vs plural, “.” vs “?”, etc.) will yield different results from the model. Be sure that you’re asking the question with the grammar and punctuation specific to what you hope to receive. To better understand how this can be implemented, take a look at the examples below:
Imprecise Grammar | Precise Grammar |
---|---|
What medication has been tried? | What medications have been tried? |
What is the client’s age. | What is the client’s age? |
Point the model to where in the document the relevant information is
In many documents, two different data points can have the same name, whether it be charges, phone numbers, or addresses. Sometimes, including additional information also does not suffice. If this is the case, pointing the model to where in the document the correct information can be found often makes the model retrieve the right answer. Take a look at the example below:
Undirected Prompting | Directed Prompting |
---|---|
What are the patient’s charges? | Located after “Outside Lab”, what are the patient’s charges? |
What is the client’s member ID number? | Located after “Member ID:” or “ID Number:”, what is the patient’s reference number? |
There are many different ways you can phrase this instruction; here are some examples:
- “Located after [x], …”
- “Only use the content following [x]. …”
And remember, front-loading important information like this helps the model perform better!
Provide synonyms for related terms
You may need to extract data that can be called several different things across documents. Including the various synonyms you have for a term within your prompt can help the model identify and return the right value. Take a look at some example prompts that implement this strategy:
Term-Based Prompting | Synonym-Based Prompting |
---|---|
What vaccines has the patient taken? | Listed under “vaccinations”, “immunizations”, or “inoculations”, what vaccines has the patient taken? |
What is the client’s member ID number? | Located after “Member ID:”, “Member Number:”, “ID Number:”, or “Member ID Number:”, what is the client’s Member ID? |
Assign the model a persona to play
Because our model is broadly applicable to a variety of use cases, adding specific context for the model to act within can improve responses, particularly with advanced tasks. You can use a preamble to your prompt in these cases, with your preamble giving the model a fictional role to play and an overview of its core functions. This can help the model operate within those parameters. Take a look at a sample preamble that can be adapted to your organization:
“You are an employee of Fictional Bank in the following role: data entry specialist. You will carefully identify and analyze information from financial documents and extract data about the businesses and persons they describe, known as our clients, which the Fictional Bank provides services for.”
Emphasize key information
You can use all-caps to help the model understand what information you are specifically looking for. For example, asking for "the PATIENT'S address" rather than "the patient's address" can provide more accurate results.
Use these tips together
Each of these tips can help you retrieve the best answers possible, but using two or more tips to refine your prompts will yield even better results. For instance, front-loading important context and including the format the response should be in can sometimes return the answer any one tip alone would not produce.