Prompt Basics
Filter Functions
Transform values in your prompts using filter functions
AgentMark provides a set of built-in filters that you can use to manipulate and transform data within your prompts. Filters are functions that take an input value and return a transformed output.
Basic Usage
Use filters by calling them on values in your prompts:
Built-in Filters
AgentMark includes several built-in filters:
Text Manipulation
capitalize(str)
: Capitalizes first character of stringlower(str)
: Converts string to lowercaseupper(str)
: Converts string to uppercasetruncate(str, length)
: Truncates string to specified lengthreplace(str, search, replace)
: Replaces text in string
Array Operations
join(array, separator)
: Joins array elements with separator
Number Formatting
abs(num)
: Returns absolute valueround(num, decimals)
: Rounds number to decimal places
Data Transformation
dump(obj)
: Converts object to JSON stringurlencode(str)
: URL encodes a string
Have Questions?
We’re here to help! Choose the best way to reach us:
Join our Discord community for quick answers and discussions
Email us at hello@agentmark.co for support
Schedule an Enterprise Demo to learn about our business solutions