Skip to Content
Docs

Query and Use Results

Query and Use Results

Once your records are indexed, you can test searches on the profile’s Query tab and search from your solution through the Native Object API. This page explains how to run and read a console search, select a Search Profile and named Search Index in an API request, and interpret results containing matched text or current source records. It also covers how to use those results while preserving references to the records that support an answer.

Note: Use the console to test and compare queries. Use the Native Object API to integrate AI Search into applications and Flows.

Test a Query in the Console

  1. Open the Search Profile and select the Query tab.

  2. In Index, choose a named index, or No index to search without a preset. The console summarizes the selected index, for example “hybrid search, top 10, plus this index’s filters.”

  3. Optional: enter a Top K override.

  4. Enter your question in Search query, then select Run search.

While the index is still building, the console warns “Partial index · queries may be incomplete.”

Read console results

The results header shows the result count, the Index, the Retrieval mode, whether Reranking was on, what results are Ordered by, and the Generation searched. Each result shows:

  • Its rank, the source record ID, and the source Object Type. Select the record ID to open a Preview record dialog; select Open record to go to the record.

  • Matched chunk: the indexed text of a matching chunk. Document-level results show Indexed document text instead.

  • Projected fields: the projection values for that record.

  • Scores: Hybrid score, plus Semantic and Keyword ranks with rank bars, in hybrid mode.

Expand How scores are calculated for the formula:

Value Calculation
Semantic 1 / (60 + semantic rank)
Keyword 1 / (60 + keyword rank)
Hybrid score The sum of both. A result ranked first in both scores 0.0328.
Rank bars Bar width is 1 / rank: #1 is full, #2 is half, #10 is one tenth. Bars show rank, not confidence.
Top K Caps the result count. It is not a relevance cutoff.

Select Preview raw JSON to see the full response in a Raw response JSON dialog and Copy JSON to copy it. The response has the same shape as the chunks route described below.

Query Through the Native Object API

Use these endpoints in the Native Object API for your tenant to search the records indexed by a Search Profile. Choose the endpoint that returns either current source records or matching passages from the indexed text. The paths below are relative to the API’s base URL.

Method and Path Result
POST /$ai-search/:typeId Current source records corresponding to retrieved hits, deduplicated by record ID.
POST /$ai-search/:typeId/chunks Search evidence, including content, source references, projections, and scores.

To find these operations in the console, open Admin → API Documentation. The Tenant Native Object API page shows your API base URL. Expand the source Object Type used by your Search Profile, or filter to Special ($) operations, and look for the operations whose names begin with AI search and end with records or chunks. See Authentication and Permissions for tenant access guidance.

Use the source Object Type ID as typeId. Source read permission is required. These endpoints do not support external Object Types.

Both routes accept this request shape:

JSON
{
  "profileId": "equipment-help",
  "indexId": "default",
  "query": "The pump is running but barely moving water.",
  "topK": 10
}

Here, equipment-help is an example profile ID and default is an example named Search Index ID on that profile. Replace them with IDs from your tenant; these names are not created automatically. Use a query that a known record in your source Object Type should answer.

Field Required Meaning
profileId Yes Profile to search.
indexId No Named preset to apply. Pass it explicitly for repeatable behavior.
query Yes Nonempty search text.
topK No Candidate limit from 1 to 100; overrides the preset value.

Search requests do not accept query-time filters (filter conditions supplied with an individual query). To filter results, configure static filters on a named index and include its ID in indexId.

Requests also do not accept a field-selection list. See Indexes for behavior when indexId is omitted.

Read Search Evidence

The chunks route returns an envelope with profileId, optional indexId, generationId, and items. Each hit includes:

Field Meaning
recordUri Reference to the source record, for example native-object:<typeId>/<recordId>.
documentId Identifier used to group a document’s hits.
chunkId Optional chunk identifier.
content Indexed text returned as evidence.
projections Typed attributes evaluated from the source record.
score Retrieval score.
semanticRank, keywordRank Optional ranks from the retrieval modes.
rerankScore Optional score added by reranking.
sourceHash Optional hash identifying the indexed source version.

A score is not a probability that an answer is correct. Compare the text with the query and source record. Multiple hits can refer to the same document when grouping is disabled.

Read Source Records

The records route returns a similar envelope, but its items contain current source records rather than the evidence-hit structure. Evidence explains a match, while a current record provides the data a solution act on.

Both routes check that retrieved source records still exist and are available through the route’s record checks. Removed records can reduce the returned count. Indexed evidence can still reflect an earlier version of a record during asynchronous updates.

Use Results in a Solution

Keep the query, profile ID, index ID, and source references when reviewing an answer. Have the consuming client distinguish retrieved facts from its interpretation. Retrieve current source data before taking an action that depends on the record’s latest state.