Overview
LLM Magic includes several prebuilt tools for common operations like extraction, mathematical calculations, and data manipulation.Extract
TheExtract tool is used to output structured data according to a defined JSON schema. This is the primary way to extract structured information from unstructured text.
Constructor
The JSON schema that defines the structure of data to extract
Behavior
When invoked, the Extract tool ends the chat session and returns the extracted data. The tool validates the extracted data against the provided schema.MagicReturnTool
A flexible tool for returning values of specific types. Useful when you want the LLM to return a simple value.Constructor
The type of value to return:
string, number, integer, boolean, array, or objectAdditional schema constraints for the returned value
Supported Types
string- Returns a string valuenumber- Returns a float valueinteger- Returns an integer valueboolean- Returns a boolean valuearray- Returns an array (can specify item schema)object- Returns an object (provide full schema)
Add
A simple tool for adding two numbers.Parameters
The first number to add
The second number to add
Returns
The sum ofa and b.
Multiply
A simple tool for multiplying two numbers.Parameters
The first number to multiply
The second number to multiply
Returns
The product ofa and b.
Finish
Outputs a final text message and ends the conversation.Parameters
The final message to output
MergeData
Merges multiple data sources together according to a schema.Constructor
The JSON schema defining the structure of merged data
ModifyData
Modifies data according to instructions.Constructor
The JSON schema defining the structure of modified data
RemoveDuplicates
Removes duplicate entries from arrays in a dataset.Parameters
Array of dot-notated keys indicating which arrays to deduplicate. Uses 0-based indices.Example:
["products.0", "categories.17"]Returns
Returns the keys to deduplicate. The actual deduplication is handled by your application code.OutputJsonSchema
Generates a JSON schema based on natural language instructions.Returns
The generated JSON schema. Must be a JSON object at the root level.Properties:
type(string) - Must be “object”properties(object) - The schema propertiesrequired(array) - Array of required property names
OutputStepLabels
Generates UI labels for a multi-step process.Returns
Returns an object with labels for:Heading for the introduction view
Description for the introduction view
Label for the next button
Heading for the bucket view
Description for the bucket view
Label for the back button
Label for the begin button
Label for the continue button
Heading for the extraction view
Description for the extraction view
Label for the back button
Label for the continue button
Label for the restart button
Heading for the results view
Description for the results view
Label for the back button
Label for the next button