Knowledge Base Search

The knowledge_search tool searches the indexed Pricefx documentation by meaning, not only by exact words. The AI assistant uses the tool to find information that answers your question. For each result, the tool returns an excerpt of the matching text and the page it comes from.

Tool Name – knowledge_search

Title – Knowledge Search

Type – Public

Permissions

The knowledge_search tool does not use your Pricefx permissions. All users see the same list of sources.

Parameters

Parameter

Required

Description

query

Yes

Text to search for, for example How to create a Quote.

n_results

No

Number of results to return, from 1 to 20.

Default: 5.

truncate_content

No

Determines whether the document content is shortened.

Default: true.

  • true – The content provided by the tool is shortened.

  • false – The tool returns the full text of each result and ignores content_length.

content_length

No

Maximum number of characters of text per result, when truncate_content is true.

Default: 300.

A value of 0 returns results with no text. Negative values are not allowed.

Output

Field

Description

Results

List of matching excerpts, most relevant first.

Knowledge Content

Text of the excerpt, shortened according to truncate_content and content_length.

Metadata

Information about the page the excerpt comes from, for example the page URL and title. See Behavior and Limitations.

Total Results

Number of returned results.

Query

Search text the tool used.

Behavior and Limitations

  • Results are excerpts of pages, not whole pages.

  • The tool first searches the Pricefx knowledge service. If that search fails, the tool searches a backup index instead, and does not report an error.

  • The metadata depends on which index answered:

    • The main search returns source_url, page_title, heading_context, nav_breadcrumb, and relevance_score.

    • The backup index returns source, name, distance (lower is closer; 0 is an exact match), and labels such as knowledge-type and product-capability.

  • The backup index can return more results than n_results, because it returns n_results from each of its collections. On DEV, n_results 2 returned 4 results.

  • The backup index can return the same excerpt more than once.

  • Page URLs from the backup index cannot be used with the knowledge_get_page_content tool.

See Also