SearchFuzzyAkb

Searches the Active Knowledge Base based on a query and returns the appropriate specified field (or best-match).

SearchFuzzyAkb(
  query: str,  
  searchFields: List[str] | None = None,  
  fromPerson: Literal["Agent", "User", "Both"] = "Both",  
  numberTopics: int = 1,  
  fields: List[str] | None = None,  
  labels: List[str] | None = None  
)

Where:

  • query: The string used to search the AKB for a best-match topic.
  • searchFields: [“topic”, “summary”, “facts”]. You can specify one or more fields separated by commas. In this parameter, we specify the fields through which the search will be conducted.
  • fromPerson: Literal["Agent", "User", "Both"]. This parameter indicates whose topics to search for.
  • numberTopics: The maximum number of topics returned.
  • fields: [“id”, “personId”, “topicId”, “topic”, “summary”, “facts”, “confidence”, “source”, “createdAt”, “updatedAt”, “labels”]. You can specify one or more fields separated by commas. In this parameter, we specify which fields of the topic should be returned. The fields of each found topic are returned in the format:
    • Id\nperson_id\ntopic_id\ntopic\nsummary\nfacts\nconfidence\nsource\ncreated_at\nupdated_at\nlabels\n\nId\nperson_id\ntopic_id\ntopic\nsummary\nfacts\nconfidence\nsource\ncreated_at\nupdated_at\nlabels...
  • labels: The labels associated with the AKB topics you'd like to search in.

Search results are sorted by the degree of similarity between the query and the field value from searchFields. The best matches are at the top of the search results list.