Tooling Support for N/llm Module in SuiteScript
The N/llm module adds tooling support in SuiteScript, enabling custom tools for enhanced LLM interactions.
TL;DR Opening
The N/llm module in SuiteScript introduces tooling support that allows developers to create custom tools for enhanced interactions with large language models (LLMs). These tools can facilitate complex business logic and improve the accuracy of the model's responses by integrating dynamic outputs.
What is the N/llm Module?
The N/llm module in SuiteScript 2.1 enables developers to extend the capabilities of LLM interactions within NetSuite. By defining custom tools, businesses can enhance LLM functionalities to accommodate specific use cases and requirements.
What New Tools Have Been Introduced?
The N/llm module now supports various new topics and sections:
- Tooling in the N/llm Module: General overview of the module's tooling capabilities.
- Creating Tool Definitions: The ability to create custom tools using the
llm.createTool(options)method, allowing LLMs to invoke them during interactions. - Tool Parameters: Defining parameters for these tools using
llm.createToolParameter(options). - Tool Results: Managing result outputs through
llm.createToolResult(options). - Tool Calls: Handling execution requests with
llm.ToolCall.
How Do Custom Tools Work?
Creating Tool Definitions
To create custom tools, follow these steps:
- Define your tool using the
llm.createTool(options)method. - Provide a unique identifier and description to help the LLM understand tool usage.
- Create associated tool handlers that implement the specific logic needed for the tool's operation.
- Besides core functionalities, tools can execute SuiteQL queries or perform business logic, enriching the overall interaction.
Integrating Tools into LLM Responses
Once custom tools are defined, they can be integrated into LLM responses. When using the llm.generateText(options) method, you can specify these tools in the options.tools parameter. The LLM determines when to employ a tool based on the prompts it receives and the context of previous interactions:
- The LLM analyzes the conversation history and prompt information.
- If it identifies a need for additional processing, it requests a tool call.
- Tool results are processed and can potentially lead to further tool calls as needed during the interaction.
Streaming Support
The llm.generateTextStreamed(options) method also supports tool integration, allowing for real-time processing and tool call handling.
Who This Affects
- Developers: Those building custom SuiteScripts to enhance NetSuite functionality.
- Administrators: Individuals managing LLM configurations and tooling definitions within NetSuite.
Key Takeaways
- The N/llm module now supports custom tooling for advanced LLM interactions.
- Developers can create and define tools to augment LLM responses.
- Integration facilitates dynamic tool calls during LLM operations, enhancing accuracy.
Frequently Asked Questions (4)
Does the N/llm module require a specific version of SuiteScript to work?
How do I define parameters for custom tools in the N/llm module?
Can I integrate custom tools with real-time LLM responses?
What role do administrators have concerning the N/llm module?
Was this article helpful?
More in AI
- Natural Language Queries in NetSuite AI
Updated for NetSuite 2026.1, featuring enhancements in natural language queries. The MCP Standard Tools SuiteApp offers enhanced AI-driven interaction with
- Support for Consolidated Reports and SuiteQL Tool
Updated to reflect the latest features added in NetSuite 2026.1. Starting with the latest updates in NetSuite 2026.1, NetSuite enhances reporting capabilities
- Intelligent Close Manager Portlet in NetSuite
The Intelligent Close Manager portlet offers a centralized view for managing tasks and exceptions in NetSuite, enhancing close processes.
- New SuiteCloud Agent Skills for NetSuite 2026.1
NetSuite 2026.1 introduces new SuiteCloud Agent Skills, enhancing security and development workflows.
Advertising
Reach AI Professionals
Put your product in front of NetSuite experts who work with AI every day.
Sponsor This Category