Back to Prompt Library
implementation

Design Voiceflow Interface and Self-Correction

Inspect the original prompt language first, then copy or adapt it once you know how it fits your workflow.

Linked challenge: Multimodal Content Generator for Brand Safety

Format
Code-aware
Lines
16
Sections
3
Linked challenge
Multimodal Content Generator for Brand Safety

Prompt source

Original prompt text with formatting preserved for inspection.

16 lines
3 sections
No variables
1 code block
Design a basic conversational flow in Voiceflow that allows a user to specify a content topic and target audience. The Voiceflow agent should then call your Google ADK agent (via a webhook or API endpoint) to generate the multimodal concept. Implement logic within your ADK agent for self-correction: after generating a concept, it should cross-reference with policies fetched by Skyvern and refine the concept if violations are found.

```python
# Conceptual ADK self-correction loop
def generate_and_check_content(topic, audience, policies):
    initial_concept = generate_multimodal_concept(topic, audience)
    violations = check_concept_against_policies(initial_concept, policies)
    if violations:
        # Use Gemini again to refine the concept based on violations
        corrected_concept = model.generate_content(
            f"Refine this content concept to remove violations: {initial_concept}. Violations: {violations}",
            generation_config=GenerationConfig(response_mime_type="application/json")
        ).candidates[0].content.parts[0].text
        return corrected_concept, violations
    return initial_concept, []

# Voiceflow integration would involve setting up an API endpoint that triggers this ADK logic.
```

Adaptation plan

Keep the source stable, then change the prompt in a predictable order so the next run is easier to evaluate.

Keep stable

Hold the task contract and output shape stable so generated implementations remain comparable.

Tune next

Update libraries, interfaces, and environment assumptions to match the stack you actually run.

Verify after

Test failure handling, edge cases, and any code paths that depend on hidden context or secrets.