AI in your applications

Use AI in the business logic of your applications by developing and running models. 

For example, you could develop a machine learning model that automatically predicts the price of a house based on attributes like square footage and location, or you could create a form action using a large language model (LLM) that generates a summary of the work completed at a job site.

Intelligence Quick Start enables you to create:

  • Automated machine learning model definitions
  • Anomaly detection model definitions
  • Prompt definitions

Ed's network of agents

Ed is an agent that can answer questions and perform functions in the platform on the behalf of users. He is powered by LLMs that allow users to interact with him in natural language using the chat interface. Ed relies on a network of agents, each with specific tools, to perform tasks in the platform. In order to equip Ed with additional capabilities related to your applications and processes, you must create your own agents and tools.

For example, you could develop a Financials agent equipped with tools such as creating new invoices or generating budgets. Then, when a user directs Ed to invoice one of their customers, he can access your Financials agent to complete the user's request.

Intelligence components

Intelligence components include:

  • Components of the agent framework
  • Models
  • Model Context Protocol (MCP)
  • Semantic search
  • Nextworld Intelligence development best practices

 

Semantic search

Semantic search is powered by Nextworld Intelligence, and enables agents to find records related to a user's search term that may not be found in a traditional search.

For example, a user may ask Ed to find all open invoices for "Bobby Jones." In order for an agent to find these invoices, it needs to determine which directory record matches the user's request. While there may be no exact matches for "Bobby Jones" in the directory, a semantic search can return records such as "Bob Jones," "Robert Jones," and "Bob Johnson." After the user indicates the correct contact in the chat interface, the agent can proceed with finding any open invoices. However, if there was an exact match in the directory for "Bobby Jones," the agent can find their open invoices without requiring the user to confirm the correct contact.

Semantic search leverages OpenAI's text embedding models. These models are used to calculate the similarity between text strings by measuring the distance between vector representations of each string. Each of these vectors are known as embeddings.

To configure semantic search for a table, use the following applications:

  1. Embedding Definitions—Create an embedding definition to create embeddings for the records in a table. You determine the key identifying fields that are included in each embedding. Learn more in Embedding Definitions application.
  2. Semantic Search Definitions—Configure a semantic search definition that specifies how a search should be conducted. This includes how to handle exact matches in combination with a semantic search. Learn more in Semantic Search Definitions application.

Semantic search definitions are built over embedding definitions. The embedding definition connects to the OpenAI embedding models and creates the embedding for each record. The semantic search definition describes how records are searched over using these embeddings.

For example, you might create an embedding definition using the Directory table. You could filter out any inactive contacts embed the Name and Nickname fields, since those tend to be the fields used to identify each contact. After you save, embeddings are created for each of the active records in the table by creating individual strings in the format of <Name>,<Nickname>.

Then, you could create multiple semantic search definitions over that embedding definition, each for a different purpose. One could be specific to employees, and another could be for suppliers. You could apply filters in each semantic search configuration to only display results that match the specific contact type.

Embedding Definitions application

Use the Embedding Definitions application to create embeddings for the records in a table based on key identifying fields. Embedding definitions enable semantic searches of a table.

To create an embedding definition, specify the table you need to be able to search semantically. Then, add the fields used to identify the records in the table to the Embedding Source Table Fields subtable.

You can also apply a Source Table Filter to narrow down the records you want to embed. For example, you may want to filter out any inactive contacts for an embedding definition built for the Directory table.

Use embedding definitions in semantic search definitions. Learn more in Semantic Search Definitions application.

Embedding synchronization

After you save the embedding definition, the embeddings are automatically synchronized each day to uptake any modifications to table records. If you want to test the embedding definition immediately, you can use the Synchronize Embeddings action. 

Optionally, you can select the Real Time Embedding checkbox to queue a background task to re-embed for every insert, update, and delete on the table . This allows semantic search to access any changes within seconds, rather than waiting for the bulk update at night. 

Embedded field considerations

Embed the text fields used to identify each record in the table. These field values from each record are concatenated into a single string, and each of these strings are processed by a model from OpenAI that turns them into an embedding. 

The more fields you embed, the longer each string, and the less likely that semantic search results are helpful. Do not embed number fields, or fields that are commonly empty.

For example, an embedding definition for the Directory table may contain the Name and Nickname fields. However, an embedding definition over the DataCatalog table contains the DataCatalogName, DataCatalogDescription, and DataCatalogSourceTextTL fields. This is because searches of the data catalog may be by either the data catalog name, or, less commonly, the source table. The description field is included to add weight to searches by the data catalog name, since the description is often similar.

Test an embedding definition

You should always evaluate the quality of the embedding fields you choose. Use the Search Embedded Content action to test sample search terms against the embedding definition. Then, enter a search term and select the Run Test field action. 

The results are sorted by the Similarity Score. This percentage is influenced the number of fields embedded, the content of those fields, and more, and may be lower than you expect. You should, however, confirm that the top results are what you expect based on your search term.

If you want to test any changes you make based on these results, use the Synchronize Embeddings action and test again.

Semantic Search Definitions application

Use the Semantic Search Definitions application to specify how searches are conducted, including how exact matches are handled in combination with a semantic searches. Semantic search definitions can be used in the Agent Tool Builder application to derive input values for table lookup fields from a user prompt.

In order to search a table semantically, you must specify an existing embedding definition in the Embedding Definition field. You can create multiple semantic search definitions using the same embedding definition. Learn more in Embedding Definitions application.

You can refine the results returned on a search using a Source Table Filter. For example, you may have an embedding definition built over the Directory table. In one semantic search configuration, you could filter the possible records down to customers only. In another, you could filter only for employees.

Exact matches

In addition to searching semantically, you can also specify any Exact Match Fields. The system always checks for any exact matches in these fields before semantic search results are displayed.

For example, you may want to search the Directory table for contacts semantically, so you specify the related embedding definition. However, you may also expect users to occasionally search by the Contact ID field. Since this is a number field, where values have no semantic meaning, specify it as an exact match field. This allows user prompts such as "Show me all the open invoices for Clementine Kruczynski," and "show me open invoices for customer 1291," to both return relevant results.

For each exact match field, you can select Ignore Case to match values regardless of capitalization. For example, if an AI-extracted value such as "WALMART" needs to match a directory record stored as "Walmart," enabling Ignore Case allows the exact match to succeed despite the case difference. This is especially useful in intelligent document processing flows, where extracted values don't always match the case of your master data.

Semantic search definitions can be referenced in agent tools and logic blocks. Learn more in Agent Tool Builder application and Semantic Search action.

Semantic Search action

Use the Semantic Search logic block action to enable use of semantic search within your logic block. Configure how the search is conducted in the Semantic Search Definitions application, then reference that record in the logic block action. 

Enable semantic search in applications so users can search for records that contain information similar to, but not exactly matching, their search queries. 

For example, if a user was looking for records related to a company, traditional filtering would only bring up exact matches. By using semantic search, the search field could also find records that use an acronym or short hand format of that company name. 

Or, if multiple employees create records in the same application but use different words to describe the projects or tasks they are doing, semantic search could find the records that all relate to the same type of project, regardless of the descriptive words used in the records. 

To use the logic block action, you must:

  • In the Semantic Search Definitions application, create or identify an existing semantic search definition that matches your criteria. 
  • In the logic block action, reference the semantic search definition and define the search term. 
  • Name your search results. Results can be accessed in the Data Found loop by referencing the search name you entered. 

The search results return a list of results ranked from most similar to least similar. If there is an exact match, semantic search is not initiated. 

Learn more in Semantic search.