Quick Start
Create a function package, run and validate it locally, deploy it to Data 360, use it as the chunking strategy in a search index, and then verify chunked results in Data Explorer or with a retriever in Prompt Builder.
This quick start uses the default function in payload/entrypoint.py and validates it with payload/tests/test.json, which is a local input payload containing DocElements with text and metadata. The local run returns chunk output fields such as chunk_type, text, seq_no, and optional citations.
Estimated time: ~25 minutes.
| Edition Table |
|---|
| Available in: Developer, Enterprise, Performance, and Unlimited Editions. See Data 360 edition availability. |
| Permission Sets Needed | |
|---|---|
| To run the sample chunking function in Data 360: | Permission set:
|
Make sure that you have access to a Data 360 org with appropriate permission sets. If you do not have a sandbox, create one. See Create a Data 360 Sandbox.
Enable Code Extension in Data Cloud Setup by using Feature Manager. See Enable Data 360 Features in Feature Manager.
Install the Salesforce CLI and the code extension plugin, install the Data Cloud Custom Code Python SDK, authenticate to your org, and initialize a function package. See Set Up Salesforce CLI for Custom Functions.
-
Go to your function package directory.
-
Run the function package locally with sample test input.
-
Refresh package metadata from the package root.
Create a search index with Advanced Setup and select your custom chunking function for the fields you want to chunk. See Use a Custom Chunking Function in a Search Index.
After the search index runs and reaches a Ready status, verify the chunked data in Data Explorer or by using a retriever in Prompt Builder. See Verify Custom Chunking Results.