Customize Agent Content

In large systems that experience heavy load, you can optimize the performance of AgentBoolean queries by creating optimized agents or categories. This optimization is most useful when you use HPE IDOL Server to:

When HPE IDOL Server matches query text against agents or categories, it uses the following matching order:

  1. It matches the query text against the Index fields in the agents or categories (for example the TRAINING or DRECONTENT fields).

  2. For agents that match in Step 1, it matches the query text against any Boolean restrictions in the agents or categories.

  3. For agents that match in Step 2, it matches the query text against any FieldText restrictions in the agents or categories.

HPE IDOL Server checks the Boolean restriction only if the agent or category content matches the document.

To optimize performance, choose your category or agent content carefully to ensure that it matches only query text that is also likely to match the Boolean expression.

Use a Minimal List of Rare Terms

For many Boolean restrictions, you can select one or two terms that queries must contain to match the Boolean expression. If you select the rarest of these combinations, fewer documents match the agent content. This process reduces the number of Boolean expressions that HPE IDOL Server must match.

For example, if your Boolean restriction is:

“New Zealand” AND “French Champagne” 

you can set the agent content to:

Zealand

In this Boolean expression, the query text must contain all four terms, so you can choose any of them as the agent content. Zealand is the rarest term, so fewer documents match this agent.

For other expressions, you can often similarly choose a minimal list of terms to reduce the number of documents that match against the Boolean restriction.

This action returns a minimal list of terms that text must contain to match the Boolean expression. It provides the rarest terms where possible. The action returns the following information:

<autnresponse>
   <action>DOCUMENTSTATS</action>
   <response>SUCCESS</response>
   <responsedata>
      <autn:wildrequired>false</autn:wildrequired>
      <autn:numberrequired>1</autn:numberrequired>
      <autn:required>ZEALAND</autn:required>
   </responsedata>
</autnresponse>

Using this method to choose the agent or category content can improve performance, especially in systems that receive a large number of queries.

Use AlwaysMatchType Fields

For some Boolean expressions that include Wildcards and DREFUZZY or SOUNDEX expressions, the minimal list of terms must include a Wildcard value.

For these expressions, the DocumentStats action with QueryStats set to True returns the following line:

<autn:wildrequired>true</autn:wildrequired>

The agent or category content cannot contain a Wildcard value, so you must use a different approach to ensure that HPE IDOL Server checks the Boolean expression.

You can ensure that HPE IDOL Server checks any documents that contain one of these expressions by configuring an AlwaysMatchType field in the Agentstore component and adding it to the agents.

HPE IDOL Server always matches the content of an agent or a category that contains an AlwaysMatchType field. It then attempts to match the query text against the Boolean restriction, and returns any agents or categories that match at this stage.

After you configure the AlwaysMatchType field, you must manually create agents as IDX or XML documents.

For each agent, send the Boolean restriction in a DocumentStats action to HPE IDOL Server to return the minimal list of terms.

#DREREFERENCE WineAgent
#DRETITLE My Wine Agent
#DREFIELD BOOLEANRESTRICTION=""Champ*" AND "Merlot""
#DREFIELD MARKERFIELD="1"
#DRECONTENT
#DREENDDOC

You can index your agent IDX or XML document into the Agentstore component agent database by using a DREADD or DREADDDATA index action. For example:

http://localhost:9051/DREADD?C:\data\Agents.idx&DREDBName=Agent
NOTE:

HPE recommends that you do not use AwaysMatchType fields without also specifying either the Boolean or FieldText restriction. If you add an AlwaysMatchType field to the agent or category without any other restriction, it returns for every query.

If you do have agents or categories of this kind, you can use FieldText in your agent or category query to filter them out. For example:

FieldText=EXISTS{}:BOOLEANRESTRICTION OR EXISTS{}:FIELDTEXTRESTRICTION

This example restricts the results of the query to agents and categories that have one of the restriction fields.


_HP_HTML5_bannerTitle.htm