Configure the Fact Bank System

The HPE Answer Server configuration file contains information about the subcomponents in your Fact Bank systems.

For any Fact Bank system, you must configure the name of your Question Parser Eduction grammars and Lua scripts, and the locations of the Fact Bank coding files. You must also configure the Fact Store.

You can optionally also configure a second Eduction grammar for advanced time normalization. Advanced time normalization extracts dates and times in various formats from questions and normalize them to a consistent format, to improve fact retrieval.

The Fact Store component stores the facts that you want to be able to retrieve. You can set up a Fact Store either by configuring an IDOL Content component, or by using a SQL database.

The Fact Store content is structured data, containing the entities and properties for your facts. As such, HPE recommends that you use a SQL database as the backend component for your fact store, because it is optimized for querying structured content.

Alternatively, you can use a Lua script to retrieve facts from an external fact store.

You specify the type of Fact Store that you want to use by configuring the BackendType configuration parameter in the system configuration section in the HPE Answer Server configuration file. Depending on which back end type you choose, you must also set additional configuration parameters.

The following sections describe how to configure the Fact Bank system in HPE Answer Server, depending on the type of Fact Store you choose.

Configure a Fact Bank with a SQL Database Fact Store

The following procedure describes the HPE Answer Server configuration you need to set up a Fact Bank system with a SQL database back end. For information about how to set up the SQL database, see Set Up a SQL Backend as Fact Store.

To configure the Fact Bank System for a SQL database backend

  1. Open the HPE Answer Server configuration file in a text editor.

  2. Find the [Systems] section, or create one if it does not exist. This section contains a list of systems, which refer to the associated configuration sections for each system.

  3. After any existing systems, add an entry for your new Fact Bank system. For example:

    [Systems]
    0=MyAnswerBank
    1=MyFactBank
  4. Create a configuration section for your Fact Bank system, with the name that you specified. For example, [MyFactBank].

  5. Set Type to FactBank.

  6. Set BackendType to sqldb.

  7. Set ConnectionString to the connection string to use to connect to the RDBMS that contains the fact store content.

  8. Set EductionQuestionGrammars to the name of your question parser grammar. You can also optionally set EductionEntities to a list of entities to use from the specified grammars.

  9. Set EductionTimeGrammars to the name of the Eduction grammar to use for advanced time normalization. You can also optionally set TimeEntities to a list of entities to use from the specified grammars.

  10. Set EductionLuaScript and TimeLuaScript to the file name and path to the Lua scripts to use for question parsing and time normalization.

  11. Set CodingsPath and CodingsDatPath to the locations of the coding files.

  12. Save and close the configuration file.

  13. Restart HPE Answer Server for your changes to take effect.

For example:

[MyFactBank]
Type=factbank
// Question Parser
EductionQuestionGrammars=FactBankEductionGrammar.ecr
EductionTimeGrammars=datetime_processing.ecr
// Fact Store
BackendType=sqldb
ConnectionString=Driver=PostgreSQL ANSI(x64); Server=sql-host.mycompany.com; Port=5432; Database=factstoredb; Uid=postgres;password=password;
// Coding Files
CodingsPath=./codings
CodingsDatPath=./codings

Configure a Fact Bank with an IDOL Content Component Fact Store

The following procedure describes the HPE Answer Server configuration you need to set up a Fact Bank system with an IDOL Content component back end. For information about how to configure the IDOL Content component, see Configure the IDOL Content Component as Fact Store.

To configure the Fact Bank System for an IDOL Content Component backend

  1. Open the HPE Answer Server configuration file in a text editor.

  2. Find the [Systems] section, or create one if it does not exist. This section contains a list of systems, which refer to the associated configuration sections for each system.

  3. After any existing systems, add an entry for your new Fact Bank system. For example:

    [Systems]
    0=MyAnswerBank
    1=MyFactBank
  4. Create a configuration section for your Fact Bank system, with the name that you specified. For example, [MyFactBank].

  5. Set Type to FactBank.

  6. Set BackendType to Content.

  7. Set IDOLHost and IDOLACIPort to the host name and ACI Port of the IDOL Content component that contains the fact store content.

  8. Set EductionQuestionGrammars to the name of your question parser grammar. You can also optionally set EductionEntities to a list of entities to use from the specified grammars.

  9. Set EductionTimeGrammars to the name of the Eduction grammar to use for advanced time normalization. You can also optionally set TimeEntities to a list of entities to use from the specified grammars.

  10. Set EductionLuaScript and TimeLuaScript to the file name and path to the Lua scripts to use for question parsing and time normalization.

  11. Set CodingsPath and CodingsDatPath to the locations of the coding files.

  12. Save and close the configuration file.

  13. Restart HPE Answer Server for your changes to take effect.

For example:

[MyFactBank]
Type=factbank
// Question Parser
EductionQuestionGrammars=FactBankEductionGrammar.ecr
EductionTimeGrammars=datetime_processing.ecr
// Fact Store
BackendType=Content
IDOLHost=localhost
IDOLACIPort=10050
// Coding Files
CodingsPath=./codings
CodingsDatPath=./codings

Configure a Fact Bank to Call a Lua Script

The following procedure describes the HPE Answer Server configuration you need to set up a Fact Bank system to call a Lua script to retrieve facts. For information about how to write the script, see Use a Lua Scripts to Retrieve Facts and the HPE Answer Server Reference.

To configure the Fact Bank system for a Lua Script backend

  1. Open the HPE Answer Server configuration file in a text editor.

  2. Find the [Systems] section, or create one if it does not exist. This section contains a list of systems, which refer to the associated configuration sections for each system.

  3. After any existing systems, add an entry for your new Fact Bank system. For example:

    [Systems]
    0=MyAnswerBank
    1=MyFactBank
  4. Create a configuration section for your Fact Bank system, with the name that you specified. For example, [MyFactBank].

  5. Set Type to FactBank.

  6. Set BackendType to Lua.

  7. Set ScriptPath to the path to the Lua script that you want to run as your Fact Bank. HPE Answer Server calls out to this script whenever it processes an Ask action that includes the Lua Fact Bank system, and returns the response as an answer.

  8. (Optional) Set ScriptFunction to the entry function in your Lua script that HPE Answer Server must call. The default entry function is called fetch.
  9. Set EductionQuestionGrammars to the name of your question parser grammar. You can also optionally set EductionEntities to a list of entities to use from the specified grammars.

  10. Set EductionTimeGrammars to the name of the Eduction grammar to use for advanced time normalization. You can also optionally set TimeEntities to a list of entities to use from the specified grammars.

  11. Set EductionLuaScript and TimeLuaScript to the file name and path to the Lua scripts to use for question parsing and time normalization.

  12. Set CodingsPath and CodingsDatPath to the locations of the coding files.

  13. Save and close the configuration file.

  14. Restart HPE Answer Server for your changes to take effect.


_HP_HTML5_bannerTitle.htm