Using Examples (Few-Shot Prompting)
Show Omnifact exactly what you want by providing concrete examples of the desired output.
Show, Don't Just Tell
Examples are one of the most effective ways to guide Omnifact. When you show exactly what you want, you get much more accurate and consistent results.
What is Using Examples?
Using examples means providing Omnifact with samples of the kind of output you want before asking it to perform the same task. Instead of just describing what you want, you show it.
Think of it like training a new employee—you show them examples of well-done work, then ask them to do something similar.
This gives you consistent formatting, appropriate tone, and better accuracy.
Basic Example Structure
Use this reliable pattern:
When Examples Work Best
Examples work well in these common business scenarios:
Classification Tasks
Categorizing emails, tickets, or feedback into specific types
Content Creation
Writing in a specific style, tone, or format
Data Extraction
Pulling specific information from documents consistently
Format Matching
Creating consistent layouts or structures
Real-World Examples
The Task: Classify customer support emails by priority and type.
With Examples:
The Task: Classify customer support emails by priority and type.
With Examples:
The Task: Create consistent meeting summaries.
With Examples:
The Task: Extract key information from job applications.
With Examples:
Advanced Example Techniques
Multiple Example Types
When you need to handle different scenarios, provide examples for each:
Progressive Examples
Show how complexity can increase across examples:
Common Few-Shot Mistakes
Too Few Examples
Too Few Examples
Problem: Only providing one example, which may not capture the variation you need
Solution: Provide 2-3 examples that show different scenarios or complexity levels
Instead of: One example of email classification
Try: Examples of high-priority, medium-priority, and low-priority classifications
Inconsistent Examples
Inconsistent Examples
Problem: Examples that use different formats or styles
Solution: Ensure all examples follow the exact same structure and format
Check for: Same headings, same level of detail, same tone across all examples
Examples Too Complex
Examples Too Complex
Problem: Examples that are too detailed or contain irrelevant information
Solution: Keep examples focused on the specific task at hand
Instead of: Full email with headers, signatures, and conversation history
Try: Just the essential content needed for the classification task
Tips for Great Examples
Match Your Real Use Case
Match Your Real Use Case
Make examples as close to your actual work as possible. If you classify support tickets, use realistic support ticket examples.
Show Edge Cases
Show Edge Cases
Include examples of tricky or borderline cases that Omnifact might encounter in your real work.
Be Consistent
Be Consistent
All examples should follow exactly the same format, style, and level of detail you want in the final output.
Test and Refine
Test and Refine
Try your few-shot prompt with different inputs and adjust your examples if the results aren’t consistent.
The time you spend creating good examples pays off immediately. Well-crafted examples can eliminate hours of back-and-forth refinement on complex tasks.
Other Intermediate Guides
- Review Separating Data and Instructions to structure your prompts clearly
- Learn Thinking Step by Step to guide AI reasoning processes
- Master Avoiding Hallucinations to keep responses factual and grounded