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
- Prompt Studio: Generative AI Management in NetSuite 2026.1
Prompt Studio in NetSuite 2026.1 enhances generative AI management, enabling customization of prompts and Text Enhance actions.
- SuiteCloud Agent Skills for AI Development in NetSuite 2026.1
SuiteCloud Agent Skills enhance development workflows with AI-driven guidance in NetSuite 2026.1, improving automation and process standardization.
- N/llm Module: Usage Limits and Additional Requests in NetSuite
In NetSuite 2026.1, the N/llm module sets usage limits and options for additional requests via Oracle Cloud.
- Required Features and Permissions for NetSuite AI Connector
Ensure Server SuiteScript and OAuth 2.0 are enabled for secure usage of the NetSuite AI Connector Service.
Advertising
Reach AI Professionals
Put your product in front of NetSuite experts who work with AI every day.
Sponsor This Category