Improving Onboarding Demo with Varied Brand Generation in Breniapp
Introduction
In the Breniapp project, ensuring a diverse and realistic onboarding experience is crucial. This post details how we enhanced the onboarding demo profile by generating varied brands, moving away from a single default brand.
The Problem: Monotonous Demo Profiles
Previously, the onboarding demo profile consistently generated the same brand (Duolingo). This lacked realism and didn't showcase the platform's capabilities effectively. The goal was to introduce more variety, reflecting the diverse range of brands users might encounter.
The Solution: Injecting Randomness
To address this, the updated approach introduces randomness into the brand generation process. Specifically, the following changes were implemented:
- Removed Shared Cache: A shared cache was eliminated to prevent the system from relying on previously generated, identical brand profiles.
- Introduced Real Randomness: Randomness is now injected directly into the LLM (Language Model) prompt. This includes a random industry and a seed value.
By incorporating these elements, each autocomplete operation produces a different brand, thereby creating a more engaging and representative demo experience.
Technical Implementation
The core of the solution lies in modifying how the LLM prompt is constructed. Here's an illustrative example of how randomness can be introduced within a PHP context:
<?php
$industries = ['Technology', 'Finance', 'Healthcare', 'Education'];
$randomIndex = array_rand($industries);
$randomIndustry = $industries[$randomIndex];
$seed = rand(1, 1000); // Generate a random seed
$prompt = "Generate a brand name in the {$randomIndustry} industry with seed {$seed}.";
// Call to LLM service (example)
$brandName = generateBrandName($prompt);
echo "Generated brand: " . $brandName;
function generateBrandName(string $prompt): string {
// In real implementation, this function will call to LLM service.
return 'Example Brand Name';
}
?>
This PHP code snippet demonstrates how a random industry is selected from a predefined array, and a random seed is generated. These values are then incorporated into the LLM prompt. This ensures that each call to the LLM produces a different and unique brand name.
Outcome
The result of these changes is a more dynamic and realistic onboarding demo experience. New users are now presented with a variety of brands, better showcasing the platform's capabilities and providing a more engaging introduction.
Conclusion
By removing shared caches and injecting real randomness into the LLM prompt, the Breniapp onboarding demo now generates varied brands, creating a more realistic and engaging user experience. This approach demonstrates the importance of randomness in creating dynamic and representative demo environments.