HomeGuidesAnnouncementsCommunity
Guides

Template Renderer

The Template Renderer component enables you to create and render Jinja templates with custom context data for use in your skills.

Basic Setup

  1. Add Template Renderer component to your skill
  2. Navigate to Inputs/Outputs section
  3. Define your Input Template Context (e.g., DataFrame from SQL Runner)

Working with Templates

Template Creation

  • Use quotation marks for plain text
  • Reference context variables using Jinja syntax
  • Combine static text and dynamic content

Example:

"Describe these brands in detai" {{sql_runner.df}}

Testing and Validation

  1. Run the node to test template rendering
  2. Review outputs:
    • Check rendered template in Inputs/Outputs
    • Use Preview tab to see formatted output
    • Verify context variables are properly rendered

Common Use Cases

  1. Prompt Engineering

    • Create dynamic prompts for LLMs
    • Include data context in prompts
    • Generate customized text templates
  2. Data Presentation

    • Format data for display
    • Create custom narratives
    • Generate structured text output

Integration Options

  • Connect to Prompt Runner for LLM processing
  • Use in Narrative Layout
  • Include in Skill Response
  • Combine with other components for complex workflows

Best Practices

  • Test templates with sample data
  • Verify variable syntax
  • Ensure context data is properly formatted
  • Use clear, consistent template structure
  • Validate output before integration with other components

The Template Renderer component is particularly valuable for creating dynamic prompts and formatting text output with contextual data in a flexible, reusable way.