Key Aspects of the Research:
The paper shows how to use large language models (LLMs) to automatically extract structured information (for example, to fill in tables) from unstructured text: transcripts of what doctors and nurses dictate. The authors demonstrate that LLMs can successfully pull out clinical observations and medical orders, cutting the time spent on routine documentation significantly.
Key Result: giving the model a clear output structure (a schema) plus a few examples (few-shot) dramatically improves data extraction accuracy.
The Core of the Method, Explained:
The idea is to make the LLM work not as a conversation partner but as a precise data processor that fills in a predefined form. Instead of asking the model to “find something in the text,” you give it clear instructions on what the result should look like and show it how to do it with examples.
For the user, the technique comes down to four steps:
- Define the structure (Schema): Decide exactly what data you want to extract and come up with field names for it. For example, if you're analyzing reviews, the fields might be
product_name,sentiment(positive/negative) andkey_issue. - Set the output format: State clearly in the prompt that the answer must be in a strictly defined format, such as JSON. That's the most reliable way to get machine-readable output.
- Provide examples (Few-Shot Learning): This is the most important step. Show the model 1-2 examples where you take a snippet of text (similar to what you'll be analyzing) and pair it with the ideal JSON answer it should produce. The model “learns” from these examples right inside the prompt.
- State the task: After the instructions and examples, feed in your new text and ask the model to process it according to the template.
For very long texts, the paper suggests an extra step: first ask the model to split the text into logical blocks of meaning (segments), then apply the main method to each block separately.
Practical Applicability Analysis:
Direct applicability: Completely direct. You can take the prompt structure from the paper (especially from Appendix A.1), swap the medical schema and examples for your own and get a working solution right away. For instance, to extract contacts from emails, order details from correspondence or key requirements from a job posting.
Conceptual value: Huge. The paper clearly proves several key ideas:
- An LLM isn't a “black box” but a system you can and should steer.
- Structure in produces structure out. A clearly defined request format (a JSON schema) is the key to a clear answer.
- Examples beat long instructions. One good example (few-shot) often works better than a paragraph describing what needs to be done.
- Models can slip up on basics (for example, generating invalid JSON), and you need to be ready for that.
Adaptation potential: Very high. The adaptation is simple:
- Define your task (for example, “analyzing hotel reviews”).
- Create your own JSON schema:
{"feature": "room cleanliness", "sentiment": "negative", "quote": "there was dust in the corners"}. - Find 1-2 typical reviews and write reference JSON answers for them by hand.
- Assemble the prompt using the paper's template, plugging in your schema and examples. Done.
A Practical Example:
You are an experienced marketing analyst who specializes in analyzing customer reviews. Your task is to extract structured information from written reviews of home appliances.
You must return your answer STRICTLY as a JSON array. Each object in the array represents one mention of a specific product aspect in the review.
Each JSON object must contain the following fields:
- `feature`: the product aspect being discussed (for example, "noise level", "build quality", "design", "battery life").
- `sentiment`: the customer's assessment of that aspect. Allowed values: "positive", "negative", "neutral".
- `summary`: a short summary of the customer's opinion on that aspect in 1-5 words.
---
**EXAMPLE 1:**
**Review text:** "Bought the new BlendPro-3000 blender. It looks gorgeous, very stylish, great in the kitchen. But it's as loud as a jet taking off, you can't make a smoothie in the morning without waking everyone up. On the bright side, it's easy to clean."
**JSON:**
[ { "feature": "design", "sentiment": "positive", "summary": "Stylish, looks great" }, { "feature": "noise level", "sentiment": "negative", "summary": "Very loud" }, { "feature": "ease of cleaning", "sentiment": "positive", "summary": "Easy to clean" } ]
---
**EXAMPLE 2:**
**Review text:** "The Dyson V12 vacuum is a beast! More than enough power, picks up all the cat hair. The battery lasts for the whole apartment, runs about 40 minutes. The price stings, sure, but it's worth it."
**JSON:**
```json
[
{
"feature": "suction power",
"sentiment": "positive",
"summary": "Very powerful, picks up hair"
},
{
"feature": "battery life",
"sentiment": "positive",
"summary": "Lasts 40 minutes"
},
{
"feature": "price",
"sentiment": "negative",
"summary": "High price"
}
]
NOW ANALYZE THE FOLLOWING REVIEW:
Review text: "The DeLonghi espresso machine was a letdown. The coffee comes out barely warm, and the milk frother broke after a week. The only plus is the compact size; it fit in my small kitchen with no trouble."
JSON:
# 5.2 Why It Works:
This prompt is effective thanks to a combination of techniques described in the paper:
1. **Setting the role and context:** The phrase "You are an experienced marketing analyst" tunes the model in and activates knowledge related to analyzing customer opinion.
2. **A clear format spec (JSON Schema):** The instruction to "return your answer STRICTLY as a JSON array" and the detailed field descriptions (`feature`, `sentiment`, `summary`) leave the model no room for "creativity". It has to follow the given structure, which ensures a predictable, machine-readable result.
3. **Learning from examples (Few-Shot Learning):** The two examples are the key element. They show the model not only JSON syntax but the meaning of the task: how to extract the structured essence (`"feature": "noise level", "sentiment": "negative"`) from informal text ("as loud as a jet"). The model learns to generalize and apply this pattern to new text.
---
# 6.1 Another Practical Example
<div class="example-block markdown-block">
<button class="copy-btn">Copy</button>
<pre><code class="language-markdown">You are an executive assistant, and your job is to prepare short summaries of work meetings based on their transcripts.
You need to extract the key information and present it as a strict JSON object with the following fields:
- `main_topic`: the main topic of the meeting in 2-4 words.
- `key_decisions`: an array of strings, where each string is one decision that was made.
- `action_items`: an array of objects, where each object describes a specific task and contains the fields `task` (task description) and `responsible` (name of the owner).
- `deadline`: the overall date or deadline, if one was mentioned for the key tasks. Use the format "YYYY-MM-DD" or "N/A".
---
**EXAMPLE:**
**Transcript text:** "Team, today we're discussing the launch of the new 'Pro' plan. Marketing is ready, but engineering says they need more time for testing. Here's the plan: Mike, your team needs to finish testing by the end of next week. Emma, please put together the email announcement. Decided: we launch the plan on October 25. Thanks, everyone."
**JSON:**</code></pre>
</div>json
{
"main_topic": "Launch of the 'Pro' plan",
"key_decisions": [
"The launch date for the new 'Pro' plan is set for October 25"
],
"action_items": [
{
"task": "Finish testing the new plan",
"responsible": "Mike"
},
{
"task": "Prepare the email announcement",
"responsible": "Emma"
}
],
"deadline": "2024-10-25"
}
NOW ANALYZE THE FOLLOWING TRANSCRIPT:
Transcript text: "Okay, on the quarterly report. The sales numbers look good, but support is slipping. Tom, we need to hire two more people for the support team by December 1. Rachel, please analyze the main reasons people contacted us over the past month. We agreed that next quarter's focus is improving service quality."
JSON:
```
Why This Example Works.
This example runs on the same fundamental principles as the previous one, which shows how universal the paper's method is:
- Contextualization through role: The “executive assistant” role helps the model grasp the practical goal of the task: extract the most important business information and cut the fluff.
- A complex nested structure: This example uses a more complex JSON schema with nested objects and arrays (
action_items). The example shows the model how to build this complex structure correctly, something that would be very hard to explain in words alone. - Recognizing entities and relationships: The example teaches the model not just to find keywords but to recognize entities (“Tom,” “Rachel”) and their connection to actions (“hire specialists,” “analyze the reasons”). That's a key aspect of information extraction, and a few-shot example conveys it effectively.
Usefulness Score: 85
Main Evaluation Criteria
- A. Relevance to prompting techniques: Yes, the paper directly demonstrates how effective prompts with a clear structure and examples (few-shot) are. The appendix includes prompt templates.
- B. Better conversational answers: Yes, the paper shows a significant improvement (higher F1-score) in structured data extraction accuracy with few-shot prompting compared with zero-shot.
- C. Direct practical applicability: Yes, users can immediately apply the methodology (define an output schema + provide examples) to their own data extraction tasks, with no code at all.
- D. Conceptual value: Very high. The paper clearly illustrates that an LLM isn't just a “conversation partner” but a powerful tool for structuring unformatted data. It explains why providing a clear “target structure” (a schema) and examples dramatically improves results.
- E. New useful practice (clustering): The work falls into several key clusters at once:
- 1. Prompt-writing techniques: Few-shot prompting is used heavily and its effectiveness is measured.
- 3. Prompt structure optimization: The whole work is about building structured prompts to get structured output (JSON).
- 5. Extraction and structuring: This is the core of the paper.
- 6. Context and memory: The “lost-in-the-middle” problem is mentioned, with text segmentation proposed as the fix.
- Practicality checklist: Provides ready-made constructions (+15 points).
Numerical Usefulness Score
The score of 85 reflects the fact that the paper is a near-perfect guide to one of the most useful prompt engineering techniques: structured data extraction.
Arguments FOR:
1. A universal methodology: Although the domain is highly specialized (medicine), the approach described (role + task + output schema + examples) is completely universal and applies to any data extraction task, from analyzing customer reviews to parsing resumes.
2. Concrete evidence: The paper doesn't just claim; it shows clearly (in metric tables) how much adding just 1-2 examples to the prompt (few-shot) outperforms the no-example approach (zero-shot). That's a powerful argument for always trying to include examples.
3. Practical tips: The paper mentions real problems users run into, such as JSON parsing errors and handling long texts (segmentation is proposed), which keeps its findings grounded and useful.
Counterarguments (why not 95+): 1. Adaptation required: Users have to mentally “translate” the examples from the medical field into their own. That takes a little effort, unlike papers whose examples are already framed as general business tasks. 2. Focus on comparing models: Part of the paper compares different LLMs (GPT-4o, Phi-3.5 and so on), which is less interesting to an ordinary user who usually works with whatever one model is available to them.
All in all, this is an extremely useful paper that teaches a fundamental and powerful prompting method. It gives you not just a “trick” but a whole methodology that will immediately raise the quality of your results on data extraction tasks.