ContextJSONFields

A set of fields to use to add structure and metadata to the prompt context that Answer Server sends to the LLM.

By default, Answer Server constructs a prompt to send to the LLM by using the following basic format: 

DOCUMENT: <doc_source>
<doc_content>

You can set ContextJSONFields to a list of fields that you want to include in the prompt, and Answer Server generates a JSON object with these fields and the corresponding values. This option can improve the ability of the LLM to differentiate between document summaries and parse the information.

You must include the text field, and you can include the following optional fields: 

  • source

  • title

  • database

  • relevance

Answer Server writes the fields in the prompt context JSON in the order that the occur in the configuration parameter. You cannot specify a field more than once.

NOTE: The last document returned might have malformed JSON if the prompt context has to be truncated due to token limits.

Type: String
Default:

uses a basic format for the prompt: 

DOCUMENT: <doc_source>
<doc_content>
Required: No
Configuration Section: MySystem
Example:

CustomJSONFields=Source,Text,Database,Relevance

This example results in the following prompt context JSON:

{
    "source": <doc_source>,
    "text": <doc_content>,
    "database": <doc_database>,
    "relevance": <doc_relevance>
}
See Also: My Vector Settings Configuration Parameters