Data & prompts in AI: quality determines success
-
Daniel -
March 28, 2025 at 10:44โฏAM -
87 Views -
0 Comments
๐ Quality of data determines success (GIGO principle)
๐น Why is this important
GIGO ("Garbage In, Garbage Out") means: Poor or inaccurate data leads to poor results. An AI agent is only as good as the data it works with. Even advanced algorithms provide incorrect or useless answers if the input data is inaccurate, incomplete or irrelevant.
The best AI does not help if it works with the wrong data. Results are even better if the data is not only available, but also directly linked to actions - for example through API integrations or database access.
๐ Concrete implementation for your AI agent business
โ Check and validate the data quality regularly:
- Update and check the data sources used.
- Make sure that your agents are not using outdated or unreliable information.
โ Use reliable and validated data sources:
- Obtain data from official APIs (e.g. Google API, LinkedIn API) instead of relying on unstructured websites.
- Avoid insecure or low-quality databases.
โ Link data sources with targeted actions:
- Agents should not only collect information, but also use it in a targeted manner (e.g. automatic lead generation). automatic lead qualification and follow-ups).
- Integration with CRM systems, marketing automation or financial tools improves efficiency.
โ๏ธ Wrong vs. โ Right
๐ Practical example: High-quality lead generation
Scenario:
A company wants to gain new business contacts via AI-supported lead generation.
๐น Wrong approach:
๐ Agent randomly searches websites for company names and email addresses.
โก Problems: Many incorrect or incomplete entries, duplicate data records and missing contact information.
๐น Correct approach:
โ
Agent uses LinkedIn Sales Navigator API for targeted lead generation:
1๏ธโฃ Collects high-quality company data (e.g. industry, size, decision-makers).
2๏ธโฃ Automates contacting via LinkedIn or email with personalised messages.
3๏ธโฃ Sends qualified leads directly to the CRM and flags follow-ups.
โก Result: More efficient customer contact, better data quality and less time wasted.
๐ก Conclusion
๐ธ Use trusted data sources to avoid incorrect agent decisions.
๐ธ Combine data with meaningful actions to create real added value.
๐ธ Quality beats quantity - a small amount of high-quality data is better than masses of unstructured information.
๐จ Prompt engineering is an art
๐น Why is this important?
The quality of the prompts directly determines the performance of an AI agent. A precise, well-formulated prompt can make the difference between a useless and a high-quality response. Good prompts are clear, structured and easy to understand. Through targeted prompt engineering, you can control how your agent thinks, structures and reacts.
๐ 3 decisive factors for effective prompt engineering
โ 1. Use clear examples ("few-shot prompting") for better results
- AI models learn faster through examples than through long explanations.
- Provide one or two concrete examples that show the desired format and writing style.
๐น Example:
Create a blog post about AI in marketing.
Example for the introduction:
"AI has revolutionised marketing by enabling companies to create personalised campaigns quickly.
Example: [Your sample text here]"
โ 2. the order of the instructions influences the result
- The most important information should be at the end, as models give more weight to the information read last.
- Structure your prompt so that the most important statement always comes last.
๐น Example:
โ Wrong (most important info too early):
Create a blog article.
The topic is content marketing.
Use a casual tone.
The target group is SMEs.
The article must not exceed 500 words.
โก Problem: The AI may prioritise the topic less than the writing style.
โ Right (most important info at the end):
Create a blog article on the topic of marketing.
Explain the basics of content marketing in an easy-to-understand way.
Write a maximum of 300 words.
Use a relaxed, personal style.
โก Advantage: The AI focuses first on the most important requirements (topic & structure) and then on the style.
โ 3. Test and iterate constantly - good prompts come from optimisation
- Test different prompt versions and analyse the results.
- Adjust the instructions gradually to improve the output.
- Optimise prompts based on customer feedback and test results.
โ๏ธ Wrong vs. โ True
๐ Practical example: Iterative prompt engineering
Scenario:
You want to optimise an AI agent for a blog about AI marketing.
๐น First version (general, unclear):
Write a short paragraph about AI in marketing.
โก Result: Vague, generic answer.
๐น Second version (after first optimisation):
Write a short introduction to AI in marketing for SMEs.
The text may have a maximum of 4 sentences and should emphasise concrete benefits (e.g. time savings, cost reduction).
โก Result: A little more specific, but still not perfect.
๐น Third version (optimised according to customer feedback):
Write a paragraph (maximum 4 sentences) about the benefits of AI marketing tools for small and medium-sized enterprises in e-commerce.
Emphasise in particular cost reductions, time savings and higher customer satisfaction.
Use a motivating, personal tone.
โก Result: Now the output is clear, targeted and practical.
๐ก Conclusion
๐ธ Use clear examples to steer the AI in the right direction.
๐ธ Place the most important instructions at the end to steer the model in a targeted manner.
๐ธ Test, optimise and iterate - the best prompts are created through fine-tuning.
โ Reliability is solved - through validation
๐น Why is this important?
The biggest weakness of AI agents is not the AI itself, but incorrect inputs and outputs. An AI can only be as good as the data it processes. Instead of perfecting the AI itself, all inputs and actions should be validated to avoid incorrect or harmful decisions.
๐ Concrete implementation for your AI agent business
โ Prevent incorrect actions through strict validation:
- Make sure that no incorrect API calls, incorrect data inputs or unauthorised actions are executed.
- Validation stops processes when critical errors occur.
โ Use standardised validation tools:
- JSON Schema or Pydantic in Python for structured data validation.
- User-defined validation mechanisms to block unexpected values or incorrect formats.
โ
Include multi-level validation:
1๏ธโฃ Input validation: Checks all data before it is processed.
2๏ธโฃ Processing validation: Ensures that only permitted actions are executed.
3๏ธโฃ Result validation: Checks the final output before final processing.
โ๏ธ Incorrect vs. โ Correct
๐ Practical example: Validation in an AI-driven advertising campaign
Scenario:
An AI agent is to create automated marketing campaigns on Facebook.
๐น Incorrect approach (without validation):
๐ Agent places adverts without validation.
โก Problem: Incorrect budget limits, incorrect target groups or incomplete content can lead to high costs or ad blocking.
๐น Correct approach (with validation):
โ
The agent checks all parameters before starting:
1๏ธโฃ Budget check: Ensure that the advertising budget is within the permitted values.
2๏ธโฃ Target group check: Only predefined, permitted target groups can be selected.
3๏ธโฃ Content check: Ad content must have a minimum length and must not contain any forbidden words.
4๏ธโฃ Manual confirmation: If a parameter is missing or questionable, a check by an employee is requested.
๐ป Code example for a validation (Python with Pydantic)
from pydantic import BaseModel, Field, ValidationError
class CampaignSchema(BaseModel):
budget: float = Field(..., ge=10, le=5000) # minimum budget: 10โฌ, maximum budget: 5000โฌ
target_group: str = Field(..., regex="^(KMU|Enterprise)$") # Only KMU or Enterprise allowed
content: str = Field(..., min_length=50) # Minimum length of the advert text
try:
campaign = CampaignSchema(
budget=1500,
target_group="KMU",
content="A convincing advertising text for your business."
)
print("โ
Campaign validated and ready for publication!")
except ValidationError as e:
print(f"โ Error: {e}")
Display More
โก Result: Incorrect inputs lead to a direct error message before the campaign is started
๐ก Conclusion
๐ธ Reliability is not achieved through more perfect AI, but through strict validation of inputs and actions.
๐ธ Use established validation tools such as JSON Schema or Pydantic to recognise incorrect data at an early stage.
๐ธ Multi-stage checks (input, processing and result validation) prevent unwanted actions.
Participate now!
Donโt have an account yet? Register yourself now and be a part of our community!